PINE LIBRARY
已更新 New_Concepts_in_Technical_Trading_Systems

Library "New_Concepts_in_Technical_Trading_Systems"
A library for trading with mathematical indicators as described by J. Welles Wilder Jr. in 1978
psar(highSeries, lowSeries, closeSeries, start, increment, max)
psar calculates the parabolic SAR for the given series. Uses defaults as described by Wilder
Parameters:
highSeries (float): the series of high price values
lowSeries (float): the series of low price values
closeSeries (float): the series of close price values
start (float): the initial acceleration factor
increment (float): amount the acceleration factor is incremented each step
max (float): the maximum acceleration factor
Returns: the value of the stop and reverse price
momentum(closeSeries)
momentum calculates the momentum value, representing an acceleration of the current trend direction. Also calculates the trend balancing point which is a pivot to the momentum increasing or decreasing.
Parameters:
closeSeries (float): the series of close price values
Returns: the value of the momentum and the next trend balance point
A library for trading with mathematical indicators as described by J. Welles Wilder Jr. in 1978
psar(highSeries, lowSeries, closeSeries, start, increment, max)
psar calculates the parabolic SAR for the given series. Uses defaults as described by Wilder
Parameters:
highSeries (float): the series of high price values
lowSeries (float): the series of low price values
closeSeries (float): the series of close price values
start (float): the initial acceleration factor
increment (float): amount the acceleration factor is incremented each step
max (float): the maximum acceleration factor
Returns: the value of the stop and reverse price
momentum(closeSeries)
momentum calculates the momentum value, representing an acceleration of the current trend direction. Also calculates the trend balancing point which is a pivot to the momentum increasing or decreasing.
Parameters:
closeSeries (float): the series of close price values
Returns: the value of the momentum and the next trend balance point
版本注释
v2 - where I realized the I've gotten the concepts wrong when looking at momentum.I previously thought the trend balancing point was the same for long and short directions, which gave me weird results using a strategy on top of it. Realizing that, I thought it to be much more ergonomic using separate functions for the balance points instead of returning a tuple of values.
new:
nextTrendBalancePointShort(closeSeries)
calculates the trend balance point for the next candle when short
Parameters:
closeSeries (float): the series of close price values
Returns: the point the price must close above in order to reverse the current position
nextTrendBalancePointLong(closeSeries)
calculates the trend balance point for the next candle when long
Parameters:
closeSeries (float): the series of close price values
Returns: the point the price must close below in order to reverse the current position
changed:
psar(highSeries, lowSeries, closeSeries, start, increment, max)
calculates the parabolic SAR for the given series. Uses defaults as described by Wilder
Parameters:
highSeries (float): the series of high price values
lowSeries (float): the series of low price values
closeSeries (float): the series of close price values
start (float): the initial acceleration factor
increment (float): amount the acceleration factor is incremented each step
max (float): the maximum acceleration factor
Returns: the value of the stop and reverse price
momentum(closeSeries)
calculates the momentum value, representing an acceleration of the current trend direction
Parameters:
closeSeries (float): the series of close price values
Returns: the value of the momentum
Pine脚本库
本着真正的TradingView精神,作者将此Pine代码发布为开源库,以便我们社区的其他Pine程序员可以重复使用它。向作者致敬!您可以私密或在其他开源出版物中使用此库,但在出版物中重复使用此代码受网站规则约束。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
Pine脚本库
本着真正的TradingView精神,作者将此Pine代码发布为开源库,以便我们社区的其他Pine程序员可以重复使用它。向作者致敬!您可以私密或在其他开源出版物中使用此库,但在出版物中重复使用此代码受网站规则约束。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。