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 burtoninlondon, Today, 12:38 AM
      0 responses
      5 views
      0 likes
      Last Post burtoninlondon  
      Started by AaronKoRn, Yesterday, 09:49 PM
      0 responses
      12 views
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Yesterday, 08:42 PM
      0 responses
      11 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Yesterday, 07:51 PM
      0 responses
      13 views
      0 likes
      Last Post strategist007  
      Started by StockTrader88, 03-06-2021, 08:58 AM
      44 responses
      3,982 views
      3 likes
      Last Post jhudas88  
      Working...
      X