Calculates the value of this position.
Namespace:
RightEdge.CommonAssembly: Common (in Common.dll) Version: 2010.1.0.0 (2010.1.0.0)
Syntax
| C# |
|---|
public double GetCurrentValue( PositionStats stats, double currentPrice, IAccountInfo accountInfo ) |
| Visual Basic (Declaration) |
|---|
Public Function GetCurrentValue ( _ stats As PositionStats, _ currentPrice As Double, _ accountInfo As IAccountInfo _ ) As Double |
| Visual C++ |
|---|
public: double GetCurrentValue( PositionStats^ stats, double currentPrice, IAccountInfo^ accountInfo ) |
Parameters
- stats
- Type: RightEdge.Common..::.PositionStats
The PositionStats object corresponding to the most recent trade at the time you want to calculate the value of this position.
- currentPrice
- Type: System..::.Double
The current price of the instrument that is being traded.
- accountInfo
- Type: RightEdge.Common..::.IAccountInfo
An object which provides account information.
Return Value
The current value of this position.
Remarks
The current value is effectively the amount that would be added to your account if
the position were closed at currentPrice, not including commissions
paid for the closing trade.