View Full Version : BarsAgo since price
JKrider
07-26-2010, 10:22 AM
Looking to see if there is already a simple statement allowing a price lookback. "How many bars ago since High was equal to or greater than Close[0]" I know I can do it with brute force by examining High[1] High[2] etc with a loop, but it seems a simpler statement might exist.
NinjaTrader_Bertrand
07-26-2010, 10:45 AM
You could work here with MRO / LRO and your condition for test for, it would return you an int representing the bars Ago this was true - http://www.ninjatrader-support.com/HelpGuideV6/MostRecentOccurenceMRO.html
JKrider
07-26-2010, 11:05 AM
That's looks like it should work. Will play with it tonight. Thanks. Question, it will not work in a multi-time strategy. If it is set up in a custom indicator which is called by the multi-time strategy would it work then?
NinjaTrader_Bertrand
07-26-2010, 11:39 AM
You're welcome, yes you should be able to access this single series indicator value then from the strategy.