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...
If you can't find what you need in the Codebase or the Market, then you can create a request in Jobs Service.