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 yertle, Today, 08:38 AM
      2 responses
      7 views
      0 likes
      Last Post yertle
      by yertle
       
      Started by dappa, Today, 09:18 AM
      0 responses
      0 views
      0 likes
      Last Post dappa
      by dappa
       
      Started by bill2023, Yesterday, 08:51 AM
      4 responses
      22 views
      0 likes
      Last Post bltdavid  
      Started by trilliantrader, Today, 08:16 AM
      3 responses
      9 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by NinjaTrader_ChelseaB, 01-08-2017, 06:59 PM
      79 responses
      19,662 views
      5 likes
      Last Post zrobfrank  
      Working...
      X