EMA shift
2 replies
huangwh88
7 years ago #116172
Hello,
I just did the EMA cross example in the EA wizard guide and would like to clarify the following:
With these EMA settings,
Period:10
Apply to: Close
Shift:1
Does shift =1 mean that the lookback period starts from the previous candle? So the lookback period is from close[1] to close[10]?
If I set shift=0, does this mean the current price = close price?
Thank you!
tomas262
7 years ago #140977
Hello,
yes, you are right. With shift = 1, the situation is evaluated at that bar so lookback is 10 bars back from it.
Shift = 0 references the very last “unfinished only” bar. You can work with Shift = 0 only when using “every tick” testing precision in MetaTrader backtester. It won’t work properly with “open prices” backtesting mode
huangwh88
7 years ago #140996
Hello,
yes, you are right. With shift = 1, the situation is evaluated at that bar so lookback is 10 bars back from it.
Shift = 0 references the very last “unfinished only” bar. You can work with Shift = 0 only when using “every tick” testing precision in MetaTrader backtester. It won’t work properly with “open prices” backtesting mode
Thanks Tomas!
Viewing 2 replies - 1 through 2 (of 2 total)