Hi all...I'm new to the community (and ADL), so forgive the newbie question! I grasp the difference in ADL between discrete and continuous data -- atleast conceptually. My current setup could not be more simple: I have 2 sources of continuous data coming from field blocks: (A) ask qty at some index and (B) bid qty at some index. What I'd like to do is monitor A and B and determine if either of them change (regardless of whether A changes first or B changes first), and then perform a calculation (using A and B values)...and subsequently do something like place an order based on that calculation. So, what I'm having trouble understanding is how to monitor A and B and implement logic that determines if they change value. It's an almost embarrassing question to ask because it is so trivial.

Anyone able to help?

Thanks in advance!

Comment

**Answer** by Rohit Agarwal
·
Jun 18 at 07:24 AM

In the below example we are saving the ask price in value extractor block

And then we are comparing with the live ask price

If the saved ask price is not equal to live ask price then we are generating a discrete signal which will update the value extractor block with latest ask price

This way whenever there is change in ask price , you will get a discrete signal

capture.png
(77.6 kB)

**Answer** by anthonyzorzos
·
Jun 18 at 03:51 PM

Ah, wonderful Rohit, thanks so much...that makes perfect sense. Quick follow-up question. If I weren't comparing something like ask price (which is available within the extractor block), but were comparing a calculated value (something like ask price at one index divided by ask price divided by ask price at another index). In that case, is it possible to extract that value within the "extract block"...and then use the same method you described above?

Again, thank you!

**Answer** by Rohit Agarwal
·
Jun 21 at 07:24 AM

You can use monitor any numeric value using same logic as above.

Just use the numerical output instead of ask price in the circled area
capture.png
(63.7 kB)

**Answer** by patrickrooney
·
Jun 23 at 07:33 PM

This is a neat little tool @Rohit Agarwal. Thank you for your contribution, as always.

Ask questions and share ideas about the TT^{®} and X_TRADER^{®} platforms.

First time here? See our Getting Started Guide and FAQs.

Follow
### Follow this Question

Search String on ADL Instrument - Option Underlying and Strike 1 Answer

TT ADL clock 1 Answer

Moving Average Crossing - Analytics Block or Moving Average Block? 1 Answer

Is there a way to create a special ALERT when your ADL algo is forced to Involuntarily Pause??? 8 Answers

ADL Consulting 3 Answers

© 2017 Trading Technologies International, Inc. All rights reserved.

Powered by AnswerHub

- Anonymous
- Sign in
- Create
- Ask a question
- Create an article
- Post an idea
- Spaces
- ADL®
- RTD
- APIs
- Explore
- Topics
- Questions
- Articles
- Ideas
- Badges