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

Implementing Trailing stop

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

    Implementing Trailing stop

    Hello,

    I am trying to implement a trailing stop loss into my strategy but it has not been working. I have been using the stops menu to add these. Am I doing something wrong?

    Please advise.

    Click image for larger version

Name:	image.png
Views:	100
Size:	15.7 KB
ID:	1227755

    #2
    Hello dgutz15,

    Thanks for your note.

    The SetStopLoss() method and SetTrailStop() method cannot be used in the same script unless each stop references different signal names.

    From the SetTrailStop() help guide page: "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."​​

    If you would like to use SetTrailStop() to create a trailing stop in your strategy, you would need to remove the SetStopLoss() method and only use the SetTrailStop() method. Or, you would need to specify separate signal names when calling your methods so that the stop is tied to a specific entry order that has that same signal name.

    See this help guide page for moire information about SetTrailStop(): https://ninjatrader.com/support/help...ttrailstop.htm

    Let me know if I may assist further.
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    53 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Today, 06:52 PM
    4 responses
    33 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Today, 07:39 PM
    0 responses
    5 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Today, 03:01 PM
    2 responses
    19 views
    0 likes
    Last Post helpwanted  
    Started by cre8able, Today, 07:24 PM
    0 responses
    6 views
    0 likes
    Last Post cre8able  
    Working...
    X