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 Rapine Heihei, 04-23-2024, 07:51 PM
      2 responses
      30 views
      0 likes
      Last Post Max238
      by Max238
       
      Started by Shansen, 08-30-2019, 10:18 PM
      24 responses
      943 views
      0 likes
      Last Post spwizard  
      Started by Max238, Today, 01:28 AM
      0 responses
      9 views
      0 likes
      Last Post Max238
      by Max238
       
      Started by rocketman7, Today, 01:00 AM
      0 responses
      4 views
      0 likes
      Last Post rocketman7  
      Started by wzgy0920, 04-20-2024, 06:09 PM
      2 responses
      28 views
      0 likes
      Last Post wzgy0920  
      Working...
      X