//@version=5
indicator("🔥 All-in-One Trading System", overlay=true)
// === Supertrend ===
Periods = input.int(10, title="ATR Period")
Multiplier = input.float(3.0, title="ATR Multiplier")
src = input.source(hl2, title="Source")
atr = ta.rma(ta.tr, Periods)
up = src - Multiplier * atr
dn = src + Multiplier * atr
up := close[1] > nz(up[1]) ? math.max(up, nz(up[1])) : up
dn := close[1] < nz(dn[1]) ? math.min(dn, nz(dn[1])) : dn
trend = 0
trend := nz(trend[1], 1)
trend := trend == -1 and close > dn[1] ? 1 : trend == 1 and close < up[1] ? -1 : trend
plot(trend == 1 ? up : na, title="Up Trend", color=color.green)
plot(trend == -1 ? dn : na, title="Down Trend", color=color.red)
plotshape(trend == 1 and trend[1] == -1, title="Buy", location=location.belowbar, style=shape.labelup, text="BUY", color=color.green)
plotshape(trend == -1 and trend[1] == 1, title="Sell", location=location.abovebar, style=shape.labeldown, text="SELL", color=color.red)
// === Ichimoku ===
conversionPeriods = input.int(9, title="Tenkan-sen")
basePeriods = input.int(26, title="Kijun-sen")
spanPeriods = input.int(52, title="Senkou Span B")
displacement = input.int(26, title="Displacement")
tenkan = (ta.highest(high, conversionPeriods) + ta.lowest(low, conversionPeriods)) / 2
kijun = (ta.highest(high, basePeriods) + ta.lowest(low, basePeriods)) / 2
senkouA = (tenkan + kijun) / 2
senkouB = (ta.highest(high, spanPeriods) + ta.lowest(low, spanPeriods)) / 2
plot(tenkan, color=color.red)
plot(kijun, color=color.blue)
plot(close, offset=-displacement, color=color.teal, title="Chikou")
plot(senkouA[displacement], color=color.purple)
plot(senkouB[displacement], color=color.green)
fill(plot(senkouA[displacement]), plot(senkouB[displacement]), color=color.new(color.green, 85))
// === Harmonic label ===
label.new(bar_index, high, "HARMONIC ACTIVE", style=label.style_label_left, color=color.orange, textcolor=color.white)
// === RSI ===
rsi = ta.rsi(close, 14)
plot(rsi, title="RSI", color=color.fuchsia)
hline(70, "Overbought", color=color.red)
hline(30, "Oversold", color=color.green)
// === Stochastic ===
k = ta.sma(ta.stoch(close, high, low, 14), 1)
d = ta.sma(k, 3)
plot(k, title="%K", color=color.blue)
plot(d, title="%D", color=color.orange)
// === MACD ===
macd = ta.ema(close, 12) - ta.ema(close, 26)
signal = ta.ema(macd, 9)
hist = macd - signal
plot(macd, title="MACD", color=color.lime)
plot(signal, title="Signal", color=color.red)
plot(hist, title="Hist", style=plot.style_columns, color=hist > 0 ? color.green : color.red)
// === Momentum ===
momentum = close - close[10]
plot(momentum, title="Momentum", color=color.fuchsia)
Comments
Post a Comment