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
Minor cosmetic fix, int => bool. Or if I may suggest returning AmountDeleteIntervals instead.
Thanks, will have to fix that.
Please consider AverageHolding as an addition to the library
Interval.mqh
BestInterval.mqh
Please consider AverageHolding as an addition to the library
Average life time of a closed position - what is it for?
This is not how it should be calculated. You need to know the closing time.
Average lifetime of a closed position - what is it for?
I am referring to the average life time of a position (OrderCloseTime - OrderOpentime). This can be useful as custom GA criteria. For example, lead GA to increase transaction frequency combined with a minimum profit per transaction threshold.
That's not how to calculate it. You need to know the closing time.
For the DEAL IN / OUT netting account the open time is sufficient for calculation, for proper implementation you need to use the close time, which is currently not accounted for in the library.
There is a problem that will remain. The tester forces the closing of the last position. Atomic clock accuracy may not be needed for all strategies, it will remain a problem. Also GA can be driven to a higher trading frequency by simply returning 0 when BestInterval.GetTotal () <xxx, for example as you wrote in some post.
That way it looks not worth it while trouble is chasing.
I am referring to the average life time of the position (OrderCloseTime - OrderOpentime). This can be useful as custom GA criteria. For example, lead GA to increase transaction frequency combined with a minimum profit per transaction threshold.
Give the optimisation criterion as a schematic source code of the OnTester function.
Forum on trading, automated trading systems and testing trading strategies
Libraries: BestInterval
fxsaber, 2019.12.05 13:48 PM.
To say I'm pleased is clearly an understatement.... BestInterval is awesome now. And the changes are minimal. As always, an example.
Here's a 24-hour pass.
We apply the classic BestInterval.
We can see that the profit has increased by one third, and other indicators have become better.
But we wanted flexibility. And here it is.
Profit didn't increase, it decreased! But look at the other indicators. Instead of finding the interval with the highest profit and probability of fitting, a much narrower interval was found, but much tastier than the classic.
The innovation is added like this
The quality of market pattern research is now very much improved. Significant implications for multi-tester work.
It is interesting that if the found so tasty interval is stuffed into the TS and start optimising it for maximum profit in it, there is a high probability that a bullshit will be found.
And another remark. BestInterval, for example, ignores trades opened from midnight to one hour. This does not mean that if a signal for opening comes at two o'clock, BestInterval will let you open it. Bibla will only open it if the ignored position from midnight is "closed". Therefore, you can often see that optimising a TS with a rigidly set interval gives worse results than BestInterval shows.
The most obvious example is a counter-trend TS on a trend. Let's assume that the TS gives a SELL signal and the trend is going up. BestInterval will ignore these signals.
I have noticed such a peculiarity, which is based on my experience.
If the Optimisation criterion has nothing to do with the smoothness of the profile curve. And the best result still gives a smooth curve, then it is not a fitting.
For example, the criterion is maximum profit. And the best pass results in a straight upward curve. That's not a fit.
But if the criterion is minimum R^2. And the best pass results in a straight up. That's probably a fit.
I have a dilemma, is BestInterval an independent Optimisation criterion or not? Especially with its Slippage assignment trick.
I.e. he says that if you ignore all trades that do not fall within the 18:00-12:00 interval, everything will be beautiful on the history.
I sew this interval into the TS, making the TS no longer round-the-clock, and optimise it for maximum profit.
The best pass of genetics is, to put it mildly, rubbish.
ZY This is still a weak example. It occurs when BestInterval has PF > 3 and Optimiser gives PF < 1.
I have a dilemma, is BestInterval an independent Optimisation criterion or not? Especially with its Slippage task chip.
In fact, Slippage is a commission. The higher the commission, the prettier the result BestInterval shows on the history.
It seems that the commission has nothing to do with market patterns.
Forum on trading, automated trading systems and testing trading strategies
Expert Advisors: Validate
fxsaber, 2020.08.23 07:44 AM
Probably didn't count on CloseBy trades when I wrote it. I don't remember anything anymore. It is quite likely that BestInterval has the same ailment. I'm not ready to edit it. Thanks for the information.
It looks like you are right. BestInterval gives different results both in terms of potential profit and time intervals for netting and hedging. I haven't looked at the details yet, but the Deals list looks incorrect at first glance, the opening time for CloseBy closes mostly falls on the opening time of the closing order.