Dears,
first of all currently i'm using MQL5 for coding and during my coding on a strategy, i figured out there is a limited amount of history exist on each timeframe during backtesting.
as an example there is almost one year data exist for H1 timeframe over back test. this means if i start from 2019.01.01, the oldest date price which i have access to is 2018.01.02.
ISSUE 1: the main issue comes when i need to capture price information from 2014.01.01 (5 years) to calculate some changes.
unfortunately i couldn't find a proper way unless use below method which is not really good as it will waste time during back test :
it would be appreciated if anybody can inform me if there is a way to load more than basic specified period over backtesting.
ISSUE 2: is there any function to inform me what date selected as Tester start or end date?
No. But it can be done with WinAPI calls.
Thanks man,
on Issue1 : the way you suggested is the same way as i mentioned above. but as you know over strategy tester ontick event will run for all of those candles which are not useful at all (4 Years over ever tick is a real waste)
i thought maybe real experts like you have something or trick in their mind which seams not possible
on Issue2 : good hint. I got your point clearly and maybe i should go for it but frankly i never did this before. can you please drop a clue on my
hand
ISSUE 2: is there any function to inform me what date selected as Tester start or end date?
start: TimeCurrent() in OnInit()
end: TimeCurrent() in OnTester()

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dears,
first of all currently i'm using MQL5 for coding and during my coding on a strategy, i figured out there is a limited amount of history exist on each timeframe during backtesting.
as an example there is almost one year data exist for H1 timeframe over back test. this means if i start from 2019.01.01, the oldest date price which i have access to is 2018.01.02.
ISSUE 1: the main issue comes when i need to capture price information from 2014.01.01 (5 years) to calculate some changes.
unfortunately i couldn't find a proper way unless use below method which is not really good as it will waste time during back test :
it would be appreciated if anybody can inform me if there is a way to load more than basic specified period over backtesting.
ISSUE 2: is there any function to inform me what date selected as Tester start or end date?