PINE LIBRARY
更新済 SlopeUtils

Library "SlopeUtils"
calcSlope(src, atr_series, length)
Calculates a normalized slope based on price change relative to ATR.
Parameters:
src (float): (series float) The source input (e.g., close).
atr_series (float): (series float) The ATR value for normalization.
length (simple int): (simple int) The lookback period for the slope calculation.
Returns: (float) The normalized slope value.
calcSlope(src, atr_series, length)
Calculates a normalized slope based on price change relative to ATR.
Parameters:
src (float): (series float) The source input (e.g., close).
atr_series (float): (series float) The ATR value for normalization.
length (simple int): (simple int) The lookback period for the slope calculation.
Returns: (float) The normalized slope value.
リリースノート
v2Added:
calcLinRegSlope(src, length, use_atr)
Calculates a statistically sound slope using Linear Regression.
Parameters:
src (float): (series float) The source input (e.g., close or SMA).
length (simple int): (simple int) The lookback period.
use_atr (bool): (bool) Whether to normalize the slope by ATR.
Returns: (float) The slope of the regression line.
リリースノート
v3Updated:
calcLinRegSlope(src, length, atr_val)
Calculates a statistically sound slope using Linear Regression.
Parameters:
src (float): (series float) The source input (e.g., close or SMA).
length (simple int): (simple int) The lookback period.
atr_val (float)
Returns: (float) The slope of the regression line.
Pineライブラリ
TradingViewの精神に則り、作者はこのPineコードをオープンソースライブラリとして公開してくれました。コミュニティの他のPineプログラマーが再利用できるようにという配慮です。作者に拍手を!このライブラリは個人利用や他のオープンソースの公開コンテンツで使用できますが、公開物でのコードの再利用はハウスルールに準じる必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
Pineライブラリ
TradingViewの精神に則り、作者はこのPineコードをオープンソースライブラリとして公開してくれました。コミュニティの他のPineプログラマーが再利用できるようにという配慮です。作者に拍手を!このライブラリは個人利用や他のオープンソースの公開コンテンツで使用できますが、公開物でのコードの再利用はハウスルールに準じる必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。