• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 seagraph, Today, 03:27 PM
      0 responses
      11 views
      0 likes
      Last Post seagraph  
      Started by dedouglas, Today, 02:54 PM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by elkhatabi, 08-01-2019, 06:36 PM
      5 responses
      53 views
      0 likes
      Last Post NinjaTrader_RyanL  
      Started by mr_trade, Today, 01:01 PM
      4 responses
      19 views
      0 likes
      Last Post mr_trade  
      Started by Renorail, Today, 12:31 PM
      1 response
      14 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Working...
      X