strategy.opentrades.profit_percent() - Pine Script Function
strategy.opentrades.profit_percent()
Section titled “strategy.opentrades.profit_percent()”Overview
Section titled “Overview”Returns the profit/loss of the open trade, expressed as a percentage. Losses are expressed as negative values.
Syntax
Section titled “Syntax”strategy.opentrades.profit_percent(trade_num) → series floatParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| trade_num | series int | The trade number of the closed trade. The number of the first trade is zero. |