Loading…

Donchian Channel With Arrows

A Donchian breakout is only meaningful if the channel it breaks out of was already there before the breaking bar formed. The naive version of this indicator tests the current bar's close against the current bar's own channel - but the current bar's own high and low feed directly into that same channel, so a big enough bar cannot help but "break" a channel it just built itself. That self-referencing comparison always fires and it fires on noise. This indicator tests the close of bar i against the channel computed one bar further back, at bar i+1, which is the channel that genuinely existed before bar i's own high and low could influence it. The channel lines themselves still track the live, forming bar so the bands do not visually lag price by a bar - only the breakout test does, and only because it has to. Notes and limitations - A breakout is only ever evaluated on a CLOSED bar (index 1 and older). The forming bar (index 0) never carries an arrow, so a signal appears at earliest one full bar after the close that produced it - this is by design, not a delay bug, and it is what stops the indicator repainting. - The channel lines themselves are live on the forming bar and can still move before that bar closes, even though no arrow will appear on it. - Only one arrow shape is used per direction; nothing distinguishes a narrow breakout from a wide one beyond the arrow's fixed position. - No trade or stop-loss logic - this is a visual/alerting tool only.

Indicator · MT5 · v1.0 · Free

About Donchian Channel With Arrows

Donchian Channel With Arrows is an indicator for MetaTrader 5. It draws buy and sell arrows on the chart and can alert you with a pop-up, sound, email or push message. It has 5 settings, such as Period, Alerts and Arrow up. MQL source code included.

Files in the download: DonchianArrows.ex5, DonchianArrows.mq5, DonchianArrows.txt.

Settings

SettingDefaultWhat it does
Period20Donchian period, bars
AlertstrueAlert on a closed-bar breakout
Arrow up233Wingdings code, upward breakout
Arrow down234Wingdings code, downward breakout
Arrow gap10Arrow offset from price, points

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Breakout · Channels & Envelopes · Buy/Sell Arrows · Alerts · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria