Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trailing stop?

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

    Trailing stop?

    I am trying to place a trailing stop in the strategy wizard. I have a 6 tick profit target but once the current price moves 5 ticks above(for Long) entry or 5 ticks below (for short) entry, move the the stop up to 4 ticks above entry price . Heres how I have it in the wizard. BUT... its not working...any ideas what I have wrong? Thanks

    SetProfitTarget("",CalculationMode,Ticks,6)
    SetTrailStop("4",CalculationMode,Ticks,5,False)

    #2
    sdt929, your trailing stop is not picked up as the FromEntrySignal name field contains the incorrect entry 4 - here you would either put the name of your entry signal in or just leave empty like you did it for the ProfitTarget above.

    Comment


      #3
      Both?

      So, would I set it in the wizard to have a hard stop (5 ticks) and a trailing stop (4 ticks above entry)? If market moves in my direction I just want to at least lock in 4 ticks profit.

      Comment


        #4
        Hello sdt929,

        You can't combine both SetStopLoss() with SetTrailStop(). It will use the stop loss only.

        Trail stop in a NinjaScript strategy does not work the same as an ATM strategy. There is no field for profit trigger like an ATM.

        Trailstop places a stop order at the last traded price +/- the specified tick or percent. Mode price does not make sense in trail stop context.

        Example:
        Long Position enters at 1000
        Trail stop defined at 10 ticks is placed initially at 990.
        If market raises to 1010, stop loss is moved to 1000.

        Adjustments to the price are made either on every tick or on bar close depending on CalculateOnBarClose setting. It will not retreat in other direction - in example above, it stays at 1000 if trading goes from 1010 to 1000.
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        152 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        89 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        133 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        127 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