I have a chart, with 2 data series:
Same instrument : s&p
Same session : CME Globex Combined
One 15 mins resolution : Data1
One 1 Day resolution : Data3
Now, I've created an indicator with the code below:
Code: Select all
[IntrabarOrderGeneration = true]
variables: MovingAverage200( 0 ),MovingAverage( 0 );
if barstatus(3)=2 then
begin
MovingAverage200= Average( Close of data3, 200) ;
MovingAverage= Average( Close of data1, 200) ;
print("in Day "+ Text(Date of data3," ",Time of data3," close-1= ",Close[1] of data3," close= ",close of data3," "));
print("in 15M "+ Text(Date of data1," ",Time of data1," close-1= ",Close[1] of data1," close= ",close of data1," "));
print("in 15M "+ Text(time of data1," ",time[1] of data1));
print("in Day "+ Text(time of data3," ",time[1] of data3));
end;
Why don't I get the same value for Close of data1 and Close of data3?