Sign up >>
1M intrabar ticks in strategy tester
To add comments, please
There is a significant weakness in the way that the strategy tester generates intrabar ticks for 1M charts. The effect is that, for some strategies that set a tight
, the tester consistently underestimates the strategy's performance.
Consider the situation where the price is rising quickly - say by 8-10 pips in each of two consecutive bars, and that open == low, and close == high. The quotes in this case would be generally rising in real life. That is, it's very unlikely that the quotes would go from the open to (near) the high, then to (near) the low, then to the close. But in the tester, this happens a lot.
The practical result is that if you have a stop set on a strategy that's less then the size of the bar, and you go long near the top of the bar, the tester almost always shows a loss
within the bar
. In real life, however, it's very unlikely that the trade would lose within the bar, because the price is not very likely to drop that far below the enter price.
The solution might be to:
- Start at the open
- If the close is greater than the open, generate a tight fractal fill to the low, then to the high, then to the close.
- If the close is greater than the open, generate a tight fractal fill to the high, then the low, then the close
Wasn't there supposed to be a way to use tick data in the .fxt files, or some such? Wasn't MQ supposed to publish an artcile on how to do this?
Well, yes, you can import tick data through the history center. But when you do, the strategy tester just uses it to compute the open, high, low and close for whatever chart you're testing against, and then interpolates its own ticks from those four values at each bar. I don't believe that there's any way to have the tester use real ticks, but I'd love to be proven wrong on that point!
Slawa said he was going to publish an article on how to do it. Guess its just oen more thing they haven't gotten around to yet. There must be some serious things going on under the hood. I wonder how many programmers work on MT4.
To add comments, please
Online trading / WebTerminal
Free technical indicators and robots
Articles about programming and trading
Order trading robots on the Freelance
Market of Expert Advisors and applications
Follow forex signals
Low latency forex VPS
News, implementations and technology
MQL5 language of trading strategies
MQL5 Cloud Network
Terms and Conditions
Privacy and Data Protection Policy
Contacts and requests
Join us — download
Tradays Economic Calendar
Not a broker, no real trading accounts