Strategy with Optimized parameter - MT4/MT5 resources
Hi,
I'm developing a rules-based EA (for daily charts):
1. If yesterday's high and low values exceed _MinimumRange_, perform the following steps, otherwise skip
2. Get the entry price by multiplying yesterday's high and low values by _FiboLevel_
3. Add/subtract numbers
3a. Yesterday’s low if (yesterday’s closing price > yesterday’s opening price) [Add]
3b. Yesterday’s high point if (yesterday’s closing price < yesterday’s opening price) [sub]
4. If today’s price touches the entry price calculated in step 2, then
4a. If [yesterday’s closing price > yesterday’s opening price] then go long
4b. If [yesterday’s closing price < yesterday’s opening price] then go short. Note: Open a position only if there is no identical position (long/short) open.
5. Each open position will only be closed when it hits sl or tp
6. sl and tp can be set through the _slmarg_ and _tpmarg_ parameters
Notice:
Each variable in the _xxx_ format is a parameter of the EA
To get the best combination of parameters, I ran the optimizer with 3 different variables: _slmarg_, _tpmarg_ and _MinimumRange_, and got the following results (attached in the zip file as Donny_01_Optimizer.xls)
The top five most “profitable” results are:
No net profit, total number of transactions, profit coefficient, expected return, drawdown percentage, param1 param2 param3 param4 param5 Net_Profit/Max_Drawdown
122 32392.6 298 1.24 108.7 11483.4 39.64% slmarg=120 tpmarg=90 Minimum range=170 FiboLevel=0 Lot=1 2.820819618
31 32596.4 407 1.15 80.09 18463.7 56.69% slmarg=120 tpmarg=110 Minimum range=150 FiboLevel=0 Lot=1 1.765431631
259 34172.4 211 1.38 161.95 9365.4 22.64% slmarg=120 tpmarg=90 Minimum range=190 FiboLevel=0 Lot=1 3.648792363
44 36006.1 394 1.16 91.39 20349.6 56.87% slmarg=120 tpmarg=130 Minimum range=150 FiboLevel=0 Lot=1 1.769376302
38 36085.2 401 1.16 89.99 17072.5 53.12% slmarg=120 tpmarg=120 Minimum range=150 FiboLevel=0 Lot=1 2.11364475
Considering the maximum drawdown, I tried to re-run iteration combination 259, whose net profit was 34172 and %DD was 22.65%
This is the result of this parameter combination (file Donny10.htm)
I ran {link removed} with historical data from January 1, 2002 to February 1, 2007
This makes me wonder if I'm doing something wrong, the question is:
1. Can what I do be considered “curve fitting”?
2. What is the probability that a strategy with this combination will perform well under real-world conditions?
(forward test) data?
Please advise as I am still learning how to test strategies using EA.
Thanks,
I'm developing a rules-based EA (for daily charts):
1. If yesterday's high and low values exceed _MinimumRange_, perform the following steps, otherwise skip
2. Get the entry price by multiplying yesterday's high and low values by _FiboLevel_
3. Add/subtract numbers
3a. Yesterday’s low if (yesterday’s closing price > yesterday’s opening price) [Add]
3b. Yesterday’s high point if (yesterday’s closing price < yesterday’s opening price) [sub]
4. If today’s price touches the entry price calculated in step 2, then
4a. If [yesterday’s closing price > yesterday’s opening price] then go long
4b. If [yesterday’s closing price < yesterday’s opening price] then go short. Note: Open a position only if there is no identical position (long/short) open.
5. Each open position will only be closed when it hits sl or tp
6. sl and tp can be set through the _slmarg_ and _tpmarg_ parameters
Notice:
Each variable in the _xxx_ format is a parameter of the EA
To get the best combination of parameters, I ran the optimizer with 3 different variables: _slmarg_, _tpmarg_ and _MinimumRange_, and got the following results (attached in the zip file as Donny_01_Optimizer.xls)
The top five most “profitable” results are:
No net profit, total number of transactions, profit coefficient, expected return, drawdown percentage, param1 param2 param3 param4 param5 Net_Profit/Max_Drawdown
122 32392.6 298 1.24 108.7 11483.4 39.64% slmarg=120 tpmarg=90 Minimum range=170 FiboLevel=0 Lot=1 2.820819618
31 32596.4 407 1.15 80.09 18463.7 56.69% slmarg=120 tpmarg=110 Minimum range=150 FiboLevel=0 Lot=1 1.765431631
259 34172.4 211 1.38 161.95 9365.4 22.64% slmarg=120 tpmarg=90 Minimum range=190 FiboLevel=0 Lot=1 3.648792363
44 36006.1 394 1.16 91.39 20349.6 56.87% slmarg=120 tpmarg=130 Minimum range=150 FiboLevel=0 Lot=1 1.769376302
38 36085.2 401 1.16 89.99 17072.5 53.12% slmarg=120 tpmarg=120 Minimum range=150 FiboLevel=0 Lot=1 2.11364475
Considering the maximum drawdown, I tried to re-run iteration combination 259, whose net profit was 34172 and %DD was 22.65%
This is the result of this parameter combination (file Donny10.htm)
I ran {link removed} with historical data from January 1, 2002 to February 1, 2007
This makes me wonder if I'm doing something wrong, the question is:
1. Can what I do be considered “curve fitting”?
2. What is the probability that a strategy with this combination will perform well under real-world conditions?
(forward test) data?
Please advise as I am still learning how to test strategies using EA.
Thanks,
Attachment to original post (1)
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •