Thread: New Order Delay
View Single Post
  #2 (permalink)  
Old 02-10-2006, 08:34 AM
sunwest's Avatar
sunwest sunwest is offline
Member
 
Join Date: Jan 2006
Location: London
Posts: 93
sunwest is on a distinguished road
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
Reply With Quote