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 הזה כספרייה בקוד פתוח, כך שמתכנתים אחרים בקהילתנו יעשו שימוש חוזר. כל הכבוד למחבר! ניתן להשתמש בספרייה הזו באופן פרטי או בומים בקוד פתוח, אך השימוש בחוזר בקוד הזה בפרסומים כפוף ל-כללי הבית.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
ספריית Pine
ברוח האמיתית של TradingView, המחבר לפרסם את הקוד של Pine הזה כספרייה בקוד פתוח, כך שמתכנתים אחרים בקהילתנו יעשו שימוש חוזר. כל הכבוד למחבר! ניתן להשתמש בספרייה הזו באופן פרטי או בומים בקוד פתוח, אך השימוש בחוזר בקוד הזה בפרסומים כפוף ל-כללי הבית.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.