Skip to content
Algo Trade Analytics Docs

strategy.opentrades.max_runup_percent() - Pine Script Function

Returns the maximum run-up of the open trade, i.e., the maximum possible profit during the trade, expressed as a percentage and calculated by formula: Highest Value During Trade / (Entry Price x Quantity) * 100.

strategy.opentrades.max_runup_percent(trade_num) → series float
NameTypeDescription
trade_numseries intThe trade number of the closed trade. The number of the first trade is zero.