OQ 2.8.1 如何下单?

Discussion in 'OpenQuant' started by neoaries, Nov 29, 2009.

  1. 我copy了OpenQuant Strategy Development文档里的范例程序到OQ 2.8.1里,结果不能编译,说"OpenQuant.API.Order" is a "type", which is not valid in the given context.

    public override void OnBarOpen(Bar bar)
    {
    // calculate the size of the gap down since last bar
    double gap_size = (prevClose - bar.Open) / prevClose;
    // issue a buy order if the gap is big enough
    if (gap_size > desired_size) {
    Order order = Order (Side.Buy, qty);
    //Order order = Order ();
    //order.Side = Side.Buy;
    //order.Qty = qty;
    order.Text = "Tech1_System1 - Buy";
    order.Send ();
    }
    }

    请问有人知道是哪里的问题吗?
     
  2. It seems like you picked an invalid syntax as OQ API doc has a few syntax alternatives corresponding to different programming languages used.
     
  3. 同意。这个OQ文档里的例子是以前的,看来现在新的OQ API是取消了一些类,可能是放到QD里面去了。这导致我认为OQ支持已然不行了,连自己的文档都已经过时,还不如RE了。不知道你觉得如何?