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 kaoetac, Today, 05:15 AM
      0 responses
      1 view
      0 likes
      Last Post kaoetac
      by kaoetac
       
      Started by JarodB, Today, 04:44 AM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_Jason  
      Started by mahmud999, Today, 04:54 AM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Marco  
      Started by leonardo3381, Today, 01:58 AM
      3 responses
      21 views
      0 likes
      Last Post NinjaTrader_Marco  
      Started by Mindset, Today, 02:16 AM
      0 responses
      7 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X