Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator trailing stop for price pulled back and made new highs

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

    Indicator trailing stop for price pulled back and made new highs

    Hi, i loock for a indicator to use as trailing stop, the indicator detect price pulled back and then made new highs, like in the picture below. Some body has an example to do that?

    Click image for larger version

Name:	trailing stop pulled back highs.jpg
Views:	165
Size:	42.6 KB
ID:	1155642


    Thanks

    #2
    Hello Pbarrionuevo,

    Thanks for your post.

    The key to creating a trailing stop behavior is to keep track of the last price or plot value when the stop is moved, and to check if the current plot or current price is above that last price/plot value before adjusting the stop loss again.

    I would suggest reading the plot in the strategy, and then to use logic in your strategy to control when the stop loss updates. The example below demonstrates on how you can move stop loss prices. You could consider logic that instead of comparing Close[0] (current market price) to Position.AveragePrice, you compare Close[0] (or your plot) to a variable and make sure the market has moved X number of ticks from your variable. Then you can call SetStopLoss to update the stop price and also update your variable so it notes the last price when the stop was changed.

    SamplePriceModification - https://ninjatrader.com/support/help...of_stop_lo.htm

    Working with Price Series - https://ninjatrader.com/support/help...ice_series.htm

    Please note that if you are calling SetStopLoss in OnBarUpdate, you will need to make sure that the strategy has the stop loss reset to an initial level when the strategy position is flat, and before a new entry is made. This is also demonstrated in the example above.

    You may also consider using SetTrailStop to use a trailing stop, but this would not be a stop loss that you could control with your own logic.

    SetTrailStop - https://ninjatrader.com/support/help...ttrailstop.htm

    We look forward to assisting.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    156 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    90 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    141 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    130 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    107 views
    0 likes
    Last Post CarlTrading  
    Working...
    X