Discussing the article: "Build Self Optimizing Expert Advisors in MQL5 (Part 6): Self Adapting Trading Rules (II)"

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
Check out the new article: Build Self Optimizing Expert Advisors in MQL5 (Part 6): Self Adapting Trading Rules (II).
This article explores optimizing RSI levels and periods for better trading signals. We introduce methods to estimate optimal RSI values and automate period selection using grid search and statistical models. Finally, we implement the solution in MQL5 while leveraging Python for analysis. Our approach aims to be pragmatic and straightforward to help you solve potentially complicated problems, with simplicity.
In our last discussion on self adapting trading rules, linked here, we considered the problems faced by an algorithmic trader attempting to follow best practices on how to follow the RSI indicator.
We found that the standardized results aren’t always generated by the indicator, depending on several factors, such as the period, time frame and also the particular market in question.
To resolve this issue, we postulated that algorithmic traders could rather study the true range of the indicator, so they can readjust the midpoint of the indicator, to the middle of its observed range, and not its total possible range. Doing so, gives us some guarantees about the generation of trading signals, that we cannot obtain from the traditional rules of the RSI. We gained additional control over the new signal by recording an average deviation from the mid-point, and only registering signals generated by multiples of the average deviation.
We shall now advance beyond our initial attempt to build a practical solution. There are several improvements we can make over our last attempt. The integral improvement we seek is the ability to try to estimate the value of our chosen RSI levels.
In our last discussion, we simply assumed that deviations significantly larger than the average deviation could tend to be more profitable. However, we did not attempt to measure if this was true. We made no attempt to quantify the value of the new levels we are proposing and compare them against the value of the traditional levels, 70 and 30.
Additionally, our last discussion considered the case where the RSI period was fixed. This simplifying assumption made our framework easier to understand. Today, we turn our attention to the opposite end of the problem, when the practitioner is uncertain of the right period to use.
Author: Gamuchirai Zororo Ndawana