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

Can Each New Position have it own unique StopLoss send on Position entered

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

    Can Each New Position have it own unique StopLoss send on Position entered

    is it possible in the action area where you submit you order to enter a position to ALSO send a stop related to that unique entry and NOT tied to the over all StopLoss or TrailingStop of the strategy as a whole

    #2
    Hello DTSSTS,

    Thanks for your post.

    It sounds like you are using the Strategy Builder. In the Actions field, you can create your own Exit orders that are tied to unique Entry orders by specifying the Entry order's EntrySignal string into the Exit order's FromEntrySignal string. Exit orders can only be submitted when in a position.

    The same can be done to have the Set methods in Targets and Stops tied to unique entries rather that being applied to all. (If no FromEntrySignal is specified, the exit is applied to all entries.)

    Further reading on how to enter and exit with the Managed Approach can be referenced below. As the Strategy Builder creates Managed Approach code, this information can be very helpful to get a deeper understanding on how a strategy can be made in the builder.

    Managed Approach - https://ninjatrader.com/support/help...d_approach.htm

    Our Actions page documentation also describes tying exits with FromEntrySignals and Entry Signals.

    Actions - https://ninjatrader.com/support/help...us/actions.htm

    Please let us know if you have any questions.
    JimNinjaTrader Customer Service

    Comment


      #3
      thanks i tryed this without success



      Comment


        #4
        so from this screen you can have multiple stop loss set to entry signal


        Comment


          #5
          Hello DTSSTS,

          You need to assign the unique Entry Signal Name in the Set method's From Entry Signal parameter to tie it to a specific entry. Multiple exits cannot be applied to the same entry, so separate entries would have to be used to have separate exits.

          I have attached a demonstration video setting this up as an example: https://drive.google.com/file/d/1x9L...w?usp=drivesdk

          The Strategy Builder 301 tutorial also provides a complete walk-through for using this tool.

          Strategy Builder 301 - https://www.youtube.com/watch?v=HCyt90GAs9k

          The resources linked in this message are publicly available.

          Please let us know if we can be of further assistance.
          JimNinjaTrader Customer Service

          Comment


            #6
            thanks that helps alot

            Comment


              #7


              OK with these StopLoss set to entry signals and the TrailingStop and ProfitTarget NOT using entry signal names

              When the StopLoss with Entry Signal executes an exit will the TrailingStop and ProfitTarget Still Cancel

              Comment


                #8
                Hello DTSSTS,

                Profit Target and Stop Loss' (including Trailing Stops) pair together with OCO for their designated entry. A unique entry that is tied with unique exits will not cancel the other orders as they are not in an OCO pair.

                I may suggest testing any hypothetical questions regarding stop/target handling to observe the behavior first hand.

                For example, you can create some strategy logic and create a duplicate strategy in which you can unlock. Adding the following check will have the strategy ignore processing historical data so you can observe the strategy behavior very quickly using the simulated data feed or another data feed on a small time frame. I have attached a demonstration below as well.

                if (State == State.Historical) return;

                Demo - https://drive.google.com/file/d/1Fhk...w?usp=drivesdk

                Please let us know if you have any questions.
                JimNinjaTrader Customer Service

                Comment


                  #9
                  yes i am setting separate entry signal name on the exits



                  but if the profit target is NOT cancel, the only way to use these entrysignalstoploss by name would be NOT to have a generic StopLoss and no ProfitTarget that a OCO

                  So then what happens if you have NO OCO and you have many entrysignalstops and other indicator triggered Exits that are using the same entrysignalexit as well

                  I was told before as i built the indicator triggered exits if i used entrysignalnames on those the OCO WOULD cancel, and in testing they did afterhours (not simulated datafeed) SO NOW I AM MORE CONFUSED

                  Comment


                    #10
                    Hello DTSSTS,

                    The Set methods in Stops and Targets are the only methods in the Managed Approach that will use an OCO ID. You may also observe in the Orders tab of the Control Center which orders are getting an OCO ID as you are testing your strategy.

                    Signal names are used to tie specific exits to specific entries. OCO is not applied here. An Exit method will close the position and cancel the Target and Stop from the Managed Approach's internal order handling behaviors, but this does not involve OCO.

                    The internal rules for the Managed Approach can be found in post #2.

                    Please let us know if you have any additional questions.
                    JimNinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by jclose, Today, 09:37 PM
                    0 responses
                    4 views
                    0 likes
                    Last Post jclose
                    by jclose
                     
                    Started by WeyldFalcon, 08-07-2020, 06:13 AM
                    10 responses
                    1,413 views
                    0 likes
                    Last Post Traderontheroad  
                    Started by firefoxforum12, Today, 08:53 PM
                    0 responses
                    10 views
                    0 likes
                    Last Post firefoxforum12  
                    Started by stafe, Today, 08:34 PM
                    0 responses
                    10 views
                    0 likes
                    Last Post stafe
                    by stafe
                     
                    Started by sastrades, 01-31-2024, 10:19 PM
                    11 responses
                    169 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Working...
                    X