PDA

View Full Version : CrossAbove for current bar.


SuzyG
12-28-2006, 03:49 AM
If I set the lookBackPeriod to be 0, I get no result:

CrossAbove(EMA(10), SMA(20), 0)

Is this as expected?I can only see the crossover 1 bar later. Is it possible to know exactly when it occurs?

CrossAbove(EMA(10), SMA(20), 1) <-- this works fine.

Thank you.

NinjaTrader_Ray
12-28-2006, 04:18 AM
That is correct since on the closeof a bar, you want to check for cross over condition on that bar which is now 1 bar ago, so the lookback period would be 1. There is no way to check what bar the actual cross over happened if your lookback period is greater than 1.

Ray