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

Trailing Stop is not working --> all Trades Break Even

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

    Trailing Stop is not working --> all Trades Break Even

    Hi ,

    if I set the trailing stop in the Strategy Builder, it still ends the trades in break even.
    How can I make it accept the trailing stop if I set the normal stop to 0?

    Best Regards

    #2
    Hello Yannick,

    Thanks for your post..

    You are using both a fixed stop (SetStopLoss) and a trailing stop (SetTrailStop), the trailing stop is ignored when there is a fixed stop. To use a trailing stop you would have to remove thee SetStopLoss().

    From the help guide of SetTrailStop: 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. Reference: https://ninjatrader.com/support/help...ttrailstop.htm
    Last edited by NinjaTrader_PaulH; 02-07-2020, 07:04 AM. Reason: changed first line
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      " ou can however, use all three methods in the same strategy if they reference different signal names. Reference: "
      ( I read it through, but unfortunately there is no example of the Strategy Builder )

      Do I have to unlock the code or can I do that in the Strtaegy Builder? Can you maybe post me a screenshot / example?

      Comment


        #4
        Hello Yannick,

        You would not be able to use both set methods on the same order. The help guide is advising, indirectly, that if for example, you place two orders at the same time and each has a unique signal name, you can use a fixed stop on one by using the signal name of one entry and you can use a trailing stop on the other entry by using the other signal name, so the net result is 2 separate orders, one with a fixed stop and one with a trailing stop.

        I've attached an example of a set that would place two entries, each with a unique signal name, and an example of the stops and targets that show a fixed stop and a trail stop tied to the entries by the signal name.

        Click image for larger version

Name:	Yannick-2.PNG
Views:	373
Size:	16.0 KB
ID:	1086450

        Click image for larger version

Name:	Yannick-3.PNG
Views:	334
Size:	12.7 KB
ID:	1086451
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by timmbbo, Today, 08:59 AM
        1 response
        2 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by KennyK, 05-29-2017, 02:02 AM
        2 responses
        1,280 views
        0 likes
        Last Post marcus2300  
        Started by fernandobr, Today, 09:11 AM
        0 responses
        2 views
        0 likes
        Last Post fernandobr  
        Started by itrader46, Today, 09:04 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by bmartz, 03-12-2024, 06:12 AM
        5 responses
        33 views
        0 likes
        Last Post NinjaTrader_Zachary  
        Working...
        X