Forex_Strategy_Builder.Backtester.OrdBuyLimit C# (CSharp) 메소드

OrdBuyLimit() 정적인 개인적인 메소드

Sets a new order Buy Limit.
static private OrdBuyLimit ( int bar, int orderIf, int toPos, double lots, double price, OrderSender sender, OrderOrigin origin, string note ) : void
bar int
orderIf int
toPos int
lots double
price double
sender OrderSender
origin OrderOrigin
note string
리턴 void
        static void OrdBuyLimit(int bar, int orderIf, int toPos, double lots, double price, OrderSender sender, OrderOrigin origin, string note)
        {
            int sessionOrder = session[bar].Orders;
            Order order = session[bar].Order[sessionOrder] = new Order();

            order.OrdNumb   = totalOrders;
            order.OrdDir    = OrderDirection.Buy;
            order.OrdType   = OrderType.Limit;
            order.OrdCond   = orderIf > 0 ? OrderCondition.If : OrderCondition.Norm;
            order.OrdStatus = OrderStatus.Confirmed;
            order.OrdIF     = orderIf;
            order.OrdPos    = toPos;
            order.OrdLots   = lots;
            order.OrdPrice  = Math.Round(price, InstrProperties.Digits);
            order.OrdPrice2 = 0;
            order.OrdSender = sender;
            order.OrdOrigin = origin;
            order.OrdNote   = note;

            ordCoord[totalOrders].Bar = bar;
            ordCoord[totalOrders].Ord = sessionOrder;
            session[bar].Orders++;
            totalOrders++;
        }