Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

buy limit /sell limit order at the same time possible?

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

    buy limit /sell limit order at the same time possible?

    Hi

    I am trying to figure out wether it is possible to have a buy limit and sell limit order at the same time within an automated strategy? (similar to superDOM)

    I tried with enter long/short position by limit order - but somehow I get only fills on one side (bid OR ask - depending what i put first in my script)- the other side seems to be ignored.
    Maybe I have some logic errors in my code?

    A workaround could be to have a second strategy with different name running the same time doing the other "direction" , but this seems rather inconvenient.

    I do not want a strategy that does only react after things happened, but before things happen! (means I need to have orders in the market before a certain event is going to happen) This is a VERY important feature in my opionion!

    Is that possible with NT automated strategies?

    greetings Steve

    #2
    Hi steve, thanks for your post - with this you would run into the 'Internal Order Handling Rules' as outlined in the bottom section of this link - http://www.ninjatrader-support.com/H...verview36.html

    To track ignored orders the TraceOrders features is helpful - http://www.ninjatrader-support.com/H...aceOrders.html

    Please also check into this tip here - http://www.ninjatrader-support2.com/...ead.php?t=3627

    A workaround would be to monitor the last price and only send one order as the breakout / fade occurs.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Bertrand, thank you for your reply -

      the workaround you suggest does not really help, since you would miss the really interesting part of the action.
      (consider stops, or wild market orders sent in the market that cause only one short up or downburst in the price - if you cannot "wait" on the bid and ask side for it... you miss it!) - and entering "after" those things happen does not make sense.

      Methods that generate orders (excluding market 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
      That rule means for example : you are long, have a sell limit order in the market in case someone buys a larger amount and your limit is reached - but you cannot enter a buy order to "improve" your average price - or to catch some expected stops below a certain price?
      If the stops happen - its too late already, since NT will only enter after the stops are gone and the price is up again at the "right" lvl.

      The Superdom lets you do exactly what the Internal Order handling for automated strategies is trying to prevent?
      Is this "protection" not rather a limitation? I feel one should have the choice wether to use or not use these "protective" rules.

      Comment


        #4
        Steve, not sure I follow - in your example you could issue an additional buy order to improve the average price of your long position, but you can't issue an order in the opposite direction (market orders excluded) while an Exit() method is working. Those 'internal order handling rules' are in place to prevent unwanted positions from overfills or inflight executions - http://www.ninjatrader-support.com/H...njaTrader.html

        Changes to this approach are already on our list for future consideration.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Belfortbucks, Today, 09:29 PM
        0 responses
        3 views
        0 likes
        Last Post Belfortbucks  
        Started by zstheorist, Today, 07:52 PM
        0 responses
        7 views
        0 likes
        Last Post zstheorist  
        Started by pmachiraju, 11-01-2023, 04:46 AM
        8 responses
        150 views
        0 likes
        Last Post rehmans
        by rehmans
         
        Started by mattbsea, Today, 05:44 PM
        0 responses
        6 views
        0 likes
        Last Post mattbsea  
        Started by RideMe, 04-07-2024, 04:54 PM
        6 responses
        33 views
        0 likes
        Last Post RideMe
        by RideMe
         
        Working...
        X