Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Managed Buy and Sell Lmt - cant place both?

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

    Managed Buy and Sell Lmt - cant place both?

    Hello,

    Am attempthing to write a fairly simple strategy which upon starting and obtaining data for the close ie last current tick... Places a buylmt below and a sell limit above that obtained price offset a few ticks. Pretty much like fading a band system...

    In OnBarUpdate

    if (Variable0 == 1)
    {
    EnterShortLimit(Variable5,
    "S");
    EnterLongLimit(Variable6,
    "B");
    }

    What happens is that only the first order is placed Short in the above example. If the sell is placed first, only it is placed.

    What I wanted, is to B/S at these points indefenitly until another condition is true.

    When the active order is filled, then an oposing exit and entry order are placed.

    OK, But I want to have both the buy and sell limit order live at startup.

    Is this possible using the managed aproch and if so what am I doing wrong?

    TIA
    rr

    #2
    Hello rr,

    Thanks for the post.

    You can see messages related to strategy order submission by adding TraceOrders = true; to your Initialize() method.

    Your results are expected with the managed order system. Please see here for our Internal Order Handling rules. I have excerpted the rule you're running into.
    Methods that generate orders to enter a position will be ignored if:
    • A position is open and an order submitted by an exit method (ExitLongLimit() for example) is active and the order is used to open a position in the opposite direction
    • A position is open and an order submitted by a set method (SetStopLoss() for example) is active and the order is used to open a position in the opposite direction
    • The entry signal name is not unique
    • The strategy position is flat and an order submitted by an enter method (EnterLongLimit() for example) is active and the order is used to open a position in the opposite direction


    We introduced an unmanaged order entry system in version 7 that allows you to submit both long and short orders at the same time. Please see here for an introduction to unmanaged strategyes.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Ok... Time to take off the training wheels :-)

      Thanks

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      666 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      376 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      110 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      575 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      580 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X