input string InpKPeriod_P = "18|9|3|24"; //STO K period: it is necessary to optimize
input string InpUpperLevel_P = "96|88|2|98"; //STO upper level: it is necessary to optimize
Note that parameters are declared with string type, parameters are compound and includedefault values,start value of optimisation ,step and end value of optimisation .
input string InpKPeriod_P = "18||9||3||24||N"; //STO K period: it is necessary to optimize input string InpUpperLevel_P = "96||88||2||98||Y"; //STO upper level: it is necessary to optimize
It seems wrong to have two different implementations of the trade - in real and virtual - it is easy to assume non-identity. Ideally, it should be the same method called from OnTick directly with the real environment or from the optimiser with the virtual environment.
And the parallelism of optim isation is still missing. It is logical to run each group/roy/and-other-analogous-independent-agents in a separate copy of the Expert Advisor, i.e. a dedicated thread(for example).
It seems wrong to have two different implementations of trading - real and virtual - it is easy to allow non-identity. Ideally it should be the same method called from OnTick directly with real environment or from optimiser with virtual environment.
And the parallelism of optim isation is still missing. It is logical to run each group/roy/and-other-analogous-independent-agents in a separate copy of the Expert Advisor, i.e. a dedicated thread(for example).
Yes, of course, I agree with everything.
But the task was to show a really very simple example, accessible to a wide range of users, including those who are not familiar with programming.
And so, of course, ideally you need full identity of virtual and real, and you can parallelise everything easily if you have all the logic in virtual.
Finally, a good example of an application of your articles on optimisation.
Thank you.
Interesting article, it should raise interest in the series of articles published by you!
Of course, the disadvantage of the proposed implementation is the lack of universality of the approach, i.e. it is necessary to completely rewrite the existing Expert Advisor and introduce a virtual tester with many functions into it. Of course, the advantage of the approach is the acceptable speed of work due to virtual indicators.
Have you tried to use not chart ranges for optimisation, but sets of such previously selected settings for each indicator/predictor? This approach significantly reduces the search area, but I understand that not all algorithms will work properly, as there is no smooth change from parameter to parameter, or is it not crucial?
Are there any planned articles on other possibilities of algorithms application, along the lines outlined in this article:
- Portfolio Management. Optimisation algorithms can help determine the optimal asset allocation in a portfolio to achieve given objectives. For example, optimisation techniques such as the Mean-Variance Optimisation (Mean-Variance Matrix) can be used to find the most efficient set of assets given expected returns and risk. This may include determining the optimal mix of stocks, bonds and other assets, as well as optimising position sizes and portfolio diversification.
- Selecting the best trading instruments. Optimisation algorithms can help in selecting the best trading instruments or assets to trade. For example, optimisation algorithms can be used to rank assets based on various criteria such as return, volatility or liquidity.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Check out the new article: Using optimization algorithms to configure EA parameters on the fly.
The article discusses the practical aspects of using optimization algorithms to find the best EA parameters on the fly, as well as virtualization of trading operations and EA logic. The article can be used as an instruction for implementing optimization algorithms into an EA.
I often get asked questions about how to apply optimization algorithms when working with EAs and strategies in general. In this article I would like to look at the practical aspects of using optimization algorithms.
In today's financial world, where every millisecond can make a huge difference, algorithmic trading is becoming increasingly necessary. Optimization algorithms play a key role in creating efficient trading strategies. Perhaps some skeptics believe that optimization algorithms and trading have no common ground. However, in this article I will show how these two areas can interact and what benefits can be obtained from this interaction.
For novice traders, understanding the basic principles of optimization algorithms can be a powerful tool in finding profitable trades and minimizing risks. For seasoned professionals, deep knowledge in this area can open up new horizons and help create sophisticated trading strategies that exceed expectations.
Self-optimization in an EA is a process involving the EA adapting its trading strategy parameters to achieve better performance based on historical data and current market conditions.
Author: Andrey Dik