The Confluence Approach
Instead of relying on a single indicator, score each signal and sum them up. More indicators agreeing = higher confidence in the trade.
Confluence Scoring System
import requests
API_KEY = "YOUR_API_KEY"
BASE = "https://tickatlas.com/v1"
headers = {"X-API-Key": API_KEY}
def confluence_score(symbol, timeframe="H1"):
"""Score a symbol based on multiple indicator signals."""
params = {
"symbols": symbol,
"indicators": "RSI_14,MACD_main,MACD_signal,ADX,SMA_50,SMA_200,BB_upper,BB_lower",
"timeframe": timeframe
}
resp = requests.get(f"{BASE}/multi", headers=headers, params=params).json()
ind = resp["data"]["data"].get(symbol, {})
score = 0 # -4 (strong sell) to +4 (strong buy)
# RSI
rsi = ind.get("RSI_14", 50)
if rsi < 30: score += 1 # Oversold = bullish
elif rsi > 70: score -= 1 # Overbought = bearish
# MACD
macd = ind.get("MACD_main", 0)
signal = ind.get("MACD_signal", 0)
if macd > signal: score += 1
elif macd < signal: score -= 1
# Trend (SMA Golden/Death Cross)
sma50 = ind.get("SMA_50", 0)
sma200 = ind.get("SMA_200", 0)
if sma50 > sma200: score += 1
elif sma50 < sma200: score -= 1
# ADX trend strength
adx = ind.get("ADX", 0)
if adx > 25: score = int(score * 1.5) # Amplify in strong trends
return {
"symbol": symbol,
"score": score,
"signal": "STRONG BUY" if score >= 3 else
"BUY" if score >= 1 else
"NEUTRAL" if score == 0 else
"SELL" if score >= -2 else "STRONG SELL",
"details": {"rsi": rsi, "macd": macd, "adx": adx,
"sma50": sma50, "sma200": sma200}
}
# Test it
for sym in ["EURUSD", "GBPUSD", "XAUUSD", "USDJPY"]:
result = confluence_score(sym)
print(f"{result['symbol']}: {result['signal']} (score: {result['score']})") Best Indicator Combinations
Production hardening
The code above is the happy path. These are the concerns that decide whether it survives contact with a real deployment.
Related Guides
Everything this guide touches, linked directly — so it never dead-ends.