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

Cannot do a sell stop or a sell stop limit order notice

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

    Cannot do a sell stop or a sell stop limit order notice

    As I run my strategy at various times, I get a notice that I can't do a sell stop or sell stop limit order above the market.
    My exit orders are either a stop order or a limit order, is this what could be causing this notice after the market pulls the other way, after I'm in?
    Attached Files

    #2
    Hello trdninstyle,

    Sell stop orders must have the stop price below the current bid price, buy stop orders must have the stop price above the current ask price.

    Ensure the stop price for the order is at least 1 tick below the bid.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,

      I'm thinking about how to make sure it is 1 tick below the bid. It would have to be in the set 5 for the stop loss. Right now, I'm using a market order to get in and the entry is at the top of price usually, causing the stop to be higher up, but still underneath the entry but maybe not the bid at certain times? I need to solve this. I'm using a 3 tick stop and target, probably what's happening is the stop of course stays there and the bid gets below it, the stop, and triggers that notice. (I'm solving this as I type I think)

      I'll go to a limit order buy further below & I think that will fix it, does that sound right to you Chelsea?

      Comment


        #4
        Hello trdninstyle,

        The condition would compare the StopPrice to be equal greater than Price -> Bid.

        And if true, the action would set StopPrice to Price -> Bid with the Offset set to Ticks and the value set to -1.


        Or if you want to place the sell order above the bid, then use a limit order instead of a stop order.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          By now you may be out of the office.

          Please, does this look right?

          Set 2 triggers the entry then set 3 triggers the initial stoploss, so I went;
          Misc > Set Stop Loss > Strategy> AvePosSize> Price> Bid> UserInput>Initial Pos Size

          I probably messed up the set 4 because I did the same thing there, I wouldn't need to do that in set 4 would I?
          StopPrice to Price -> Bid with the Offset set to Ticks and the value set to -1 (My case I want -3 ticks, stop loss)
          Attached Files
          Last edited by trdninstyle; 11-18-2022, 05:20 PM.

          Comment


            #6
            In set 3 is the initial stop loss order so set it up like this under set 3?
            Attached Files

            Comment


              #7
              Hello trdninstyle,

              I am not suggesting you add the bid price to the position average price.

              I am suggesting you have a condition that checks the StopPrice is equal to or greater than the bid price. If it is, set the StopPrice to the bid price minus 1 tick.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Set the StopPrice to the bid price minus 1 tick in set 5? I haven't done it yet showing in the pic, but is that the right place?

                Good morning & thank you.
                Attached Files

                Comment


                  #9
                  Hello trdninstyle,

                  Attached is a screenshot of how this would appear in the Strategy Builder.
                  Click image for larger version

Name:	2022-11-21_8-30-54.png
Views:	220
Size:	59.7 KB
ID:	1224491
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    Thanks for that Chelsea.

                    I've been running another breakeven strategy all morning w/ no issues, it's a 5-set series. I don't want to mess with that one it's working; I would make a copy of it and mess with the copied one. In set-3 of the one thats working in the Actions section is like in your pic, except I have it as an input. The Conditions part looks different than yours.

                    I'll go back to the one with the issue from Friday, it's also a 5-set breakeven strategy. I'll try to repair it.
                    The one thats working and the other one thats not working both have a StopPrice in set-3 and set-4.

                    I believe I need to change the Set-4 to have it look like in your screenshot. For the last pic, the one at issue.

                    Your service is invaluable, and I mean that. I have much more understanding than I did a month ago.


                    Attached Files

                    Comment


                      #11
                      Hello trdninstyle,

                      You would not be changing any existing conditions.

                      This condition and action would be checking the stop price you have calculated is less than the bid. And if its not, it sets the stop price to below the bid.
                      Chelsea B.NinjaTrader Customer Service

                      Comment


                        #12
                        On the 5-set series I would add a set-6 to ensure that the stop price is less than the bid. So, all I had to do was add a set? I was changing things and making it worse lol
                        The strategy thats been working fine all day so far, I can add to it just to ensure my stop stays below the bid then? Thats awesome.
                        Attached Files
                        Last edited by trdninstyle; 11-21-2022, 02:05 PM.

                        Comment


                          #13
                          Hello trdninstyle,

                          Yes, you would be adding a set after the stop price is set, to ensure the stop price is below the bid.
                          Chelsea B.NinjaTrader Customer Service

                          Comment


                            #14
                            Problem solved! Thank you, my good sir,

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by halgo_boulder, 04-20-2024, 08:44 AM
                            2 responses
                            21 views
                            0 likes
                            Last Post halgo_boulder  
                            Started by mishhh, 05-25-2010, 08:54 AM
                            19 responses
                            6,189 views
                            0 likes
                            Last Post rene69851  
                            Started by gwenael, Today, 09:29 AM
                            0 responses
                            5 views
                            0 likes
                            Last Post gwenael
                            by gwenael
                             
                            Started by Karado58, 11-26-2012, 02:57 PM
                            8 responses
                            14,830 views
                            0 likes
                            Last Post Option Whisperer  
                            Started by Option Whisperer, Today, 09:05 AM
                            0 responses
                            2 views
                            0 likes
                            Last Post Option Whisperer  
                            Working...
                            X