i want to collect time for bar of specific 2 MA cross,
int x;
ma1= iiMA(NULL,0,30,0,MODE_EMA,PRICE_CLOSE,0);
ma2= iiMA(NULL,0,30,0,MODE_EMA,PRICE_CLOSE,2);
if (ma1>ma2){ x = 1};
datetime ThisD;
ThisD = iTime(Symbol(),0,x);
MessageBox("\Time = "+ThisD);
suppose ma cross 5 bar previous
but its not showing that cross time its showing previous bar time..what wrong the code
int x;
ma1= iiMA(NULL,0,30,0,MODE_EMA,PRICE_CLOSE,0);
ma2= iiMA(NULL,0,30,0,MODE_EMA,PRICE_CLOSE,2);
if (ma1>ma2){ x = 1};
datetime ThisD;
ThisD = iTime(Symbol(),0,x);
MessageBox("\Time = "+ThisD);
suppose ma cross 5 bar previous
but its not showing that cross time its showing previous bar time..what wrong the code