Hello
I'm trying to implement system from TradeStation to MetaTrader.
I don't know how to implement 'BarsSinceEntry' function in mql4.
Mirek (PL)
You would have to add the current bar in the comment of the ordersend() function. At a later bar, you compare the current bar to the bar that is in the comment of the order, and the difference is your "BarsSinceEntry".
OrderSelect(ticket, ..., ... );
int BarsSinceEntry = iBarShift(OrderSymbol(), Period(), OrderOpenTime());
You would have to add the current bar in the comment of the ordersend() function. At a later bar, you compare the current bar to the bar that is in the comment of the order, and the difference is your "BarsSinceEntry".
I understand.
Thanks fo help
OrderSelect(ticket, ..., ... );
int BarsSinceEntry = iBarShift(OrderSymbol(), Period(), OrderOpenTime());
I understand this too.
Thanks for help- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello
I'm trying to implement system from TradeStation to MetaTrader.
I don't know how to implement 'BarsSinceEntry' function in mql4.
Mirek (PL)