int last_bar=0;
int start()
{
......
if(last_bar != Time[0] )
{
last_bar = Time[0];
//
do your stuff here....
//.....
}
}

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 show me sample code of how I can execute a function after a bar closes?
I'm trying to avoid checking bar[1] with every tick.