Download MetaTrader 5
To add comments, please log in or register
Interested in MQL5 features? Find them in documentation!
Rene Noteborn
216
Rene Noteborn 2014.08.04 17:35 

Hallo,

I am using A binnary tree to determine the lotsize depending on the profit of the last three orders. Is it possable that the function OrdersHistoryTotal() doenst work while backtesting? 

         OrderSelect(OrdersHistoryTotal()-1,SELECT_BY_POS,MODE_HISTORY);  
         double P5 = OrderProfit();  
Simon Gniadkowski
Moderator
17975
Simon Gniadkowski 2014.08.04 22:24  
renen:

Hallo,

I am using A binnary tree to determine the lotsize depending on the profit of the last three orders. Is it possable that the function OrdersHistoryTotal() doenst work while backtesting? 

No,  but it reads the Strategy Tester Order history  . . . not your Live/Demo Order history.  If your EA hasn't placed any orders there will be no orders to read . . .
/
To add comments, please log in or register