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

How do I setup the "Trailing Stop" in Strategy Builder?

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

    How do I setup the "Trailing Stop" in Strategy Builder?

    Good morning, I would like through the strategy builder (Stops and Target menu) to be able to use the trailing stop, To follow the price by 12 ticks. I don't know how to use it so that my stop follows & decreases when I have advanced in number of ticks. Note, "Set Stop Loss" works fine.

    Thanx




    Click image for larger version

Name:	Untitled.jpg
Views:	3870
Size:	52.3 KB
ID:	1134844








    #2
    Hello Dvelz702,

    Thanks for your post and welcome to the NinjaTrader forums!

    A trailing stop and the Fixed stop cannot be used on the same order, if applied so, the trailing stop will be ignored.
    From the help guide on 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."

    Your settings for using the Trailing stop are correct if you want the first stop to be 5 tick behind the entry price. As the trade moves into profit, for each tick increase of profit, the trailing stop will be moved forward. Please note that in order to move correctly, the strategy would need to run with Calculate.OnEachTick or Calculate.OnPriceChange.

    From the help guide on SetTrailStop(): "Trail stop orders are modified based on the strategies 'Calculate' settings. In the case of 'Calculate' on bar close, when the bar closes the trail stop order modification will occur using the lowest/highest price of the bar as the reference price to apply the trail offset. Subsequently if the open price of the next bar is significantly higher or lower than this price then there is a possibility that the calculated trail stop price is now an invalid stop price. This is a risk with modifying any stop order closer to the current market price since any modification above/below the current price would be rejected."

    Reference: https://ninjatrader.com/support/help...ttrailstop.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Would it be possible to demonstrate, using Strategy Builder in NT8, how to address your recommendation on the Trailing Stop. I Could not find these settings you referenced. "Please note that in order to move correctly, the strategy would need to run with Calculate.OnEachTick or Calculate.OnPriceChange."

      Thank you.

      Comment


        #4
        Hello Dvelz702,

        Thanks for your reply.

        Yes, you can certainly test using the sim101 account.

        The strategies "Calculate" setting can be set on the "default properties" screen of the strategy builder. I have attached a screenshot to show this.

        Click image for larger version

Name:	StrategyBuilderCalculateSetting.PNG
Views:	3417
Size:	20.1 KB
ID:	1135090


        You may be interested in reviewing these resources on the Strategy Builder if you have not already:

        Free live webinar every other Thursday at 4:00 PM EST, through this link to all webinars: https://ninjatrader.com/PlatformTraining
        Previous recording of the Strategy Builder 301 webinar: https://youtu.be/HCyt90GAs9k?list=PL...auWXkWe0Nf&t=2
        Help guide for the strategy builder: https://ninjatrader.com/support/help...gy_builder.htm
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          What is the solution to this issue with Strategy Builder?

          Comment


            #6
            Download Wiz Trail 4 here : https://www.dropbox.com/s/x7ec5v7iyco83qr/N8_WizTrail_4.zip?dl=1You can also download the example strategies here : https://www....


            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by gravdigaz6, Today, 11:40 PM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by MarianApalaghiei, Today, 10:49 PM
            3 responses
            10 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by XXtrader, Today, 11:30 PM
            0 responses
            4 views
            0 likes
            Last Post XXtrader  
            Started by love2code2trade, Yesterday, 01:45 PM
            4 responses
            28 views
            0 likes
            Last Post love2code2trade  
            Started by funk10101, Today, 09:43 PM
            0 responses
            9 views
            0 likes
            Last Post funk10101  
            Working...
            X