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 argusthome, 03-08-2026, 10:06 AM
      0 responses
      71 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      43 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      25 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      28 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      56 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X