This Double extreme EA is a mid-term Expert Advisor supported defining two extreme points formed by indicators and comparing them to the worth extreme values.
Parameters
- Start_lot – the initial lot size. If the dynamic lot is disabled (risk=0), the lot size of orders is constant.
- risk – enable the dynamic lot with the required risk level.
- MaxOrders_InOneSet – the utmost number of orders in one set. 0 – no control. It allows you to flexibly limit the entire number of orders while allowing all sets to open orders (at least one at a time).
- MaxOrders_InSymbol – the utmost number of orders for the present symbol (the sum of all sets). 0 – no control.
- PartialCloseIfProfit_ATRs – partial closure. Close profitable orders if quite 3 orders within one set are open within the same direction and therefore the price exceeded > PartialCloseIfProfit_ATRs.
These settings are sufficient for trading.
![](https://www.forexcracked.com/wp-content/uploads/2020/03/2-1.jpg.webp)
EA Optimization
To improve trading, you’ll develop custom settings using optimization for a particular pair and write them to a clear text file:
“MetaTrader…\tester\files\DoubleExt.txt” – for testing, then copy to “MetaTrader…\MQL4\Files\DoubleExt.txt” – for trading.
The EA searches for the required settings file and takes the essential ones from the code if none are found.
The following parameters allow configuring the EA.
- OptimizationMode – enable/disable optimization mode. If OptimizationMode is enabled, the ForPeriod, Indicator, Ind_per, i3, i4, SL_ATRs, TPSL_koef, BreakEven_ATRs, TrailDist_ATRs, CoefExpr parameters are optimized. the simplest test results are placed within the specified document (by means of a copy-paste), and from there, when the OptimizationMode is off, the EA takes the parameters when trading.
- period – chart period (timeframe), that the optimization is performed.
- Set_number – default is 0 (all sets). it’s wont to analyze a selected set, one among those written to the file.
- Indicator – analyzed indicator for outlining extreme values: AO, RSI, CCI, Stochastic, MACD, RVI, WPR and Momentum.
- Ind_per – analyzed indicator period (not relevant for AO).
- i3 – method of defining a double decreasing top. It varies from 0 to three (see the image below).
- i4 – method of defining a double increasing top. It varies from 0 to three (see the image below).
- SL_ATRs – initial stop loss level within the number of averaged candles. Here and further below, the dimensions of a mean candle for the tested timeframe are defined by ATR(200) indicator.
- TPSL_coef – take profit/stop ratio . Recommended values are from 1 to 10.
- BreakEven_ATRs – breakeven level in ATRs. Recommended values are from 1 to 10.
- TrailDist_ATRs – the trailing distance in ATRs. Recommended values are from 1 to 10.
If BreakEven exceeds TrailDist, trailing does not start till the price breaks the BreakEven level. In other words, BreakEven restrains trailing.
If BreakEven is less than TrailDist, an order is moved to breakeven when the price reaches the BreakEven level. This level remains unchanged until the price breaks the TrailDist level. After that, the trailing starts.
- Coef_expr – the expressiveness of the double extremum – the ratio of rock bottom High to Low, to start out the pattern validation. The smaller the coefficient, the more expressed the pattern and therefore the less likely it’s to be found. Recommended optimization range: from 0.55 to 0.95. The default is 0.95.
- ShowProfitInfo – show/hide data on the EA’s current trading results.
- After optimization and analysis, select the foremost suitable test results and copy-paste them to the document. Enter a currency pair name, at which a particular result has been achieved, at the beginning of every line within the file (for example, “eurusd”) and press TAB (mandatory). These are going to be the sets, each of them working consistently with its own parameters. After optimization, save the file.
Set OptimizationMode=false and therefore the EA is prepared to trade consistent with your settings.
![Double extremum EA – [Cost 375$] - For FREE](https://www.forexcracked.com/wp-content/uploads/2020/03/4.gif)
![Double extremum EA – [Cost 375$] - For FREE](https://www.forexcracked.com/wp-content/uploads/2020/03/3.gif)
This EA can be profitable in the long term, if you have the patience to optimize it the right way, but keep in mind that it can have a high DD.
I love this system
How please upload your template setting
fail.. blow account in tester
Hi Admin
The Drop Box link does not work on this page. FYI. Thank you.