Is There A Way To Calculate This?

 

If the price has moved up 100 pips without retracing at least 20 pips, then open a sell.

If the price has moved down 100 pips without retracing at least 20 pips, then open a buy.

Once a 20 pip retracement has occurred, the count to 100 starts over from there.

 

There is always a way. If you know how to think logically you can figure it out.

Tip: When you are counting as the price is moving up, keep storing the highest so far...

 
Whats the best way to store a value of this nature?
 
Best way? Not sure but you can use Global Variables.
 
thili55:
Whats the best way to store a value of this nature?
Hi,

If you can't find what you need in the Codebase or the Market, then you can create a request in Jobs Service.

 
thili55:
Whats the best way to store a value of this nature?
a static double so it is persistant memory.