What ADX Actually Measures
Most indicators tell you which direction the market is moving. ADX (Average Directional Index) tells you how strongly it is moving, regardless of direction. An ADX of 40 means a strong trend — it could be a strong uptrend or a strong downtrend. This makes ADX uniquely valuable as a filter rather than a signal generator.
ADX Interpretation
The API Response
// GET /v1/indicators?symbol=EURUSD&timeframe=H1
{
"success": true,
"data": {
"symbol": "EURUSD",
"timeframe": "H1",
"indicators": {
"ADX": 28.4,
"ADX_plusDI": 22.1,
"ADX_minusDI": 18.3
},
"updated_at": 1787229614
}
} The API returns three components: the ADX value itself, +DI (bullish directional index), and -DI (bearish directional index). While ADX measures strength, the DI lines tell you the direction.
ADX as a Strategy Router
The most powerful use of ADX is to switch between strategies based on market conditions. When the market is trending, use a trend-following strategy. When it is ranging, use a mean-reversion strategy.
import requests
API_KEY = "your_api_key_here"
BASE_URL = "https://tickatlas.com/v1"
def adaptive_strategy(symbol: str) -> str:
"""Switch strategies based on ADX reading."""
resp = requests.get(f"{BASE_URL}/indicators", params={
"symbol": symbol,
"timeframe": "H1",
}, headers={"X-API-Key": API_KEY})
data = resp.json()["data"]["indicators"]
adx = data["ADX"]
plus_di = data["ADX_plusDI"]
minus_di = data["ADX_minusDI"]
rsi = data["RSI_14"]
macd_hist = data["MACD_hist"]
if adx > 25:
# TRENDING MARKET — use MACD + DI direction
if plus_di > minus_di and macd_hist > 0:
return f"TREND BUY (ADX: {adx:.1f}, +DI: {plus_di:.1f})"
elif minus_di > plus_di and macd_hist < 0:
return f"TREND SELL (ADX: {adx:.1f}, -DI: {minus_di:.1f})"
else:
# RANGING MARKET — use RSI mean reversion
if rsi < 30:
return f"RANGE BUY (ADX: {adx:.1f}, RSI: {rsi:.1f})"
elif rsi > 70:
return f"RANGE SELL (ADX: {adx:.1f}, RSI: {rsi:.1f})"
return f"HOLD (ADX: {adx:.1f})"
# Scan pairs
for pair in ["EURUSD", "GBPUSD", "USDJPY", "XAUUSD"]:
print(f"{pair}: {adaptive_strategy(pair)}") DI Crossover Signals
The +DI and -DI lines generate directional signals. When +DI crosses above -DI, it signals a bullish trend. When -DI crosses above +DI, it signals bearish. But only take these signals when ADX confirms the trend is strong.
def di_crossover(symbol: str) -> str:
"""Detect DI crossover when ADX confirms trend strength."""
resp = requests.get(f"{BASE_URL}/indicators", params={
"symbol": symbol,
"timeframe": "H4",
}, headers={"X-API-Key": API_KEY})
ind = resp.json()["data"]["indicators"]
adx = ind["ADX"]
plus_di = ind["ADX_plusDI"]
minus_di = ind["ADX_minusDI"]
# Only signal when ADX > 20 (trend exists)
if adx < 20:
return "NO_TREND"
di_spread = abs(plus_di - minus_di)
# Strong directional move: large DI spread + high ADX
if plus_di > minus_di and di_spread > 5:
return f"BULLISH (ADX: {adx:.1f}, +DI leads by {di_spread:.1f})"
elif minus_di > plus_di and di_spread > 5:
return f"BEARISH (ADX: {adx:.1f}, -DI leads by {di_spread:.1f})"
return "NEUTRAL" ADX Patterns to Watch
Rising ADX from Below 20
A new trend is forming. This is the ideal time to enter a trend-following position. Check DI lines for direction.
ADX Above 40 and Falling
The trend is exhausting. Take profits on existing trend positions. Do not enter new trend trades.
ADX Below 20 for Extended Period
The market is in a tight range. This often precedes a significant breakout. Use Bollinger Band squeeze detection to catch the breakout.
DI Lines Converging
When +DI and -DI come close together, the trend is weakening. Prepare to switch from trend strategy to range strategy.
Why Every Bot Needs ADX
The single biggest improvement you can make to any trading bot is adding an ADX filter. Most false signals happen when trend strategies are applied to ranging markets, or range strategies are applied to trending markets. ADX solves this. It is not glamorous, but it is the difference between a bot that bleeds money during consolidation and one that stays flat, waiting for the right conditions.
Further Reading
Run this against live data.
Every account starts pay-as-you-go with $2.50 of credit and no card. Paste the key into the samples above and the requests work unchanged.