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

exit long position by stop limit order. what is stop price

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

    exit long position by stop limit order. what is stop price

    i'm dialing in a strategy and i have a question regarding exiting a position. on the exit long position by stop limit order. what is the stop price? is that the "trigger" price? and what is the limit price? is that the "capture profit" price? can i just put whole numbers there to represent ticks?
    Attached Files

    #2
    Hello SteveReiza,

    Thanks for your post.

    Limit Price would be the limit price for the stop limit order and Stop Price would be the stop price of the stop limit order.

    The value passed into these arguments must be a double value representing a price, such as Low[0] - 5 Ticks (Low price minus 5 ticks).

    From the Order Types help guide documentation:

    "The stop-limit order offers the trader complete control over the order. Like a stop order, the stop-limit order waits until the specified stop price has been reached. Unlike the stop order though, the stop-limit order becomes a limit order instead of a market order when the stop price is reached. The drawback for a stop-limit order is the same as all limit orders; the trader might not be filled if the limit price is never reached."

    See this help guide page for more information about ExitLongStopLimit(): https://ninjatrader.com/support/helpGuides/nt8/exitlongstoplimit.htm

    See this help guide page for more information about Order Types: https://ninjatrader.com/support/help...rder_types.htm
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      thanks for the reply. sweet. so technically i could have the stop price 102 ticks. and, the limit price at 62. the stop price would get activated when touched - 102. but, the sale wouldn't happen unless the price dropped to 62 - right?

      Comment


        #4
        Hello SteveReiza,

        Thanks for your notes.

        Once the stop price of 102 ticks is reached, the stop-limit order becomes a limit order instead of a market order and when the limit price is reached, the order would be filled. The order might not be filled if the limit price is never reached.

        A stop order will become a limit or a market order depending on if it is a StopLimit order or a Stop (market) order. The stop price will be the price the stop will be placed at.

        From Investopedia:
        "A stop-limit order is an order placed with a broker that combines the features of stop order with those of a limit order. A stop-limit order will be executed at a specified price (or better) after a given stop price has been reached. Once the stop price is reached, the stop-limit order becomes a limit order to buy (or sell) at the limit price or better."​

        StopLimit - http://www.investopedia.com/terms/s/stop-limitorder.asp​​
        Brandon H.NinjaTrader Customer Service

        Comment


          #5
          thanks for the reply. right on, sweet. i think i can use the stop limit order for what i'm trying to do. if the price keeps going great it doesn't drop to the limit order. but, if it does so be it better to have racked in some profits.

          if there is a signal name in the "from entry signal" and there isn't a position with that signal name will the exit long position ever become a position on its own. or, does it need to have that position with that signal name to be open for it to be allowed?

          Comment


            #6
            Hello SteveReiza,

            Thanks for your notes.

            If you are submitting an order to exit a long position, such as ExitLongStopLimit(), you should make sure that you are in a long market position before placing the stop limit order.

            So if you are calling EnterLong() with a signal name of "LongEntry", you should check if Position.MarketPosition == MarketPosition.Long before calling ExitLongStopLimit() with a FromEntrySignal of "LongEntry".
            Brandon H.NinjaTrader Customer Service

            Comment


              #7
              thanks for the reply. okay sweet. that makes sense.

              its just that i have multiple stop limit orders. attached to entry signal names. i'm just checking these are connected to the entry name by typing in the entry name in the "from entry signal" text area. and, only those "connected" will activate a trade. they all aren't technically active when the market position is long - correct?

              additionally, another question, can the stop price and limit price be a negative number?
              Last edited by SteveReiza; 02-11-2024, 09:37 PM.

              Comment


                #8
                Hello SteveReiza,

                Thanks for your notes.

                If the Exit stop limit order is using FromSignalName, the stop limit order would only be placed if there was an order submitted with the same SignalName being used for the Entry order method.

                For example, say your strategy submitted an order with the SignalName "Entry1" and you are using "Entry1" for the FromEntrySignal of your Exit order. When the Entry order is filled, say you check if Position.MarketPosition == MarketPosition.Long and call your Exit order method. The Exit order would be submitted since the entry order is filled, you are in a long position, and the Exit order is set to use "Entry1" for the FromEntrySignal which is the same SignalName as the Entry order.

                See the 'Order Entry Methods' and 'How to close a position' sections of this help guide page for more information: https://ninjatrader.com/support/help...d_approach.htm

                A stop price and limit price must be a valid price so you cannot use a negative price for stop price and limit price.
                Brandon H.NinjaTrader Customer Service

                Comment


                  #9
                  thanks for the reply. alright sweet, i'm tracking. thanks for the clarification.

                  the limit price is the number in ticks from entry. just like the stop price? or, is it ticks from the stop price?

                  to have a negative number can i use 'set' in the limit text area and have an input or variable for average position price a negative number and select that to be there?

                  i can still use stops and targets if i have these in my strategy, right?
                  Last edited by SteveReiza; 02-12-2024, 12:15 PM.

                  Comment


                    #10
                    Hello SteveReiza,

                    Thanks for your notes.

                    The limit price is the price from the average entry price of the entry order.

                    A negative price should not be used for a limit price or stop price. You must pass in a valid price.

                    You could consider adding/subtracting a set number of ticks from the average entry price and use that price for your limit price or stop price.

                    We do not recommend using Set methods (such as SetStopLoss()) and Exit methods (such as ExitLongStopLimit()) as this would go against the Managed Approach Internal Order Handling Rules. If you want to use Exit methods in the script, then Set methods should not be used.

                    See the Internal Order Handling Rules section of this help guide page: https://ninjatrader.com/support/help...d_approach.htm
                    Brandon H.NinjaTrader Customer Service

                    Comment


                      #11
                      thanks for the reply. okay cool cool. i'm tracking. that's why my stop loss didn't work this morning.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by llanqui, Today, 03:53 AM
                      0 responses
                      6 views
                      0 likes
                      Last Post llanqui
                      by llanqui
                       
                      Started by burtoninlondon, Today, 12:38 AM
                      0 responses
                      10 views
                      0 likes
                      Last Post burtoninlondon  
                      Started by AaronKoRn, Yesterday, 09:49 PM
                      0 responses
                      15 views
                      0 likes
                      Last Post AaronKoRn  
                      Started by carnitron, Yesterday, 08:42 PM
                      0 responses
                      11 views
                      0 likes
                      Last Post carnitron  
                      Started by strategist007, Yesterday, 07:51 PM
                      0 responses
                      14 views
                      0 likes
                      Last Post strategist007  
                      Working...
                      X