예제 #1
0
 public RuntimeInformation(Configuration config, GridTrapBot robot)
 {
     this.c     = config;
     this.robot = robot;
     Status     = RuntimeStatus.Inactive;
     Grids      = new List <Grid>();
 }
예제 #2
0
            internal void PlaceOrder(GridTrapBot robot)
            {
                TradeType tradeType = TradeType.Buy;

                if ((OrderType == OrderType.LIMIT && Side == GridSide.UpperGround) || (OrderType == OrderType.STOP && Side == GridSide.UnderGround))
                {
                    tradeType = TradeType.Sell;
                }

                if (OrderType == OrderType.LIMIT)
                {
                    robot.PlaceLimitOrderAsync(tradeType, robot.Symbol.Name, LotSize, EstimatedPricing, Side.ToString() + "-" + SideIndex.ToString(), PendingOrderPlaced);
                }
                else if (OrderType == OrderType.STOP)
                {
                    robot.PlaceStopOrderAsync(tradeType, robot.Symbol.Name, LotSize, EstimatedPricing, Side.ToString() + "-" + SideIndex.ToString(), PendingOrderPlaced);
                }
            }