I guess you want to say
if (timeprev==Time[0]) return (0);
(you want to return if you have seen this time already, not the other way round.).
Also, my method (taken from the MT samples) is the following:
if (Volume[0]>1) return (0);
// from here on look at indicators with index 1, e.g. iMA(NULL, 0, ...., 1);
Markus
if (timeprev==Time[0]) return (0);
(you want to return if you have seen this time already, not the other way round.).
Also, my method (taken from the MT samples) is the following:
if (Volume[0]>1) return (0);
// from here on look at indicators with index 1, e.g. iMA(NULL, 0, ...., 1);
Markus
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
I am using the Time[0] and trying to prevent code execution on the tick and only on a new bar
if ( Time[0] == MyTime )
return(0);
else
{
MyTime = Time[0];
Last_Bar = Last_Bar +1;
}
However, I cannot seem to get this to work. I'm currently doing this:
The EA doesn't make any trades using this at the top. Any help? I want the expert to only examine a complete bar and run code on it.