Download MetaTrader 5
To add comments, please log in or register
Search in documentation is available via MetaTrader 5. Search and learn!
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
17963
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