PINE LIBRARY
Updated AnnualizedReturnCalculator

Library "AnnualizedReturnCalculator"
TODO: add library description here
calculateAnnualizedReturn(isStartTime, enableLog)
Parameters:
isStartTime (bool): 开始时间的BOOL值变量(用于标记策略开始时间)
enableLog (bool): 是否输出日志
Returns: [annualizedReturn, annualizedReturn_equity, totalProfit, avgPositionValue]
返回持仓基准年化收益率、资金基准年化收益率、总收益、平均资金占用
TODO: add library description here
calculateAnnualizedReturn(isStartTime, enableLog)
Parameters:
isStartTime (bool): 开始时间的BOOL值变量(用于标记策略开始时间)
enableLog (bool): 是否输出日志
Returns: [annualizedReturn, annualizedReturn_equity, totalProfit, avgPositionValue]
返回持仓基准年化收益率、资金基准年化收益率、总收益、平均资金占用
Release Notes
v2已更新:
calculateAnnualizedReturn(isStartTime, enableLog)
Parameters:
isStartTime (bool): 开始时间的BOOL值变量(用于标记策略开始时间)
enableLog (bool): 是否输出日志
Returns: [annualizedReturn, annualizedReturn_equity, annualizedReturn_maxPosition, totalProfit, avgPositionValue]
返回持仓基准年化收益率、资金基准年化收益率、最大持仓基准年化收益率、总收益、平均资金占用
Pine library
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in publications is governed by House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Pine library
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in publications is governed by House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.