GetUnrealizedProfitLoss()
<< Click to Display Table of Contents >> GetUnrealizedProfitLoss() |
Calculates the unrealized PnL for the account position.
A double value representing the account's unrealized PnL.
PositionAccount.GetUnrealizedProfitLoss(PerformanceUnit unit, double price)
Note: If no double argument is provided, double.MinValue will be used. |
unit |
Possible values: PerformanceUnit.Percent PerformanceUnit.Pips PerformanceUnit.Points PerformanceUnit.Ticks |
price |
Price used to calculate the PnL such as Close[0]. This value is used as the current price and compared against your entry price for the PnL. |
protected override void OnBarUpdate() |