Pine Script (TradingView)
هذا مثال استراتيجية Pine Script على TradingView لمفهوم هذه الصفحة. الصقه في Pine Editor داخل TradingView، اضفه الى الرسم البياني، ثم شغله في Strategy Tester.
//@version=6
strategy("Ichimoku Cloud Strategy", overlay=true)
conv = (ta.highest(high, 9) + ta.lowest(low, 9)) / 2
base = (ta.highest(high, 26) + ta.lowest(low, 26)) / 2
spanA = (conv + base) / 2
spanB = (ta.highest(high, 52) + ta.lowest(low, 52)) / 2
longSignal = close > math.max(spanA, spanB) and conv > base
exitSignal = close < base
if longSignal
strategy.entry("Long", strategy.long)
if exitSignal
strategy.close("Long")
plot(conv, "Conversion", color=color.aqua)
plot(base, "Base", color=color.orange)