use this ... it works
bool openenable = true;
for(int hcnt=0;hcnt<HistoryTotal();hcnt++)
{
OrderSelect(hcnt, SELECT_BY_POS, MODE_HISTORY);
if(OrderSymbol()==Symbol()&& OrderMagicNumber()==MagicNo)
{
int lastclosetime = OrderCloseTime();
if(lastclosetime>iTime(Symbol(),0,0)) openenable = false;
}
}
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 need some help:
If I closed a order in a bar, then I need no operation in this bar any more.
the next time for opening a position would be in the next bar.I wrote as fowling:
OrderSelect(ticket, SELECT_BY_TICKET);
if (OrderCloseTime()>Time[0]) return(0);
but it doesnot work at all in back test,
so ,I need some help, please help me