Hello:
Suppose you have access to intraday 1minute data and are interested in daily opening Jump > 300 points where Jump is defined below as:
todayOpen = TimeFrameGetPrice("O",inDaily);
yesterdayClose = TimeFrameGetPrice("C",inDaily,-1);
Jump = Abs(todayOpen - yesterdayClose);
You therefore wish to export all the intraday bars of those particular days where Jump > 300, and thinking about creating below loop to do this:
fh = fopen(...);
if (fh) {
for (i = 0; i < BarCount; i++) { // loop intraday 1minute bars
if ( Condtion ? ) { // should check whether this day's Jump is > 300
fputs(...); // puts the O[i],H[i],L[i],C[i] to file
}
}
}
fclose(fh);
The question is: Any AFL function that can be used in order to write the condition checking part as in the above loop?
I have tried to look at the reference but still/unable to find a solution. Any idea will be appreciated.