BreakChannelExp is an Expert Advisor for trading Moving Average channels.
- The EA is a versatile tool with many settings and operation modes.
- Expansion of the functionality in the new versions with full compatibility with older versions.
- Deals are performed only when a new bar is opened (at Open prices) for fast testing and optimization.
- The EA works with any amount of quote digits.
- The EA is resistant to unstable power supply and connection to a broker. As soon as connection is restored, the orders are managed by the EA again.
- The EA has been developed for USD accounts, though you can use a fixed lot for other accounts.
- The EA is accompanied by auxiliary MQL4 programs that I am going to post in the Comments section.
It is possible to create various trading systems based on the Moving Average channels by using different combinations of parameters.
A detailed description of the input parameters for the current version of the EA is available in the Comments section.
==== MM ====
Block of the money management parameters. You can select a fixed lot, risk in USD or a percentage of the balance.
==== Exit ====
Block of exit parameters.
- PeriodAverageHL - period in bars on the current chart for calculating the average High-Low (AverageHL). The parameters below with the names starting with "Percent" are calculated as a percentage of AverageHL.
- KexpTS - Trailing Stop smoothing factor (0..1).
- KexpTP - Take Profit approximation factor (0..1).
- PercentMinProfitExpTP - minimum profit that Take Profit approaches to.
- ModeExp - maintenance and exiting mode (0..6).
==== Entry ====
Block of entry parameters.
- MAChannelPeriod - period of the Moving Average for the signal channel.
- PercentHalfChannel - half of the signal channel width.
- ModeTrend - trend mode (0..5).
- MATrendPeriod - period of the Moving Average for the trend channel.
- PercentHalfTrend - half of the trend channel width.
- ModeReverse - entry mode.
==== Averaging ====
Block of averaging parameters. If the averaging mode is disabled, Stop Loss is used. If enabled, averaging is used instead of Stop Loss.
- ModeAveraging - averaging mode. 0 - disabled, 1,2 - enabled.
- PercentStepOrders - parameters for the step between orders.
- MAAveragingPeriod - parameters for the averaging channel.
- PercentProfitOneOrder - parameters for profit per order in the series.
- QntOrdersFastExit - parameters for quick exit.
- KIncLot - parameters for the lot increase ratio.
- MaxOrders - parameters for limiting by orders or drawdown.
==== Optional ====
Block of additional parameters.
==== Tester ====
Block of parameters for the genetic optimization using "Custom".
The default parameters of the EA are merely an example of using the EA.
For most parameters, a value of 0 means disabled/not used, the same applied to invalid values, for example, negative numbers.
Attention! Profits in the past do not guarantee profits in the future. Test Expert Advisors carefully before buying.
- Added optimization features.
- Optimized the code.
- The filter can be used during a market entry for the price reversal back to the channel (ModeReverse = true).
- A few minor fixes.
Now, it is displayed as a Moving Average channel with a large period.
There may be 3 states depending on the price position:
- The price exceeding the channel means uptrend
- The price above the channel means downtrend
- The price inside the channel means flat
ModeTrend switch has 6 states:
0 - do not use the trend
1 - enter only by the trend
2 - enter only against the trend
3 - enter only during the flat
4 - enter by the trend and during the flat
5 - enter against the trend and during the flat
- Added new averaging mode features.
- Added optimization features.
- Fixed logical errors.
- Lot calculation logic changed.
- Added averaging mode with lot increasing.
- Parameter ModeExp is extended to 6 possible values (0..5).
- Default values are changed to less "optimized" (defaults are for EURUSD M15). At that, the balance curve has remained steady for the entire history starting from year 2000.
- Updated input parameters (defaults are for EURUSD M15).