ADX With DI Cross Arrows
ADX with +DI and -DI is one of the most commonly plotted indicators and one of the hardest to actually read at a glance: the cross that matters can sit underneath the ADX line itself, or happen while ADX is below 20 and the market is simply ranging, which is exactly when a DI cross means the least. This indicator plots the three lines using the platform's own iADX() values, so the maths is unchanged, then adds a fourth layer: a bull or bear arrow drawn only at the bar where +DI actually crosses -DI, and only while ADX is at or above a configurable floor. The filter exists because a DI cross with ADX sitting at 12 is noise - both lines are close together and swap order constantly in a non-trending market. Requiring ADX above the floor before an arrow is drawn removes the crosses that fire during exactly the conditions ADX itself was built to flag as untrustworthy. Notes and limitations - The cross test compares the previous bar's +DI/-DI order against the current bar's, so it needs one prior bar of history and never marks the still-forming current bar. - This is a trend-strength and direction cue, not a full system. A marked cross says the DI lines swapped order while ADX was elevated - it does not size a position, place a stop, or account for spread and slippage. - Level lines are drawn at 20 and 25 to match common ADX reading conventions; they do not change behaviour, only the chart display.
Indicator · MT4 · v1.0 · Free
About ADX With DI Cross Arrows
ADX With DI Cross Arrows is an indicator for MetaTrader 4 based on ADX. It draws buy and sell arrows on the chart and can alert you with a pop-up, sound, email or push message. It has 3 settings, such as Adx period, Min adx and Alerts. MQL source code included.
Files in the download: AdxDiCross.ex4, AdxDiCross.mq4, AdxDiCross.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Adx period | 14 | ADX / DI period |
| Min adx | 20.0 | Minimum ADX level for a cross to be marked, 0 disables the filter |
| Alerts | true | Alert once per closed bar on a marked cross |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: ADX · Buy/Sell Arrows · Trend · Alerts · MT4 Indicator · MQL4 Source Code