PROTECTED SOURCE SCRIPT
CHOP Debug

//version=6
indicator("CHOP Debug", overlay=false)
// your f_chop from the strategy
f_chop(_len) =>
atr_sum = math.sum(ta.atr(1), _len)
pr_range = ta.highest(high, _len) - ta.lowest(low, _len)
safe_range = pr_range != 0 ? pr_range : 1e-10
100 * math.log10(atr_sum / safe_range) / math.log10(_len)
// input & compute
chopLen = input.int(14, "CHOP Length")
chopVal = f_chop(chopLen)
// plot CHOP line
plot(chopVal, color=color.purple, title="CHOP(14)")
hline(60, color=color.gray, title="Threshold")
// optional: show value as a label at the last bar
if barstate.islast
label.new(bar_index, chopVal, text=str.tostring(chopVal, format.mintick),
yloc=yloc.price, style=label.style_label_left,
color=color.purple, textcolor=color.white)
indicator("CHOP Debug", overlay=false)
// your f_chop from the strategy
f_chop(_len) =>
atr_sum = math.sum(ta.atr(1), _len)
pr_range = ta.highest(high, _len) - ta.lowest(low, _len)
safe_range = pr_range != 0 ? pr_range : 1e-10
100 * math.log10(atr_sum / safe_range) / math.log10(_len)
// input & compute
chopLen = input.int(14, "CHOP Length")
chopVal = f_chop(chopLen)
// plot CHOP line
plot(chopVal, color=color.purple, title="CHOP(14)")
hline(60, color=color.gray, title="Threshold")
// optional: show value as a label at the last bar
if barstate.islast
label.new(bar_index, chopVal, text=str.tostring(chopVal, format.mintick),
yloc=yloc.price, style=label.style_label_left,
color=color.purple, textcolor=color.white)
保護スクリプト
このスクリプトのソースコードは非公開で投稿されています。 無料かつ制限なしでご利用いただけます ― 詳細についてはこちらをご覧ください。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
保護スクリプト
このスクリプトのソースコードは非公開で投稿されています。 無料かつ制限なしでご利用いただけます ― 詳細についてはこちらをご覧ください。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。