Time[0] will have changed.
CB
BigAl:
Can someone please remind me how an EA can recognise the start of a new bar. Is it that
if (Volume[0] == 0) // means start of a new bar
// This function return the value true if the current bar/candle was just formed
bool NewBar()
{
if(PreviousBar<Time[0])
{
PreviousBar = Time[0];
return(true);
}
else
{
return(false);
}
return(false); // in case if - else statement is not executed
}
void start()
{
..........
if(NewBar() == true)
{
........
}
}
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Can someone please remind me how an EA can recognise the start of a new bar. Is it that
if (Volume[0] == 0) // means start of a new bar