This is AI generated Signal Base on Supertrend, RSI, And Volume Base indicator to create code
![]()
//@version=6
strategy(
title = "Crypto 15M Volume + Supertrend + RSI Strategy",
overlay = true,
initial_capital = 10000,
default_qty_type = strategy.percent_of_equity,
default_qty_value = 10,
pyramiding = 0
)
//━━━━━━━━━━ INPUTS ━━━━━━━━━━//
atrLen = input.int(14, "ATR Length")
slATR = input.float(1.5, "Stop Loss ATR")
tpATR = input.float(3.0, "Take Profit ATR")
rsiLen = input.int(14, "RSI Length")
rsiMid = input.int(50, "RSI Filter Level")
stLen = input.int(10, "Supertrend ATR Length")
stFactor = input.float(3.0, "Supertrend Factor")
volLen = input.int(20, "Volume MA Length")
pivotLen = input.int(5, "Pivot Length")
//━━━━━━━━━━ INDICATORS ━━━━━━━━━━//
atr = ta.atr(atrLen)
rsi = ta.rsi(close, rsiLen)
[superTrend, trendDir] = ta.supertrend(stFactor, stLen)
// Volume logic
volMA = ta.sma(volume, volLen)
highVol = volume > volMA
// Volume-based Support & Resistance
ph = ta.pivothigh(high, pivotLen, pivotLen)
pl = ta.pivotlow(low, pivotLen, pivotLen)
var float volRes = na
var float volSup = na
if not na(ph) and highVol[pivotLen]
volRes := high[pivotLen]
if not na(pl) and highVol[pivotLen]
volSup := low[pivotLen]
//━━━━━━━━━━ ENTRY CONDITIONS ━━━━━━━━━━//
longCond = ( trendDir == 1 and rsi > rsiMid and not na(volSup) and close > volSup )
shortCond = ( trendDir == -1 and rsi < rsiMid and not na(volRes) and close < volRes )
//━━━━━━━━━━ EXECUTION ━━━━━━━━━━//
if longCond
strategy.entry("LONG", strategy.long)
if shortCond
strategy.entry("SHORT", strategy.short)
//━━━━━━━━━━ ATR SL / TP ━━━━━━━━━━//
if strategy.position_size > 0
strategy.exit(
"LONG EXIT",
"LONG",
stop = strategy.position_avg_price - atr * slATR,
limit = strategy.position_avg_price + atr * tpATR
)
if strategy.position_size < 0
strategy.exit(
"SHORT EXIT",
"SHORT",
stop = strategy.position_avg_price + atr * slATR,
limit = strategy.position_avg_price - atr * tpATR
)
//━━━━━━━━━━ VISUALS ━━━━━━━━━━//
plot(superTrend, color = trendDir == 1 ? color.green : color.red, linewidth=2)
plot(volSup, title="Volume Support", color=color.new(color.green, 0))
plot(volRes, title="Volume Resistance", color=color.new(color.red, 0))