Class ResolvePositionService
- java.lang.Object
-
- de.gsi.financial.samples.service.order.ResolvePositionService
-
public class ResolvePositionService extends java.lang.Object- Author:
- afischer
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doublecalculatePositionProfitLoss(Position position, double fullpointvalue)Calculate P/L of the positionstatic PositioncreatePositionByOrder(Order order)Create prototype of position by orderstatic PositionduplicatePosition(Position position)Duplicate inserted position (new unique ID is generated)static voidresolvePositions(Order order, PositionContainer positionContainer)Main resolving of trading positions by its order commands.
-
-
-
Method Detail
-
resolvePositions
public static void resolvePositions(Order order, PositionContainer positionContainer)
Main resolving of trading positions by its order commands.- Parameters:
order- Order domain objectpositionContainer- with all positions of the system
-
calculatePositionProfitLoss
public static double calculatePositionProfitLoss(Position position, double fullpointvalue)
Calculate P/L of the position- Parameters:
position- for computation processfullpointvalue- of the market with this position- Returns:
- P/L amount double
-
createPositionByOrder
public static Position createPositionByOrder(Order order)
Create prototype of position by order- Parameters:
order- Order- Returns:
- position prototype
-
-