Pine Script (TradingView)
Ceci est un exemple de strategie Pine Script TradingView pour le concept de cette page. Collez-le dans l'editeur Pine TradingView, ajoutez-le au graphique, puis lancez Strategy Tester.
//@version=6
strategy("Arbitrage Strategy", overlay=true)
// Multi-factor: trend + momentum + volume confluence
trendLen = input.int(50, "Trend EMA")
rsiLen = input.int(14, "RSI Length")
volLen = input.int(20, "Volume EMA")
ema50 = ta.ema(close, trendLen)
r = ta.rsi(close, rsiLen)
avgVol = ta.ema(volume, volLen)
// All three factors must align
longSignal = close > ema50 and r > 50 and r < 70 and volume > avgVol * 1.2
shortSignal = close < ema50 and r < 50 and volume > avgVol * 1.2
if longSignal
strategy.entry("Long", strategy.long)
if shortSignal
strategy.close("Long")
plot(ema50, "Trend EMA", color=color.orange)