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

    #16
    Hello,

    For your first question
    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"
    This would be telling NinjaTrader that if you are currently Long, to set Variable 0 to the High[0] + your ATR * TickSize.

    If this does not work you may want to try a catch all condition that is just keeping Variable 0 up to date with the current price or if you are flat then make Variable0 that value. This way it would be set already before your order logic and right before the long entry. This would only be needed if you are not getting the price value set before the profit target is set.

    For your second question:

    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
    Yes this is correct, a profit target is simply a type of order that is a preset value used to capture profit when the price gets to that level.

    Please let me know if I may be of further assistance.

    Comment


      #17
      Hi Jesse,

      so for the short profit target I created Var1 (please see attached)


      You will see its specified as +ATR. Are you sure it shouldn't be '-ATR'?


      When i go and try to edit the value in parameter's, I put a "-" in front of the ATR and hit enter then it automatically and incorrectly sets Var1 = Low[0].


      so how should I set Var1 = Low[0]-ATR[14] ?


      Thanks,


      TeenageMutantNinjaTrader
      Attached Files
      Last edited by teenagemutantNT; 09-12-2014, 12:23 PM.

      Comment


        #18
        Hello,

        For what you are trying to do I don't believe the wizard would have the capability to subtract the ATR as it is being used as a offset value.

        An offset value can be a negative or positive number so depending on the input value if it is a negative ultimately it would get subtracted but if it was positive it would still be added.

        When you change the + symbol to a - you will notice that it becomes a 0 because it is expecting a hard value to be entered.

        I believe for what you are trying to do it would need to be manually coded to work the way you are expecting or at least for you to specify that you want to subtract the value.

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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        58 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        39 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        19 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        21 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        51 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X