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 bortz, 11-06-2023, 08:04 AM
      47 responses
      1,603 views
      0 likes
      Last Post aligator  
      Started by jaybedreamin, Today, 05:56 PM
      0 responses
      8 views
      0 likes
      Last Post jaybedreamin  
      Started by DJ888, 04-16-2024, 06:09 PM
      6 responses
      18 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by Jon17, Today, 04:33 PM
      0 responses
      4 views
      0 likes
      Last Post Jon17
      by Jon17
       
      Started by Javierw.ok, Today, 04:12 PM
      0 responses
      12 views
      0 likes
      Last Post Javierw.ok  
      Working...
      X