Example #1
0
 public void PublishOnPositionOpened(cAlgo.API.Position _postion, cAlgo.API.Positions _positions, cAlgo.API.PendingOrders _orders, bool isBackTesting = false)
 {
     MessageConverter.ParseOpenPositions(_positions, out Positions positions, _postion.Label);
     MessageConverter.ParsePendingOrders(_orders, out Orders orders);
     MessageConverter.ParseOpenPosition(_postion, out Position position);
     Publisher.PositionOpenedEvent(position, positions, orders, isBackTesting);
 }
Example #2
0
 public void PublishOnPositionClosed(cAlgo.API.Position _postion, double closePrice, cAlgo.API.Positions _positions, cAlgo.API.PendingOrders _orders, DateTime closeTime, bool isBackTesting = false)
 {
     MessageConverter.ParseOpenPositions(_positions, out Positions positions);
     MessageConverter.ParsePendingOrders(_orders, out Orders orders);
     MessageConverter.ParseClosedPosition(_postion, closePrice, closeTime, out Position position);
     Publisher.PositionClosedEvent(position, positions, orders, isBackTesting);
 }
Example #3
0
 public static Model.Position FromCAlgo(cAlgo.API.Position Position)
 {
     return(null);
 }