Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stop limit orders

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

    Stop limit orders

    I like to enter a Buy order one tick above the High of the first bar that reverses after the price has crossed above an MA line. I use a stop limit order to do this. If I place this manually, all is well as it stays in place until the price penetrates it. However, when I automate this method using the Wizard , the pending order is good only for the next bar. If this bar doesn't penetrate the order price, the order is cancelled (presumably because of OnBarUpdate).

    if (Open[0] > Close[0])
    {
    EnterLongStopLimit(DefaultQuantity, High[0] + 2 * TickSize, High[0] + 1 * TickSize, "");

    I am able to set various other conditions using the Wizard, including a condition for cancelling the order. The one thing I can't do, is keep the order in place until I want it cancelled.

    Is there a way to do this using the Wizard, or something simple using code?

    #2
    Hello,


    This "cancelling" of working orders is expected behavior. You will have to build a condition that maintains an evaluation to "true" for the duration that you want the order to be working.
    DenNinjaTrader Customer Service

    Comment


      #3
      Thanks for the prompt. Got it to remain 'true' by resubmitting using previous bar order (1).

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, Yesterday, 09:41 PM
      1 response
      20 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, Today, 02:41 AM
      0 responses
      7 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, Yesterday, 11:44 PM
      0 responses
      18 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      35 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      33 views
      0 likes
      Last Post CarlTrading  
      Working...
      X