Download MetaTrader 5

Using Binnary Branch Lots Determination

To add comments, please log in or register
MQL5 Cloud Network speeds up calculations. Try it!
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
18001
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