I was changing my singletime frame to a multitimeframe strategy and I encountered some problems I could note explain. So I wrote the most simple script printing the value of the EMA(34).
The first script is a single time frame running on a 5 min timeframe.
Value1=EMA(34)[0];
Print("Script1"+" "+Value1.ToString()):
The second script is a multitime frame. The primary timeframe is a 1 min and the secondary timeframe is a 5 min time frame on the same instrument
if(BarsInProgress==1)
{
Value1=EMA(34)[0];
Print("script2"+" "+Value1.ToString());
}
Then I had both scripts running simultaneously on live charts of the dax this morning.
The outcome of this test is that the values of the EMA's are different.
To my understanding both ema's should be the same.
Is there an explanation?
Comment