strategy.opentrades.max_drawdown_percent

strategy.opentrades.max_drawdown_percent

strategy.opentrades.max_drawdown_percent is a BullScript™ function you can use in a strategy. The editor offers it. If the name is not known, the script stops on that line.

Example#

bullscript
strategy.opentrades.max_drawdown_percent(0)

The script enters long on bar 0 and leaves that position open. On a 20-bar daily book, bar 0 logged NaN and bar 19 logged 9.900990099.