OPEN-SOURCE SCRIPT
My script

//version=6
strategy("Elite Option Signal Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// === INPUTS ===
fastLength = input.int(9, title="Fast MA Length")
slowLength = input.int(21, title="Slow MA Length")
trendLength = input.int(50, title="Trend MA Length")
rsiLength = input.int(14, title="RSI Length")
rsiOversold = input.int(30, title="RSI Oversold Level")
rsiOverbought = input.int(70, title="RSI Overbought Level")
useStopLoss = input.bool(true, title="Use Stop Loss?")
stopLossPercent = input.float(2.0, title="Stop Loss %", minval=0.1, maxval=10.0)
// === INDICATORS ===
fastMA = ta.sma(close, fastLength)
slowMA = ta.sma(close, slowLength)
trendMA = ta.sma(close, trendLength)
rsi = ta.rsi(close, rsiLength)
// === CONDITIONS ===
bullishTrend = close > trendMA
bearishTrend = close < trendMA
longCondition = ta.crossover(fastMA, slowMA) and bullishTrend and rsi < rsiOverbought
shortCondition = ta.crossunder(fastMA, slowMA) and bearishTrend and rsi > rsiOversold
// === EXECUTION ===
if longCondition
strategy.entry("Long", strategy.long)
if useStopLoss
strategy.exit("Exit Long", "Long", stop=close * (1 - stopLossPercent / 100))
if shortCondition
strategy.entry("Short", strategy.short)
if useStopLoss
strategy.exit("Exit Short", "Short", stop=close * (1 + stopLossPercent / 100))
// === PLOTS ===
plot(fastMA, color=color.green, title="Fast MA")
plot(slowMA, color=color.red, title="Slow MA")
plot(trendMA, color=color.blue, title="Trend MA")
plotshape(longCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.triangleup)
plotshape(shortCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.triangledown)
strategy("Elite Option Signal Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// === INPUTS ===
fastLength = input.int(9, title="Fast MA Length")
slowLength = input.int(21, title="Slow MA Length")
trendLength = input.int(50, title="Trend MA Length")
rsiLength = input.int(14, title="RSI Length")
rsiOversold = input.int(30, title="RSI Oversold Level")
rsiOverbought = input.int(70, title="RSI Overbought Level")
useStopLoss = input.bool(true, title="Use Stop Loss?")
stopLossPercent = input.float(2.0, title="Stop Loss %", minval=0.1, maxval=10.0)
// === INDICATORS ===
fastMA = ta.sma(close, fastLength)
slowMA = ta.sma(close, slowLength)
trendMA = ta.sma(close, trendLength)
rsi = ta.rsi(close, rsiLength)
// === CONDITIONS ===
bullishTrend = close > trendMA
bearishTrend = close < trendMA
longCondition = ta.crossover(fastMA, slowMA) and bullishTrend and rsi < rsiOverbought
shortCondition = ta.crossunder(fastMA, slowMA) and bearishTrend and rsi > rsiOversold
// === EXECUTION ===
if longCondition
strategy.entry("Long", strategy.long)
if useStopLoss
strategy.exit("Exit Long", "Long", stop=close * (1 - stopLossPercent / 100))
if shortCondition
strategy.entry("Short", strategy.short)
if useStopLoss
strategy.exit("Exit Short", "Short", stop=close * (1 + stopLossPercent / 100))
// === PLOTS ===
plot(fastMA, color=color.green, title="Fast MA")
plot(slowMA, color=color.red, title="Slow MA")
plot(trendMA, color=color.blue, title="Trend MA")
plotshape(longCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.triangleup)
plotshape(shortCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.triangledown)
Skrypt open-source
W duchu TradingView twórca tego skryptu udostępnił go jako open-source, aby traderzy mogli analizować i weryfikować jego funkcjonalność. Brawo dla autora! Możesz korzystać z niego za darmo, ale pamiętaj, że ponowna publikacja kodu podlega naszym Zasadom Społeczności.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.
Skrypt open-source
W duchu TradingView twórca tego skryptu udostępnił go jako open-source, aby traderzy mogli analizować i weryfikować jego funkcjonalność. Brawo dla autora! Możesz korzystać z niego za darmo, ale pamiętaj, że ponowna publikacja kodu podlega naszym Zasadom Społeczności.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.