Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to set a sell limit at 1 ATR above the high of the entry candle

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

    How to set a sell limit at 1 ATR above the high of the entry candle

    Hi there again,

    Sorry about all the threads, but I am not good at the Strategy Analyzer at all.


    I am trying to set my profit target at 1 ATR above the high of the candle that I entered the trade in.


    Any idea of how to do this?


    Thanks so much!

    #2
    Hello,

    Thank you for the question.

    For this, you could use a User Variable to hold a price that would be used for the profit target.

    The user variable would need to be set by a condition.

    For example if you were to open the Set1 and click add and set the following:

    Choose strategy -> current market position == strategy -> Long

    click ok and then in the bottom window click add and choose:

    misc -> set userDefinedVariable and set Variable0 to Price Data -> Close with a bars ago of 1.

    Now when you set your profit target, choose variable 0 as its tick amount.

    Please let me know if I may be of additional assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Yes but how would it know to set a sell order at the ATR of the high for instance:

      If the current ATR is 0.5, and the high of the entry candle is 2001.5, my target will be 2001.5 plus ATR of 0.5 = 2002......how will the program know to exit at 2002?

      Comment


        #4
        Hello,

        Thank you for the question.

        For the profit target, once it is set NinjaTrader would submit the order for that price that you defined in the logic.

        The profit target specifically would trigger an exit short limit at the price you specify it to be at.

        So in this situation if your logic determines that your profit target price should be High of the entry candle plus the ATR value, once you set that value thats what would be submitted as a profit target order. If the price reaches this level NinjaTrader would recognize that and complete the order or any conditions associated with that value.

        To put it simply you would need to provide the logic to get your target price, NinjaTrader will not know ahead of time what price you are targeting as it can only do as you tell it to so you would need to provide a condition to set a variable with the target price to be used. Generally this is located in the logic from your entry order that this would be exiting as your profit.


        Please let me know if I may be of additional assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Thank you for your patience and help Jesse,

          I am still a bit lost.


          My other sets are occupied by me other conditions, so in Set5 I have this


          First field; When the following conditions are true:


          "Postion.MarketPosition == Market.Position.Long"


          Do the following: " Variable0=High[0]+3*TickSize"


          Is this right?




          My objective is for the program to notice the i) the high of the entry candle ii) the ATR of the entry candle then automatically compute "High of entry candle + ATR = profit target".


          Thanks.

          Comment


            #6
            Hello,

            Thank you for the question.

            From the value you are setting now it would be the CurrentBars High + 3 ticks.

            I wanted to clarify with you on this:
            "High of entry candle + ATR = profit target".
            I am not sure I understand the logic of what you are trying to use the ATR value for. The ATR is not a price value, it is a Positive or Negative value revolving around a 0 center so if you were to add the ATR value to a price value it would be adding a very small amount like 0.1 or something around that or possibly subtracting depending on if it is a positive or negative number at the time you are calling this.

            Is this what you are trying to do?


            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              ATR= Average True Range

              Originally posted by NinjaTrader_Jesse View Post
              Hello,

              Thank you for the question.

              From the value you are setting now it would be the CurrentBars High + 3 ticks.

              I wanted to clarify with you on this:


              I am not sure I understand the logic of what you are trying to use the ATR value for. The ATR is not a price value, it is a Positive or Negative value revolving around a 0 center so if you were to add the ATR value to a price value it would be adding a very small amount like 0.1 or something around that or possibly subtracting depending on if it is a positive or negative number at the time you are calling this.

              Is this what you are trying to do?


              I look forward to being of further assistance.
              Hello Jesse,


              ATR= Average True Range, simply put, I want to add the ATR of the entry candle to the high of the entry candle in order to determine my profit target. Thats my objective when it comes to profit target.


              The ATR for the ES is rarely lower than 0.25 and sometimes can be as high as 1.75


              So how should I set Variable 0 to achieve this?


              Thank You.

              Comment


                #8
                Hello,

                Thanks for clarifying that for me.

                If you are trying to add the ATR's value to the High, you could add the two together to give you a final price or just:

                High[0] + YourAtrValue or if you are getting it directly from the ATR: High[0] + ATR(12)[0];

                This would give you the price + the atr value in dollars not ticks. If you are wanting to use ticks instead of adding dollars, you would need to use

                ATR(14)[0] / TickSize

                This will work for getting an amount of ticks, if you multiply it I would believe it should be a smaller number than you started with.

                Please let me know if I may be of additional assistance.
                JesseNinjaTrader Customer Service

                Comment


                  #9
                  Thanks Jesse,

                  so I should set Variable 0 = High[0] + ATR(14)/TickSize ?


                  do I have to specify ATR in User Variable or anything?


                  Thank You...

                  Comment


                    #10
                    Hello,

                    If you are setting a variable with the ATR's value you wont have to set the ATR to anything because you are just getting its value.

                    The end result would be the Varable0 would be set to the High[0] plus your ATR / TickSize and then you can use Variable0 anywhere you want that number to be used.

                    Please let me know if I may be of additional assistance.
                    JesseNinjaTrader Customer Service

                    Comment


                      #11
                      This would give you the price + the atr value in dollars not ticks. If you are wanting to use ticks instead of adding dollars, you would need to use

                      ATR(14)[0] / TickSize
                      The ATR in chart is specified in ticks not dollars (ES).



                      Comment


                        #12
                        so what should I put in this window attached? the profit target window?



                        I already have in Set5 I have this


                        First field; When the following conditions are true:


                        "Postion.MarketPosition == Market.Position.Long"


                        Do the following: " Variable0=High[0]+ATR(14)[0]*TickSize"


                        Is this the right condition for sell when price = high of entry candle + ATR of entry candle?

                        I wouldn't need to specify anything in the profit target section right? ( I am assuming this is already specified in Set 5 conditions )


                        Thanks
                        Attached Files
                        Last edited by teenagemutantNT; 09-11-2014, 12:09 PM.

                        Comment


                          #13
                          Hello,

                          From the image you have posted, this would occur when a buy order with the signal name "3" happens, it would then use Variable0 as its value in an amount of ticks to set a profit target.

                          The profit target would not be a condition set but rather just a target that gets filled if the price were to hit it.

                          All conditions that make something else happen would need to be defined in one of the Sets.


                          Please let me know if I may be of additional assistance.
                          JesseNinjaTrader Customer Service

                          Comment


                            #14
                            Originally posted by NinjaTrader_Jesse View Post
                            Hello,

                            From the image you have posted, this would occur when a buy order with the signal name "3" happens, it would then use Variable0 as its value in an amount of ticks to set a profit target.

                            The profit target would not be a condition set but rather just a target that gets filled if the price were to hit it.

                            All conditions that make something else happen would need to be defined in one of the Sets.


                            Please let me know if I may be of additional assistance.
                            Ok so I can remove the profit target part?

                            What is Set 5 instructing the program to do?


                            Set5 I have this


                            First field; When the following conditions are true:


                            "Postion.MarketPosition == Market.Position.Long"


                            Do the following: " Variable0=High[0]+ATR(14)[0]*TickSize"




                            Thanks.

                            Comment


                              #15
                              OK so for that profit target window



                              From entry signal = 0


                              Mode = ticks


                              Value = Variable 0


                              so that will just calculate variable 0 correct?


                              It is just saying " when price hits variable 0 , and var0 which = when price hits the high + ATR of the entry cande...place a sell limit


                              the statement in red is what I am trying to achieve with my profit orders.




                              TY

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by frslvr, 04-11-2024, 07:26 AM
                              6 responses
                              105 views
                              1 like
                              Last Post NinjaTrader_BrandonH  
                              Started by trilliantrader, 04-18-2024, 08:16 AM
                              6 responses
                              26 views
                              0 likes
                              Last Post trilliantrader  
                              Started by arvidvanstaey, Yesterday, 02:19 PM
                              5 responses
                              14 views
                              0 likes
                              Last Post NinjaTrader_Zachary  
                              Started by Rapine Heihei, Yesterday, 08:25 PM
                              1 response
                              12 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by Mongo, Yesterday, 11:05 AM
                              6 responses
                              27 views
                              0 likes
                              Last Post Mongo
                              by Mongo
                               
                              Working...
                              X