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

Place Buy order and Sell order at same time.

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

    Place Buy order and Sell order at same time.

    Hi all,

    I am new to Ninja Trader. I have tried to place a buy order and a sell order when it receives the first tick after market open. But the strategy only executes the first order and ignores the second one. But I can successfully to place many same-direction orders. Is there a way to work around this?

    Thank you.
    Sean

    #2
    I suppose you are talking about NinjaScript strategies and not ATM strategies. If the former, then yes, this is a current limitation, you can not place 2 orders at both sides of the market.

    Comment


      #3
      Thank you for your fast reply Dierk. But I cannot believe it this is too unreasonable. This should be a very basic function for most trading systems. Are there any ways to work around this?

      Comment


        #4
        The SetProfitTarget()/SetStopLoss() methods don't have this limitation.

        Comment


          #5
          I have the same need to place a sell stop order and a buy stop order at the same time. I thought I should be able to do it in the script as long as I use different signal names. I found my second order was ignored and I searched the forum for a clue and ran into this thread. The limition is very surprising not only because it a common requirement for breakout strategies but also because I can do so in the SuperDOM.

          Why can the NT UI handle two orders of different directions but I can't in the script? Thanks!

          Comment


            #6
            You can't place entry order at different sides of the market. You can place exit orders at different sides of the market though.

            Comment


              #7
              "You can't place entry order at different sides of the market."

              This is not true in SuperDOM, is this? A breakout strategy normally has two orders at different sides of the market. When one of them is hit, the other one is cancelled. It cannot be done in script? I think you are already saying this, but I need hear it again to believe it

              Comment


                #8
                It is possible in the SuperDOM but not in a single instance of a NinjaScript strategy.
                RayNinjaTrader Customer Service

                Comment


                  #9
                  V 6.0

                  For those of you who really want to set breakout type ninjascripts, you can do it in V6.0

                  Comment


                    #10
                    Ray, here is a somewhat related question. How can I achieve OCO in my custom strategies? I have two strategies running. When one strategy has executed an order, I want to cancel the pending order in the other strategy. Thanks!

                    Comment


                      #11
                      OK-So no OCO orders in a strategy?

                      I'm shocked and amazed! I guess I can stop working on my inside bar strategy now. Would this theoretically be a possibility in NT 7?

                      Comment


                        #12
                        Originally posted by ooppie View Post
                        Ray, here is a somewhat related question. How can I achieve OCO in my custom strategies? I have two strategies running. When one strategy has executed an order, I want to cancel the pending order in the other strategy. Thanks!
                        This is not supported by us at this time.
                        RayNinjaTrader Customer Service

                        Comment


                          #13
                          Originally posted by Taters View Post
                          I'm shocked and amazed! I guess I can stop working on my inside bar strategy now. Would this theoretically be a possibility in NT 7?
                          The reason this was disabled is that too many people had strategies where both entries were filled since the market moved rapidly through both entries before the second was cancelled due to the first being filled.

                          We have on our list in NT7 to figure out a way to deal with this.
                          RayNinjaTrader Customer Service

                          Comment


                            #14
                            I am wondering if I could implement "OCO" by having a global class with static properties/methods. Ray, is this the right direction?

                            Comment


                              #15
                              Thanks-

                              Your input is always appreciated, NT_Ray
                              -Taters
                              Originally posted by NinjaTrader_Ray View Post
                              The reason this was disabled is that too many people had strategies where both entries were filled since the market moved rapidly through both entries before the second was cancelled due to the first being filled.

                              We have on our list in NT7 to figure out a way to deal with this.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Tim-c, Today, 03:54 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post Tim-c
                              by Tim-c
                               
                              Started by FrancisMorro, Today, 03:24 AM
                              0 responses
                              2 views
                              0 likes
                              Last Post FrancisMorro  
                              Started by Segwin, 05-07-2018, 02:15 PM
                              10 responses
                              1,771 views
                              0 likes
                              Last Post Leafcutter  
                              Started by Rapine Heihei, 04-23-2024, 07:51 PM
                              2 responses
                              31 views
                              0 likes
                              Last Post Max238
                              by Max238
                               
                              Started by Shansen, 08-30-2019, 10:18 PM
                              24 responses
                              945 views
                              0 likes
                              Last Post spwizard  
                              Working...
                              X