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)
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由使用,沒有任何限制 — 點擊此處了解更多。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由使用,沒有任何限制 — 點擊此處了解更多。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。