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)
Skrypt chroniony
Ten skrypt został opublikowany jako zamknięty kod źródłowy. Można z tego korzystać swobodnie i bez żadnych ograniczeń — więcej informacji znajduje się tutaj.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt chroniony
Ten skrypt został opublikowany jako zamknięty kod źródłowy. Można z tego korzystać swobodnie i bez żadnych ograniczeń — więcej informacji znajduje się tutaj.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.