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 gm7_forum, Today, 05:51 PM
      0 responses
      2 views
      0 likes
      Last Post gm7_forum  
      Started by cre8able, Today, 03:20 PM
      1 response
      9 views
      0 likes
      Last Post cre8able  
      Started by fiddich, Today, 05:25 PM
      0 responses
      3 views
      0 likes
      Last Post fiddich
      by fiddich
       
      Started by gemify, 11-11-2022, 11:52 AM
      6 responses
      804 views
      2 likes
      Last Post ultls
      by ultls
       
      Started by ScottWalsh, Today, 04:52 PM
      0 responses
      4 views
      0 likes
      Last Post ScottWalsh  
      Working...
      X