MA channel MTF midlle EA
- Experts
-
Dragan Joksimovic
MQL4 / MQL5 Expert Advisor and Indicator Developer
I develop and test Expert Advisors, indicators and trading utilities for MetaTrader 4 and MetaTrader 5 based on clearly defined trading rules.
My work includes:
• Expert Advisors for MT4 and MT5
• Custom indicators - Versão: 1.1
- Ativações: 5
**MA Channel MTF Middle EA** trades the breakout of the candle middle out of a higher-timeframe moving-average channel. The channel is calculated inside the EA — the moving average of the candle highs as the upper line, the moving average of the candle lows as the lower line, with the inputs you know from the built-in Moving Average (period, shift, method) — on the box timeframe of your choice, exactly as the MA Channel MTF Middle indicator draws it. The EA watches the middle of the candle in progress: the price halfway between the high and the low the candle has made so far. No grid, no martingale, no averaging against the trend.
**How it trades**
- Entry: the middle of the box candle crosses above the upper line — the EA buys; the middle crosses below the lower line — the EA sells. A candle whose middle is above the average of the recent highs has left the range of the last candles upwards; below the average of the lows, downwards. An optional band in points beyond the lines has to be passed as well.
- The trigger can be switched to the middle of the lower-timeframe candle for earlier entries.
- Exit: selectable — the opposite crossing only (the EA closes and reverses), the middle coming back inside the channel after the breakout, or the middle of the lower-timeframe candle crossing the middle of the current box candle. The opposite crossing can always close and reverse, and the positions can be closed automatically when the box candle ends.
- One entry per direction per box candle, never more; the first tick of a new candle never produces a signal by itself, and a position carried into a new candle is not closed just because the new candle starts inside the channel.
**Key features**
- Multi-timeframe by design: the box timeframe and the lower timeframe are inputs, so the EA works the same on any chart timeframe — attach it to one chart per symbol.
- Channel calculated inside the EA (same algorithms as the built-in MA), no indicator file needed; the channel and the middle of the current candle are drawn on the chart and shown in the info panel.
- Optional stop loss (fixed distance or beyond the opposite channel line), optional take profit (fixed distance or a multiple of the channel width), optional trailing stop.
- Fixed lot or risk percent of the balance per trade. Every order is checked against the free margin before it is sent — the lot is reduced to what the account allows, or the entry is skipped — and the stops are checked against the broker's stop level.
- Nothing is sent outside the trade sessions of the symbol, so daily breaks of metals and indices cause no rejected requests.
- Works on netting and hedging accounts. After a restart the EA recognizes its own positions and the entries already made in the current candle, so nothing is duplicated.
- Spread filter, ECN mode (open first, then set the stops), no DLL, no external files.
**What you can adjust**
Box timeframe, lower timeframe, period, shift and method of the channel; which middle triggers the entry; band beyond the lines; buy and sell separately; exit rule; close on the opposite crossing and at the end of the candle; stop loss, take profit and trailing stop; lot sizing; deviation, magic number, order comment, ECN mode; info panel, drawing and colors.
**Recommendations**
- Run the EA in the Strategy Tester (every tick based on real ticks) and find the box timeframe, lower timeframe and period that suit your symbol; a longer period gives a wider channel and fewer, larger breakouts.
- Typical combinations: an H1 channel with an M5 exit on forex majors and gold, an H4 channel with an M15 exit on indices.
- The "back inside the channel" exit keeps the trades short and is the natural stop for a breakout; the "opposite crossing" exit holds through pullbacks. Add a stop loss if you prefer a fixed risk per trade.
**Notes**
- The EA does not need the indicator to run; the MA Channel MTF Middle indicator is a separate product for chart analysis with the same channel and middle line.
- Trading involves risk. Test every setting on a demo account before using it on a live account.
