Global datetime check_time;
if(check_time<Time[i]) {
FireMethodONCE();
check_time = Time[i];
}
Try this.
if(check_time<Time[i]) {
FireMethodONCE();
check_time = Time[i];
}
Try this.
datetime check_time ;
int init ()
{
check_time = Time [ 0 ] ;
return ( 0 ) ;
}
...
if ( check_time < Time [ 0 ] )
{
check_time = Time [ 0 ] ;
FireMethodONCE () ;
}
...
datetime check_time ;
int init ()
{
check_time = iTime ( 0 , 0 , 0 ) ;
return ( 0 ) ;
}
...
if ( check_time < iTime ( 0 , 0 , 0 ) )
{
check_time = iTime ( 0 , 0 , 0 ) ;
FireMethodONCE () ;
}
...
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
Hi,
I have written an indicator to fire a method when the bar closes. However it seems to be firing over and over once the bar closes. Any ideas, relevant code is below.