- Account Connection - Accounts - MetaTrader 5 for iPhone
- Real and Generated Ticks - Algorithmic Trading, Trading Robots
- Settings - Settings - MetaTrader 5 for iPhone
In this approach we always have the information only about the past, and no information about the future, like in real trading. With each new tick (price change) in the tester we move in the present, the current-time triangle moves to the right onto the new known time and receives new prices. Each new tick creates the Present, increases the information about the Past and still has dark unknown Future before it. In this case the tester has no the possibility of seeing a future inherently, irrespective of mistakes, a trader could commit when writing a strategy.
1) you have 10 000 bar in your history from now to 2 month ago
2) you start the strategy at the today's date in the tester , ask for Close[2000] , the function returns 0, if i aks for Close[999] it does work, why ?
PS: it seems to work in "live" mode thought....
1) I have data from year 2004 to year 2008
2) I start the EA at July 2006 in the tester, running the EA in 15mn bars, i am asking close[2000], it returns 0, it should not since i have data from year 2004 and asking for those data are not "picking" into future.
Like it or not, that's a bug in your software unless it is a feature to limit the access to past data to a thousand bar in the tester, btw, the question is not "why do i need to access 1000 bars or more" but "why i cannot".
can you please stay focus on the question and give a serious answer please ?
If you really want then you can to.
You can start testing from 2004 year and do request to Last from 2006 year. What's a trouble?
If you really want then you can to.
Do this issue have a solution now ?
If someone does not understand the problem, here is a small code to run in the backtester:
int init() { Print("iBars M1: ", iBars(NULL, PERIOD_M1)); Print("iBars M5: ", iBars(NULL, PERIOD_M5)); Print("iBars M15: ", iBars(NULL, PERIOD_M15)); Print("iBars M30: ", iBars(NULL, PERIOD_M30)); Print("iBars H1: ", iBars(NULL, PERIOD_H1)); Print("iBars H4: ", iBars(NULL, PERIOD_H4)); Print("iBars D1: ", iBars(NULL, PERIOD_D1)); Print("iBars W1: ", iBars(NULL, PERIOD_W1)); Print("iBars Mn1: ", iBars(NULL, PERIOD_MN1)); return(0); }The result is :
17:06:24 Check_iBars: loaded successfully 17:06:24 Check_iBars started for testing 17:06:24 2008.09.15 00:00 Check_iBars EURUSD,M5: iBars M1: 1001 17:06:24 2008.09.15 00:00 Check_iBars EURUSD,M5: iBars M5: 1001 17:06:24 2008.09.15 00:00 Check_iBars EURUSD,M5: iBars M15: 1001 17:06:24 2008.09.15 00:00 Check_iBars EURUSD,M5: iBars M30: 1001 17:06:24 2008.09.15 00:00 Check_iBars EURUSD,M5: iBars H1: 1001 17:06:24 2008.09.15 00:00 Check_iBars EURUSD,M5: iBars H4: 1001 17:06:24 2008.09.15 00:00 Check_iBars EURUSD,M5: iBars D1: 1001 17:06:24 2008.09.15 00:00 Check_iBars EURUSD,M5: iBars W1: 0 17:06:24 2008.09.15 00:00 Check_iBars EURUSD,M5: iBars Mn1: 0
At the testing time (2008.09.15) I have more than 1000 bars on all timeframes, included W1 and MN1 (300 bars).
All iFunctions trying to access datas with a "shift" higher than 1000 returns 0, and no one bar from W1 and MN1 is accessible.
From where those limitations are coming from ? and how to bypass them ???
Thank you for your reply !
See article Testing Features and Limits in MetaTrader 4.
Weekly, monthly, and irregular timeframes are not tested
See article Testing Features and Limits in MetaTrader 4.
Weekly, monthly, and irregular timeframes are not tested
Rosh,
Thank you for your reply. I understand that W1 and Mn1 cannot be the main timeframe of the tester, and they are not as option in the drop down box to choose the timeframe.
But those bars, their OHLC, without modelling, should be accessible from a lower timeframe by all iFunc().
Also this didn't answer to the 1000 bars limitations on all the other regular timeframes.
The problem is that after few backtests, all seems to come back in order:
The Mn1 bars are ok and few minutes later many more bars are "found"; the W1 bars are also found (still with 1002 limitation)
2009.01.16 22:02:07 2008.09.15 23:59 ActivePivot EURUSD,M5: iBars Mn1: 234 2009.01.16 22:02:07 2008.09.15 23:59 ActivePivot EURUSD,M5: iBars W1: 0 2009.01.16 22:02:07 2008.09.15 23:59 ActivePivot EURUSD,M5: iBars D1: 1001 2009.01.16 22:02:07 2008.09.15 23:59 ActivePivot EURUSD,M5: iBars H4: 1006 2009.01.16 22:02:07 2008.09.15 23:59 ActivePivot EURUSD,M5: iBars H1: 1024 2009.01.16 22:02:07 2008.09.15 23:59 ActivePivot EURUSD,M5: iBars M30: 1048 2009.01.16 22:02:07 2008.09.15 23:59 ActivePivot EURUSD,M5: iBars M15: 1096 2009.01.16 22:02:07 2008.09.15 23:59 ActivePivot EURUSD,M5: iBars M5: 1288 2009.01.16 22:02:07 2008.09.15 23:59 ActivePivot EURUSD,M5: iBars M1: 2418
2009.01.16 22:19:35 2008.09.15 23:59 ActivePivot EURUSD,M5: iBars Mn1: 234 2009.01.16 22:19:35 2008.09.15 23:59 ActivePivot EURUSD,M5: iBars W1: 1003 2009.01.16 22:19:35 2008.09.15 23:59 ActivePivot EURUSD,M5: iBars D1: 1013 2009.01.16 22:19:35 2008.09.15 23:59 ActivePivot EURUSD,M5: iBars H4: 1068 2009.01.16 22:19:35 2008.09.15 23:59 ActivePivot EURUSD,M5: iBars H1: 1264 2009.01.16 22:19:35 2008.09.15 23:59 ActivePivot EURUSD,M5: iBars M30: 1527 2009.01.16 22:19:35 2008.09.15 23:59 ActivePivot EURUSD,M5: iBars M15: 2052 2009.01.16 22:19:35 2008.09.15 23:59 ActivePivot EURUSD,M5: iBars M5: 4133 2009.01.16 22:19:35 2008.09.15 23:59 ActivePivot EURUSD,M5: iBars M1: 16121
So two consecutive BTs do not give the same result because they do not use the same set of bars !!!
My question is: how to understand this behavior, and how the EA can know that the "pumping" is finished and the set of bars and the tester are stabilized ?

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