anyone?
put it in the beginning of the ontick
if (timee==Time[0]) return; timee=Time[0];
bool BarUnused=true;
.
.
.
void OnTick(void)
if(CopyRates(_Symbol,_Period,0,1,rates)!=1)
{Print("CopyRates of ",_Symbol," failed, no history"); return;}
{
.... your stuff ...
BarUnused = false;
}
//--- this code only with the first tick in a bar
if(rates[0].tick_volume > 1) return;
thanks all. will try
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 all
i am using ontick and with some rules to enter trade
however, when price move too fast, it might trigger 2 or more entries on a single bar
how can i code it so that once it has opened a trade on current bar, it can only open the next trade on next bar onwards?
thanks