Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SetTrailStop() - Percentage?

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

    SetTrailStop() - Percentage?

    Can someone please explain exactly how the percentage offset is calculated in this case?

    Will the stop trail the market price by % specified? If so, as market price increases then will the difference between stop and market increase? (e.g. a 1% stop from $5 is 5c, price eventually increases to $5.50 so stop trails behind by 5.5c)

    Or is the inital stop created % away from entry price then tracks market price by that fixed amount? (e.g. 1% stop on $5 is 5c, price eventually increases to $5.50 but stop trails by 5c)


    Also, if I want to dynamically adjust the trail do I have to give the order a unique name so NT knows which one I am referring to? Is this even possible?

    Thanks!

    #2
    Hello BillyRayValentine,

    Yes, this is how it works. It trails the last traded price by the specified percentage. As the market increases in your favor, the stop will also adjust.

    You can dynamicaly adjust stops and targets. This reference sample helps with this:
    Modifying the price of stop loss and profit target orders
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks Ryan

      With the Price option for setting stop price, can I pass in a variable or does a number (double) have to be implicitly specified? E.g can I pass into the SetTrailStop() command a variable which stores a stop value I am calculating elsewhere in my code?

      Thanks

      Comment


        #4
        Yes, you can use a variable for your stop price.

        However, CalculationMode.Price doesn't make sense in terms of a trail stop, so you would want to use SetStopLoss() and specify your price with this method.
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        576 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        334 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        553 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X