Maximum Valuie of OrdersHistoryTotal().

 
i printed OrdersHistoryTotal in Strategy Tester, I got the maximum value as 99. whereas in demo/live it shows more than 400. Why is it so?
 
kmnatarajan:
i printed OrdersHistoryTotal in Strategy Tester, I got the maximum value as 99. whereas in demo/live it shows more than 400. Why is it so?
Maybe you only placed 99 trades in the Strategy Tester.  The Strategy Tester is separate from Demo/Live.
 

i didn't place any order, the ea did. This is the code snippet.

   bool exists = false;
    double cnt = OrdersHistoryTotal();
    print("TOTAL IS",OrdersHistoryTotal());
    for (int i=0; i < cnt; i++)
    {
        if (!OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)) continue;
        if ( OrderSymbol() == PairName && OrderMagicNumber() == MagicNumber && TimeDay(TimeCurrent())==TimeDay(OrderCloseTime()))
        {
           exists = true;
         }
    }
        if (exists == false)
       {  
           
         Buyorder();
       }
    
 
kmnatarajan:
i printed OrdersHistoryTotal in Strategy Tester, I got the maximum value as 99. whereas in demo/live it shows more than 400. Why is it so?

   I don't believe there is a maximum value. If you test a longer period then you did now it will change
In Strategy Tester you can test one Symbol so you will get results from one EA for one Symbol testing at one timeframe

while on demo/live you can trade more Symbols the same time and have working more EA's on different symbols different timeframes and the closed manual trades will be counted in OrdersHistoryTotal

 
deVries:

In Strategy Tester you can test one Symbol while on demo/live you can trade more Symbols the same time

i said a maximum of 99. no orders are placed when OrderHistoryTotal() reaches 99 in strategy tester.
 
kmnatarajan:

i said a maximum of 99. no orders are placed when OrderHistoryTotal() reaches 99 in strategy tester.
I have had many more orders placed than 99 in the Strategy Tester.
 
RaptorUK:
I have had many more orders placed than 99 in the Strategy Tester.

Unzip and open the HTM file to see a report from a Strategy Tester run I just completed, 1314 trades.
Files:
99tradetest.zip  85 kb
 
kmnatarajan:

i said a maximum of 99. no orders are placed when OrderHistoryTotal() reaches 99 in strategy tester.


Check    What was your testingperiod and when was last trade closed in your test....

and when was last trade opened 

 
mm, i figured. thanks raptor. the problem is not with total count,But with the number of days. the history doesn't go beyond 2 months in strategy tester.
 
deVries:


Check    What was your testingperiod and when was last trade closed in your test....

and when was last trade opened 

i ran the tester from 21-06-12 till today, but only till 16-08-12 the i got the historytotal.

when i ran the tester from 27-08-12 till today,  i got the historytotal till 23-10-12.

The same way , from 02-07-12 till today, i got only till 29-08-12.

 
kmnatarajan:
mm, i figured. thanks raptor. the problem is not with total count,But with the number of days. the history doesn't go beyond 2 months in strategy tester.
The Strategy Tester will run for years if you have the data . . .  the limitation is thee size of the fxt file,  it is limited to 2 GB.
Reason: