PROTECTED SOURCE SCRIPT
InstColorRare

//version=5
indicator("InstColorRare-OnlyBarColor", shorttitle="InstRareOBC", overlay=true)
// ── 1) Inputs ────────────────────────────────────────────────
nVol = input.int(50, "MA Volume Period", minval=1)
thU = input.float(2.5,"Ultra Threshold", minval=0.1, step=0.1)
thVH = input.float(2.0,"Very Threshold", minval=0.1, step=0.1)
thH = input.float(1.5,"High Threshold", minval=0.1, step=0.1)
thL = input.float(0.6,"Low Threshold", minval=0.0, step=0.1)
cdU = input.int(3, "Cooldown Ultra", minval=0)
cdV = input.int(2, "Cooldown Very", minval=0)
// ── 2) Cálculos ──────────────────────────────────────────────
volMA = ta.sma(volume, nVol)
volRel = volume / volMA
// ── 3) Classificação Sato pura (sem spread) ─────────────────
rawU = volRel >= thU
rawV = volRel >= thVH
rawH = volRel >= thH
rawL = volRel <= thL
// aplica cooldownes
isU = rawU and ta.barssince(rawU[1]) > cdU
isV = rawV and not isU and ta.barssince(rawV[1]) > cdV
isH = rawH and not isU and not isV
isL = rawL
// ── 4) Só barcolor, nada mais ───────────────────────────────
col = isU ? color.rgb(190,39,39) : // Ultra
isV ? color.rgb(202,125,8) : // Very
isH ? color.rgb(224,208,59) : // High
isL ? color.rgb(178,218,252) : // Low
color.white // Normal
barcolor(col)
indicator("InstColorRare-OnlyBarColor", shorttitle="InstRareOBC", overlay=true)
// ── 1) Inputs ────────────────────────────────────────────────
nVol = input.int(50, "MA Volume Period", minval=1)
thU = input.float(2.5,"Ultra Threshold", minval=0.1, step=0.1)
thVH = input.float(2.0,"Very Threshold", minval=0.1, step=0.1)
thH = input.float(1.5,"High Threshold", minval=0.1, step=0.1)
thL = input.float(0.6,"Low Threshold", minval=0.0, step=0.1)
cdU = input.int(3, "Cooldown Ultra", minval=0)
cdV = input.int(2, "Cooldown Very", minval=0)
// ── 2) Cálculos ──────────────────────────────────────────────
volMA = ta.sma(volume, nVol)
volRel = volume / volMA
// ── 3) Classificação Sato pura (sem spread) ─────────────────
rawU = volRel >= thU
rawV = volRel >= thVH
rawH = volRel >= thH
rawL = volRel <= thL
// aplica cooldownes
isU = rawU and ta.barssince(rawU[1]) > cdU
isV = rawV and not isU and ta.barssince(rawV[1]) > cdV
isH = rawH and not isU and not isV
isL = rawL
// ── 4) Só barcolor, nada mais ───────────────────────────────
col = isU ? color.rgb(190,39,39) : // Ultra
isV ? color.rgb(202,125,8) : // Very
isH ? color.rgb(224,208,59) : // High
isL ? color.rgb(178,218,252) : // Low
color.white // Normal
barcolor(col)
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarle liberamente e senza alcuna limitazione – ulteriori informazioni qui.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarle liberamente e senza alcuna limitazione – ulteriori informazioni qui.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.