• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Rejected orders;Sim; NtDirect

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Rejected orders;Sim; NtDirect

    Once or twice lately I have gotten this message:
    "Rejected: There is no market data to drive the simulation engine."

    This is for orders sent using the NtDirect functions. My NTCommand funtion is below:

    Code:
    DefineDLLFunc:  "NtDirect.dll", int, "Connected", int;
    DefineDLLFunc:  "NtDirect.dll", int, "Command", lpstr, lpstr, lpstr, lpstr, int, lpstr, double, double, lpstr, lpstr, lpstr, lpstr, lpstr;
    
    inputs: Cmd(string), Account(string), Action(string), Quantity(numericsimple), 
    		OrderType(string), LimitPrice(numericsimple), StopPrice(numericsimple), TimeInForce(string), Oco(string),
    		OrderId(string), Template(string), Strategy(string);
    
    var: GSN(getsymbolname);
    
    if instr(GSN,"ES") = 2 then GSN = "@ES" else GSN = "XXXXX";
    
    if Connected(0) = 0 and getappinfo(airealtimecalc) = 1 then
    NTCommand = Command(Cmd,  Account, GSN, Action, Quantity, OrderType, LimitPrice, StopPrice, TimeInForce, Oco,
    				OrderId, Template, Strategy);
    I'm trying to understand how I would get this error if the orders are blocked when Connected(0) <> 0.

    #2
    Do you see any correlation in the times you're getting these errors?

    It's possible to receive the error even if you are connected. If you try placing the order at time the market is closed for example, the error can be received.

    You would need to ensure you're getting ask/bid price to place the orders for them to be processed by the simulation engine. For example you may just check last price, but if there is no current bid/ask data, the error can be received.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Originally posted by NinjaTrader_Matthew View Post
      Do you see any correlation in the times you're getting these errors?

      It's possible to receive the error even if you are connected. If you try placing the order at time the market is closed for example, the error can be received.

      You would need to ensure you're getting ask/bid price to place the orders for them to be processed by the simulation engine. For example you may just check last price, but if there is no current bid/ask data, the error can be received.
      Today the error occurred at 8:33 CST when the market had been open for three minutes. I'll look at this more closely the next few days to see if I can spot what's happening.

      Thanks.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Brillo, Today, 08:47 PM
      0 responses
      4 views
      0 likes
      Last Post Brillo
      by Brillo
       
      Started by Gav_G, Today, 02:12 PM
      3 responses
      11 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by Gav_G, Today, 01:41 PM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by kweiss, Today, 01:21 PM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by cutzpr, Today, 08:44 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X