getting order state and modifying order in multicharts.net (C#)

Discussion in 'App Development' started by Sasha345, Feb 26, 2017.

  1. Sasha345

    Sasha345

    Hello All,

    I'm writing strategy for multicharts.net and can't find any example of getting order state, if it is open or filled. Also I need to modify existing limit and stop orders, how I can do it?
     
  2. wintergasp

    wintergasp

    Read MC.Net's Guide on strategy, everything is in there. The .NET object implements IOrder(s) from TradeManager
     
  3. Sasha345

    Sasha345

    I did a small test creating an order
    longOrder = OrderCreator.Stop(new SOrderParameters(Contracts.Default, "Long open", EOrderAction.Buy));
    and then sending it
    longOrder.Send(40);
    it was never executed, what is the problem? the market orders are executed during the backtest, but not stop orders.
     
  4. O(1)

    O(1)

    I've never used multicharts but looks like you have Contracts.Default and then longOrder.Send(40)
     
  5. Sasha345

    Sasha345

    After several experiment I understand that orders are active only during one bar. And found the place where it is written in 4.6.9 :banghead:. Very interesting :rolleyes: is it possible to send a GTC order? That order can be executed even if I have some internet connection problems.