Trend
ADX Signals: Trend Strength and DI Crosses
Interpret ADX strength and directional-index crosses, with a Pine Script example using explicit thresholds and closed-bar signals. No measured win rate is claimed.
ADX Signal Interpretation
Quick-reference guide to 5 signal types you will see on the chart.
| Signal Type | Indicator Condition | Market Meaning | Interpretation limits |
|---|---|---|---|
| ADX crosses a chosen threshold | ADX crosses above the configured level | The smoothed directional imbalance exceeded that level; ADX itself has no bullish or bearish sign. | Does not measure price speed or prove continuation. |
| +DI crosses above -DI | A confirmed cross with ADX above the chosen threshold | Positive directional movement changes relative ordering. This is the example’s bullish event. | A filter can still admit losing events. |
| -DI crosses above +DI | A confirmed reverse cross with the same ADX filter | Negative directional movement becomes larger under this calculation. | An ADX level does not rule out whipsaws. |
| ADX falls below the threshold | A confirmed downward ADX cross | Measured strength falls below the selected reference. | A falling ADX does not by itself signal price reversal. |
| Price extends while ADX weakens | Price makes another extreme and ADX is lower | Strength and price extension are different measurements. | Requires explicit swing definitions; not implemented as a divergence alert in this example. |
ADX Pine Script Signal Code
Educational indicator example. Review its exact rules and compare its plots with your intended calculation in TradingView. It does not place orders or establish profitability.
Pine Script v6
//@version=6
indicator("ADX and DI Condition Examples", overlay=false)
diLen = input.int(14, "DI Length", minval=1)
adxLen = input.int(14, "ADX Smoothing", minval=1)
threshold = input.float(25, "ADX Threshold", minval=0, maxval=100)
[plus, minus, adx] = ta.dmi(diLen, adxLen)
upCross = ta.crossover(plus, minus)
downCross = ta.crossunder(plus, minus)
strengthCross = ta.crossover(adx, threshold)
weaknessCross = ta.crossunder(adx, threshold)
bullish = barstate.isconfirmed and upCross and adx > threshold
bearish = barstate.isconfirmed and downCross and adx > threshold
strengthening = barstate.isconfirmed and strengthCross
weakening = barstate.isconfirmed and weaknessCross
plot(adx, "ADX", color=color.purple)
plot(plus, "+DI", color=color.green)
plot(minus, "-DI", color=color.red)
hline(threshold, "Selected threshold", color=color.gray)
plotshape(bullish, "Bullish DI cross", shape.triangleup, location.bottom, color=color.green, size=size.small)
plotshape(bearish, "Bearish DI cross", shape.triangledown, location.top, color=color.red, size=size.small)
alertcondition(bullish, "Bullish DI cross", "Confirmed positive DI cross with ADX above the selected threshold")
alertcondition(bearish, "Bearish DI cross", "Confirmed negative DI cross with ADX above the selected threshold")
alertcondition(strengthening, "ADX threshold crossed up", "Confirmed ADX cross above the selected threshold")
alertcondition(weakening, "ADX threshold crossed down", "Confirmed ADX cross below the selected threshold")Example settings for ADX
Record the inputs used by the example. These settings are not an optimized trading recommendation.
| Parameter | Default | Description |
|---|---|---|
| DI Length | 14 | Lookback for directional movement. The example uses TradingView’s ta.dmi calculation. |
| ADX Smoothing | 14 | Smoothing of directional imbalance; it is separate from DI Length. |
| ADX Threshold | 25, example | The same input controls the reference line and the DI-event filter. Compare alternatives using a fixed evaluation protocol, not an assumed best timeframe. |
| Event timing | Completed chart bar | Signals require barstate.isconfirmed. This is an indicator, with no entry, exit or position-size orders. |
Turn the condition into an explicit rule
Specify the calculation, confirmation time, entry and exit rules before asking Pineify to draft or revise Pine Script. Review the code and simulate realistic costs before evaluating a strategy.
Explore Pine Script codingRelated Resources
Official calculation and usage references
FAQ
ADX Signals FAQ
Should I add ADX or DMI in TradingView?
The built-in ADX displays strength. Use DMI when you also need +DI and -DI. The example below plots all three through ta.dmi.
Does ADX above 25 confirm a profitable trend?
No. Twenty-five is a reference convention, not a probability estimate. The direction comes from a separate rule, and costs and exits still matter.
Does a falling ADX mean I should reverse a position?
Not by itself. It measures reduced directional strength under its smoothing rule. Price can continue in the same direction while ADX falls.
How can I evaluate the example?
Record symbol, timeframe and inputs. Compare each marker with the DI cross and ADX filter on the same completed bar. Then define entries, exits and costs before measuring results on later data. No personal trade record or benchmark is presented.
What does the script omit?
It does not detect swing divergence, place orders, color price bars or establish a win rate. Alert delivery must be checked separately on new market data.