My Second approach was to use basic "Slow Complete Algorithm" and run it 28 time for different pairs (As I understand you cant run it for all pairs all together, which sucks). But it has other issue.
This is for AUDCAD
SETTING 1 | SETTING 2 | SETTING 3 | SETTING 4 | WIN | LOSE | NET PROFIT |
8 | 1 | 1 | 1 | 121 | 85 | -9951.08 |
9 | 1 | 1 | 1 | 118 | 86 | -15275.7 |
10 | 1 | 1 | 1 | 117 | 87 | -18077.98 |
11 | 1 | 1 | 1 | 117 | 81 | -7426.18 |
12 | 1 | 1 | 1 | 117 | 81 | -7427.41 |
14 | 1 | 1 | 1 | 118 | 82 | -7863.16 |
This is for EURUSD
8 | 1 | 1 | 1 | 135 | 81 | 17852.25 |
9 | 1 | 1 | 1 | 137 | 81 | 21052.82 |
10 | 1 | 1 | 1 | 134 | 82 | 14093.7 |
11 | 1 | 1 | 1 | 133 | 83 | 10414.74 |
12 | 1 | 1 | 1 | 131 | 83 | 7532.35 |
13 | 1 | 1 | 1 | 130 | 84 | 4047.51 |
14 | 1 | 1 | 1 | 131 | 83 | 7661.77 |
As you can see Setting 1 = 13 is missed in AUDCAD. So "Slow Complete Algorithm" misses some indicator values randomly.
I also tried to run "Slow Complete Algorithm" and change pairs inside of code by using mql5. The issue is when you actually run optimization in MT5 you need to choose some pair. Assume I chose EURUSD and then chose AUDCAD. Results will be completly different.
To summurize I am stuck. How can I optimize indicator inputs for 28 pairs? Is there easier way? May be I am missing something here
OnTick -> … C1Handle = iCustom(_
Perhaps you should read the manual, especially the examples.
How To Ask Questions The Smart Way. 2004
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
Technical Indicators - Reference on algorithmic/automated trading language for MetaTrader 5
Timeseries and Indicators Access / CopyBuffer - Reference on algorithmic/automated trading language for MetaTrader 5
How to start with MQL5 - General - MQL5 programming forum - Page 3 #22 2020.03.08
How to start with MQL5 - MetaTrader 5 - General - MQL5 programming forum - Page 7 #61 2020.07.05
How to call indicators in MQL5 - MQL5 Articles 12 March 2010
Perhaps you should read the manual, especially the examples.
How To Ask Questions The Smart Way. 2004
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
Technical Indicators - Reference on algorithmic/automated trading language for MetaTrader 5
Timeseries and Indicators Access / CopyBuffer - Reference on algorithmic/automated trading language for MetaTrader 5
How to start with MQL5 - General - MQL5 programming forum - Page 3 #22 2020.03.08
How to start with MQL5 - MetaTrader 5 - General - MQL5 programming forum - Page 7 #61 2020.07.05
How to call indicators in MQL5 - MQL5 Articles 12 March 2010
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hey All,
I want to run optimization algo for multiple currencies. To give example lets assume I will use QQE Histogram to buy or sell. It has following potential input values:
I want to find the most optimized value for those inputs for all 28 pairs.I had several approaches without any success:
1. So my first approach was to use "All Symbols Select Market Watch" and change indicator
So for each tick I change one of the inputs and update handler function.
This is how openTrade looks like:
I could not find any property that is distinct for each trade action. So I tried to use stoploss and takeprofit and create unique pair(Cantor Pair) out of those values and put indicator information into object.So idea is I will have object like this:
{
122.122 : EURUSD13
12221.122: EURUSD15
}
I will use this object like this:
When Take Profit or Stop Loss is hit, I take stop losss and take profit infos from MqlTradeTransaction and create cantor unique value like 122.122. Then I get indicator settings from the object(I called it stuff).
So stuff = EURUSD13. Then I write result to some file : EURUSD13SL or EURUSD13TP. I have another scripts which reads this file and understands total number of wins and loses for each pair and settings.
But the issue is stop loss and take profit values are not unique. For example if RSIPeriod=13 and RSIPeriod=14.All entry points are same. So the question for this method is what property can I use to distunguish each setting when I catch them in Stop Loss or Take Profit