Calculates the value of this position.

Namespace: RightEdge.Common
Assembly: 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
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
)
F#
member GetCurrentValue : 
        stats : PositionStats * 
        currentPrice : float * 
        accountInfo : IAccountInfo -> float 

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

Type: Double
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.

See Also