- sleep() not working in this code!!
- Scanning the history counting consecutive losses and profits
- OrdersHistoryTotal fail
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 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(); }
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
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.
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.
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.
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.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use