EMA shift

2 replies

huangwh88

Customer, bbp_participant, community, 113 replies.

Visit profile

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!

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

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

0

huangwh88

Customer, bbp_participant, community, 113 replies.

Visit profile

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!

0

Viewing 2 replies - 1 through 2 (of 2 total)