|
Hello,
I am not sure, it is what you are looking for but you could add something like this:
int BarInProgress;
----------------------
if (Volume[0]>1) BarInProgress=1; else BarInProgress=0;
Then when you calculate your MA cross add the value BarInProgress.
When Volume[0]=1 it means that it is the open price of the new bar, so it will calculate from the last bar if Volume[0]>1
To look at 1 bar away you could put:
if (Volume[0]>1) BarInProgress=2; else BarInProgress=1;
Hope this help.
Bernard
|