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("Supply & Demand Zones", overlay=true)
emaFast = ta.ema(close, 20)
emaSlow = ta.ema(close, 50)
bullStructure = close > emaFast and emaFast > emaSlow
bearStructure = close < emaFast and emaFast < emaSlow
liquidityGrab = low < ta.lowest(low, 10)[1] and close > open
longSignal = bullStructure and liquidityGrab
exitSignal = bearStructure
if longSignal
strategy.entry("Long", strategy.long)
if exitSignal
strategy.close("Long")
plot(emaFast, "Fast", color=color.aqua)
plot(emaSlow, "Slow", color=color.orange)