Analysis of test results and optimisation in the MetaTrader 5 strategy tester - page 16
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
That's what I ended up doing.
Then the slip problem is solved.
I think it is, yes, solved. No orders - no slippage.
😹
And at the same time there is no non-execution of them on "missed" during tick generation ask prices. Except for the stop out, of course.....chasing the regime at opening prices clearly implies a willingness to be more loyal to accuracy.
Anyway, you can't edit the count mode even in a custom symbol.
You can do a lot of things post-processing the history in OnTesterDeinit.
So I went down the path of creating a custom symbol in the beginning. I thought that turning OHLC into OHHLLC (O-Hbid-Hask-Lbid-Lask-C) would solve the problem. But it didn't solve the problem - it only introduced more discrepancies in the tests, so I didn't investigate the reasons further. Now I understand what the reason is - in the different mechanism of triggering orders in the Open Price Only mode and the Real Tickmode (for OHHLLC to work, you need to run the custom symbol in the Real Tick mode). Because in the first case triggering will go without sliding, and in the second case with sliding, and if you make six ticks from one bar, especially if the bar is not M1, but for example H1, this sliding will make the test results obviously inadequate.
And take into account that the All ticks mode generates a stream of ticks from minute bars, i.e. within a minute the spread is fixed by the value that is set once in a minute bar(most likely by the value that was at the opening). Real ticks are the only adequate intra-minutes model in MT5 tester. I did not realise this for a long time and used All ticks everywhere in tests. Until one day recently I got a picture of a completely opposite profitability chart with the All ticks and Real ticks modes on one of my Expert Advisors (in that Expert Advisor there is a very close to the price trawl of orders, which was made within the spread).
Well, it kind of goes without saying - if you generate special ticks, you need to enable work on them.
And the spread is most likely taken from the M1 bar, and the minimum spread per bar is prescribed in bars, and this is the problem - departure from reality.
And the spread is most likely taken from the M1 bar, and the minimum spread per bar is prescribed in bars, and that's the problem - a departure from reality.
Just OnTester, I guess.
A lot can be done by post-processing the story in OnTester.
And here's another thing. From the very beginning of programming in MQL5, I have included in the engine a table with the data of the brokerage centres I have dealt with. Commissions, average spread, average slippage, clock translation rule (US/EU)....
I read from the account, where I am connected to, what type of account (demo/real, in rare cases you can define cent account), and take data from the table.
Checked, it matches: using only one CustomTicksReplace is enough.