This is a possible way to use ADL to take a specific Instrument and pull out the Bid Price for that instrument.... and then create a counter that uses a User Defined Uptick/Downtick variable and monitors the market data. Then when the User Defined number of Uptick or Downticks in the market is reached.... this then outputs a TRUE boolean value which can then be used as a trigger condition within an algos logic.
Note: The 2 different State Blocks #1 and #2 both use the same internal formulas as shown in the screen shots. But make sure to change the reference VE (Value Extractor block) to either VE block Bid Price 1 or VE block Bid Price 2 in order to make sure you are referencing the correct values. State Blocks #2 should reference VE block Bid Price 2 , and State Block #1 should reference VE block Bid Price 1.
Below you will see 2 screen shots of logic. They are very similar in construction, but they differ with the internal State Block conditional logic in order to perform UPTICK logic or DOWNTICK Logic Internal conditional logic for State Blocks #1 and #2:
State Block 1.......Condition 1: Bid Price > VE Bid Prc 1 Condition 2: Bid Price < VE Bid Prc 1
State Block 2.......Condition 1: Bid Price > VE Bid Prc 2 Condition 2: Bid Price < VE Bid Prc 2
State Block 1.......Condition 1: Bid Price < VE Bid Prc 1 Condition 2: Bid Price > VE Bid Prc 1
State Block 2.......Condition 1: Bid Price < VE Bid Prc 2 Condition 2: Bid Price > VE Bid Prc 2