Discussion of article "Developing a self-adapting algorithm (Part II): Improving efficiency" - page 3
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
It's interesting to see how meaningful settings were selected. That's a whole topic.
There are several key modes. For example, open positions on every candle or with a skip or only if the price for Sell positions has risen or fallen for Buy positions. I ran these modes and compared the results. We start from the mode of opening positions on each candle. If the profit falls strongly, but the drawdown does not fall strongly, then the mode is bad. For example, the profit fell by 2 times, and the drawdown by 1.1 times. This mode is not good. But if the profit has fallen by 2 times and the drawdown by 1.5 times, then we look at the maximum number of deals in the series. If the maximum number of deals has significantly decreased, for example, also by 1.5 times, it may have a positive effect on stability in the future. That is, the mode is not impressive at the moment, but we know that a large number of deals is more dangerous for the deposit. So we find the optimal one and leave it. These modes work equally for any instrument, because they are characteristics of the algorithm itself. So I will use the mode of skipping candlesticks to open positions. This is done with all modes of operation. We see which one works more interesting for the current task.
I optimise the parameters by a complete search. For example, I set the minimum number of candlesticks 30, the maximum 300 and optimise the minimum number of candlesticks in steps of 2, while the maximum number remains stable. In addition, I set the number of samples to be analysed. Start with 1, maximum let it be 30. And I optimise the percentage for opening. I set the closing in profit at 1ATR fixed value. After the optimisation is done, I look at the parameters from which the stability starts. It works like this: as the opening percentage increases and the minimum number of candlesticks increases and the number of samples increases, the quality of the signal increases, but the profitability decreases. That's why I find the minimum stable parameters and then add them to the reserve. For example, I found that candlestick range 58-300, percentage 58, number of samples 7 are stable parameters with adequate risk/profitability ratio. So I increase the minimum number of candles to 68-300, raise the percentage by one, 59, add up to 9 samples and check how stable it works, if I am not mistaken, there is a reserve in the future for fluctuations of price series parameters, it is good, I leave the settings.
Now we need to tighten the profitability. The smaller the ATR coefficient for profit taking, the more stable it is. Therefore, I start optimising this parameter. From 1 already passes, so let's try from 1 to 3 with a step of 0.1. We see that as the value increases, the profit grows, but at one point the stability disappears. Let it is stable up to the value of 1.5. Then let's leave these 0.5 candles for the change of market characteristics and let it work with the value of 1.
There is another point here. We trade candles, and a profit of 1 candle per position is normal, especially if we do not open on every candle. But there is a spread, we need to understand its size. Let a candle be 0.0015 in size and the spread is 0.0001 on average. 0.0001/0,0015=0,066. 6.6% of profit from the candle is eaten by the spread. So it is better to make profit not 1ATR (100%), but 1-0.066=0.93. I will round up to have a margin down and ATR = 0.9 (90%) is a normal value.
That is all I am writing about, you need to understand the pattern you are using very well to make it easy to operate with the results. I do not use abstract indicator readings, but quite specific features, because it is possible to analyse them logically.
In a final, polished product there should be a minimum of settings. But in an experimental one you usually start with a large number, gradually understand the interrelationships, optimise or fix many parameters. In the last indicator I made 2 parameters out of 4. And in kodobase it is just the code for experiments.
What matters here is what is in the final product for the consumer. I do not sell this robot (although it could and it is better than most of the market) But I understand that the buyer will not understand what is there to what, I have no illusions. When you are both a developer and a trader, the final product is in constant modification mode. You make one version, refine it for real, it trades, while it trades, you make another, remove something, add something, in the end, the next version is stable again, but you have to comb the beauty.... And also in parallel you need to attract customers) It makes sense when you have a team of 10 people, but when you are one/two, it is better to spend resources on development.
In other words, everything I write about, you need to understand very well the pattern you are using, so that it is easy to operate with the results. I do not use abstract indicator readings, but quite specific features just because they can be logically analysed in this way.
Thank you, that's very clear.
Such a meaningful manual optimisation, and sometimes with a complete overkill)
why?
Because FOREX....
By the way, I have 48 settings in my FORTS Expert Advisor (together with chart parameters)
The real yield is lower than the calculated one because the test was conducted with overestimated spreads, and the algorithm works in such a way that the higher the spread, the higher the yield. The situation is not paradoxical, stability decreases as the spread increases.
Maxim, thanks for the articles!
Comment on the highlighted please. I can't imagine a situation where buying at a higher price and selling at a lower price will give a higher yield (unless we are talking about broker yield, of course).
Maxim, thanks for the articles!
Please comment on the highlighted one. I can't imagine a situation in which buying at a higher price and selling at a lower price will give a higher return (unless we are talking about the broker's return, of course).
It's a paradox.) This is because of the way profit is controlled. It is controlled in points from the opening price to the closing price. It turns out that if the spread is small, the profit level crosses the threshold value and the series is completed. But if the spread is large, the profit may not be enough to trigger the closing conditions and the series continues. If the series continues, new positions are opened. And since the average profit on open positions is controlled, the more positions, the more profit. So it turns out that with a larger spread there are more positions, and accordingly more profit. But a large spread affects stability. The more positions, the higher the risk of closing in a loss.
Got it, thanks.
It would be more logical to correctly formulate the conditions for closing a series, of course. So that they do not depend so much on the spread.
But I have already realised that the next step is to switch to MT5. I will keep watching.
Got it, thanks.
It would be more logical to correctly formulate the conditions for closing a series, of course. So that they would not depend so much on the spread.
But I have already realised that the next step is to switch to MT5. I will keep watching.
MT5 + MOEX
Got it, thanks.
It would be more logical to correctly formulate the conditions for closing a series, of course. So that they would not depend so much on the spread.
But I have already realised that the next step is to switch to MT5. I'll keep an eye on it.
Good evening.
I suspect that in line 256 sign 87 made a mistake\ a typo, instead of "-" looks very well "=".
Please confirm, I'll correct it myself, or maybe some hidden meaning I do not understand, error not burn, burns as Warning.