hi, i am writing a EA and i only wnt it to run certain things on the first tick of a new bar.
i have alrady written up what i thought would do the trick, but it seems to ocassionally run the things in mid-bar.
this is what i came up with:
bool NEW_BAR = false;
if( NEW_TIME != Time[0])
{
NEW_TIME = Time[0];
NEW_BAR = True;
}
if(NEW_BAR == False)
{
return;
}
anyone got any better ideas?
i have alrady written up what i thought would do the trick, but it seems to ocassionally run the things in mid-bar.
this is what i came up with:
bool NEW_BAR = false;
if( NEW_TIME != Time[0])
{
NEW_TIME = Time[0];
NEW_BAR = True;
}
if(NEW_BAR == False)
{
return;
}
anyone got any better ideas?