Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Orders that would be OrderState.TriggerPending are rejected by Account.Submit()

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

    Orders that would be OrderState.TriggerPending are rejected by Account.Submit()

    I'm trying to issue directly (from a custom add-on I am writing), a Buy StopLimit order with the limit price 1 tick smaller than the stop price.

    The order is rejected with a pop-up: "Limit price can't be smaller than stop price"

    I can place this same order manually using the Basic Entry window -- the order status becomes TriggerPending.

    Is it not permissible to place orders that would result in a TriggerPending state using:

    theAccount.Submit(new[] { theOrder });

    Do I have to monitor price action myself and wait until price trades at the stop and then place the limit order or is there another way to make this happen without having to do that?

    Thank you,

    Brian

    #2
    Hello Brian,

    This is correct. The simulated stop limit is not a real order type that can be submitted to the brokerage.
    Behind the scenes, when a manual simulated stop limit is placed, NinjaTrader will use logic to place the limit once the stop price has been reached locally. This means the order is not working on the exchange until the stop is touched and the limit is submitted.
    You would need to the same in your script, use logic to monitor the price, and submit the limit once the price is reached.
    Last edited by NinjaTrader_ChelseaB; 05-19-2016, 07:33 AM.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the quick reply Chelsea.

      Alrighty then... more coding to do...

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Jeremytang, 07-14-2018, 06:45 PM
      21 responses
      439 views
      0 likes
      Last Post mav8rick  
      Started by LeonK, Yesterday, 09:26 PM
      1 response
      8 views
      0 likes
      Last Post bltdavid  
      Started by NicholasJoannette, Yesterday, 03:01 PM
      2 responses
      11 views
      0 likes
      Last Post NicholasJoannette  
      Started by rach1994, Yesterday, 12:20 PM
      1 response
      35 views
      0 likes
      Last Post bltdavid  
      Started by litamm89, Yesterday, 11:00 AM
      5 responses
      22 views
      1 like
      Last Post rafael_delima86  
      Working...
      X