PINE LIBRARY
Updated Backtesting

Library "Backtesting"
curve(disp_ind)
Call function to get a certain curve of your strategy.
Parameters:
disp_ind (string)
Returns: Returns type of curve plot.
cleaner(disp_ind, plot)
Call function to filter out your Strategy plots
Parameters:
disp_ind (string)
plot (float)
backtestTable(option, position)
Assign this function to a random variable to get the "Performance Table"
Parameters:
option (simple string)
position (simple string)
curve(disp_ind)
Call function to get a certain curve of your strategy.
Parameters:
disp_ind (string)
Returns: Returns type of curve plot.
cleaner(disp_ind, plot)
Call function to filter out your Strategy plots
Parameters:
disp_ind (string)
plot (float)
backtestTable(option, position)
Assign this function to a random variable to get the "Performance Table"
Parameters:
option (simple string)
position (simple string)
Release Notes
v7 i thinkRelease Notes
v3Release Notes
v4Release Notes
v6Release Notes
v6Release Notes
v7Release Notes
v8Release Notes
v9Release Notes
v10Release Notes
v11Release Notes
v12Release Notes
v13Release Notes
v14Release Notes
v15Release Notes
v16Release Notes
v17Release Notes
v18Release Notes
v19Updated:
calculateMaxDrawdown(_equityCurve, startDate)
Parameters:
_equityCurve (float)
startDate (int)
Release Notes
v20Release Notes
v21Added:
buyandhold(startPrice, startDate)
Parameters:
startPrice (float)
startDate (int)
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.