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 bortz, 11-06-2023, 08:04 AM
      47 responses
      1,609 views
      0 likes
      Last Post aligator  
      Started by jaybedreamin, Today, 05:56 PM
      0 responses
      9 views
      0 likes
      Last Post jaybedreamin  
      Started by DJ888, 04-16-2024, 06:09 PM
      6 responses
      19 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by Jon17, Today, 04:33 PM
      0 responses
      6 views
      0 likes
      Last Post Jon17
      by Jon17
       
      Started by Javierw.ok, Today, 04:12 PM
      0 responses
      16 views
      0 likes
      Last Post Javierw.ok  
      Working...
      X