Watch how to download trading robots for free
Find us on Facebook!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Indicators

ADX Auto Range - indicator for MetaTrader 5

Conor Mcnamara
Conor Mcnamara
I started learning C programming in 2010. From there I picked up many languages.
I'm working on several indicator projects and EA concepts.
Views:
28
Published:
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

This indicator automates the identification of market consolidation ranges by measuring fading trend strength via the Average Directional Index (ADX). Instead of relying on subjective price-action analysis, it systematically detects when a strong rally or trend is dying and starts drawing a consolidation range around the choppy market area where it would be considered extremely risky to trade inside.


Sensitivity (InpSlopeBars): Determines how far back each strength reading compares (ADX[shift] vs. ADX[shift - InpSlopeBars]).

1 = Noisy/Fast (one-bar difference)

2 = Balanced (ignores a single up-tick inside a decline)

4+ = Macro Fade (slower, broader detection)


Confirmation (InpDeclineBars): Specifies how many consecutive negative slope readings must occur before a range box is officially opened.

With 1 you get a single sample: ADX[t] < ADX[t-2]. Setting it to 2 it also requires ADX[t-1] < ADX[t-3]; at 3 you add ADX[t-2] < ADX[t-4]. 


InpEndOnStrengthRise: when true, an open range is also closed as soon as strength rises (ADX[t] > ADX[t-2], using the same slope), in addition to a breakout. It only affects closing, never opening, and a box still needs InpMinRangeBars to be drawn. false means ranges only end on a genuine price breakout meaning that the range will only conclude once the candles close above the high of the range, or below the low of the range. Price breaking out of the range does not always conclude a breakout, as in a bearish trend, sometimes the price can push upwards slightly out of the range before the real bearish move happens.

InpBreakoutPercent: Minimum percentage of a candle's total range that must close outside the boundary to validate a breakout.

InpMinRangeBars: Minimum bar width required for a range box to be finalized and drawn on the chart.


adx range boxes 1adx range boxes 2

Broker GMT offset and daylight-time rule from price history Broker GMT offset and daylight-time rule from price history

Detects the broker's GMT offset and its daylight-time rule (fixed, US or European) from the weekly closes in the H1 history, the same way live and in the Strategy Tester, with functions that convert New York times to server time and back.

Partial Close Multi TP Manager Partial Close Multi TP Manager

Partial close expert advisor for MetaTrader 5: closes a percent of the position at TP1, TP2, TP3, TP4 and TP5, moves the stop loss to breakeven and trails it. Works on manual trades and on positions of any EA, on any symbol, Gold (XAUUSD) included. Open source code.

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

MACD Signals MACD Signals

Indicator edition for new platform.