I am noticing SMA/EMA 50 on daily and 60 Minutes charts have different values than the ones that are calculated in my strategy.
Code:
Ofile.WriteLine("\r\nDaily EMA50="+EMA(BarsArray[1],50)[0]); Ofile.WriteLine("\r\nDaily SMA50="+SMA(BarsArray[1],50)[0]); Ofile.WriteLine("\r\n60 Min EMA50="+EMA(BarsArray[2],50)[0]); Ofile.WriteLine("\r\n60 Min SMA50="+SMA(BarsArray[2],50)[0]);
Fetch Time=Thu-Jan-10-2013-11-47-28AM
YM 03-13
Current Price=13340
Daily EMA50=13034.44
Daily SMA50=13076.45
60 Min EMA50=13325.25
60 Min SMA50=13310.6
Average_Range=83
OPEN P0 =13328 HIGH P0 =13389 LOW P0 =13316 CLOSE P0 =13340 RANGE P0 =2
OPEN P1 =13266 HIGH P1 =13356 LOW P1 =13264 CLOSE P1 =13330 RANGE P1 =92
OPEN P2 =13290 HIGH P2 =13309 LOW P2 =13232 CLOSE P2 =13268 RANGE P2 =77
OPEN P3 =13361 HIGH P3 =13366 LOW P3 =13272 CLOSE P3 =13315 RANGE P3 =94
OPEN P4 =13322 HIGH P4 =13377 LOW P4 =13296 CLOSE P4 =13358 RANGE P4 =81
OPEN P5 =13324 HIGH P5 =13360 LOW P5 =13287 CLOSE P5 =13321 RANGE P5 =73
Note: I have used both Zenfire and IB's data feed and the calculated results are off than then the values displayed in chart.
Can anyone help shed some light on this?
regards,
tariq
Comment