Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Clarification on SetTrailStop()

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

    Clarification on SetTrailStop()


    Hi there,

    I'm confused on how SetTrailStop() works, and I'd like to worth through a simple example. Say I do

    SetStopLoss(Ticks, 8);
    EnterLong()
    SetTrailStop(Ticks, 8);

    After this, say the market goes up 20 ticks, and then down by 30 ticks. What will be the action of SetTrailStop in this scenario? What would be the ticks gain/loss?

    Thanks.








    #2
    Originally posted by timmbbo View Post
    Hi there,

    I'm confused on how SetTrailStop() works, and I'd like to worth through a simple example. Say I do

    SetStopLoss(Ticks, 8);
    EnterLong()
    SetTrailStop(Ticks, 8);

    After this, say the market goes up 20 ticks, and then down by 30 ticks. What will be the action of SetTrailStop in this scenario? What would be the ticks gain/loss?

    Thanks.






    Impossible scenario. You cannot use SetTrailStop() and SetStopLoss() together.

    Comment


      #3
      Hello timmbbo,

      Thanks for your post.

      As member koganam advised, you would not be able to employ a setStop and a Trail stop on the same order as in that case only the fixed stop would be utilized. This is clarified in the help guide: "The SetTrailStop() method can NOT be used concurrently with the SetStopLoss() or SetParabolicStop() method for the same position, if any of methods are called for the same position (fromEntrySignal) the SetStopLoss() will always take precedence. You can however, use all three methods in the same strategy if they reference different signal names." (See the first note here: https://ninjatrader.com/support/help...ttrailstop.htm

      If we say that you are not using the SetStopLoss() then in your example, once the entry order has been filled the trail stop would be located 8 ticks away. For each tick of profit that your trade goes, the trail stop would be moved on a profit tick for tick basis, always remaining 8 ticks behind the current price while it moves in profit, when price retraces the trail stop would not change and would take out your order if it retraced 8 ticks from its highest price. In your example the highest profit was +20 ticks, the stop at that point would be located 20-8 = +12 ticks, when price came back to that level the stop would exit the trade.

      There are additional considerations you must understand about the use of the trail stop and they relate to how your strategies "calculate" mode is set. Please be sure to read the last note in the link above for clarification of what calculate mode to use.
      Paul H.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by pibrew, Today, 06:37 AM
      0 responses
      4 views
      0 likes
      Last Post pibrew
      by pibrew
       
      Started by rbeckmann05, Yesterday, 06:48 PM
      1 response
      14 views
      0 likes
      Last Post bltdavid  
      Started by llanqui, Today, 03:53 AM
      0 responses
      6 views
      0 likes
      Last Post llanqui
      by llanqui
       
      Started by burtoninlondon, Today, 12:38 AM
      0 responses
      11 views
      0 likes
      Last Post burtoninlondon  
      Started by AaronKoRn, Yesterday, 09:49 PM
      0 responses
      16 views
      0 likes
      Last Post AaronKoRn  
      Working...
      X