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 to set profit target bollinger Bands

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

    How to set profit target bollinger Bands

    Hi,I can't find a solution how to set the profit target at the middle band of the bollinger indicator in the strategy builder.Is there somebody that can help me?

    Thanks
    Last edited by Italianforex; 04-10-2019, 07:22 PM.

    #2
    Hello Italianforex,

    Thanks for your post and welcome to the NinjaTrader forums!

    Are you using the NT8 Strategy Builder or are you writing directly in Ninjascript to create your strategy?

    Paul H.NinjaTrader Customer Service

    Comment


      #3
      I'm usiny NT8 Strategy Builder.

      Thanks

      Comment


        #4
        Hello Italianforex,

        Thanks for your reply.

        The strategy builder provides a SetProfitTarget() however this cannot be used for a dynamically changing value such as the Bollinger as the profit target is set when the strategy is loaded.

        To accomplish your goal you would need to create a set that:
        1) Checks to see that you are in a long position (Using Strategy>Current MarketPosition == Strategy>MarketPosition>Long
        2) add a check to see if the price is at or greater than the Bolllinger middle band (using Price>High[0] >= Indicator>Bollinger>value plot middle)
        3) as an action, calls ExitLong()

        You would then need to create another set to cover the short exit.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Hello, I'm facing a similar problem (I want to exit at the upper bollinger band). I tried to create a dynamic profit target on the upper band using the strategy builder but it didn't work. Could you please provide a sample code for this solution? The 3 steps above weren't enough for me (sorry, I can't code). Thank you.

          Comment


            #6
            Hello DudaoRJ,

            Thanks for your post.

            Please see the help guide for the conditions builder which shows examples, here is a link to the page for your convenience: https://ninjatrader.com/support/help...on_builder.htm

            Also, here is a link to a recorded webinar on the Strategy Builder: https://www.youtube.com/watch?v=HCyt...We0Nf&index=11

            I've attached a screenshot of what the strategy builder conditions window would look like when checking to see if you are in a long position and if the close of the bar closes above the upper band of the bollinger indicator, the action to then exit long.

            Click image for larger version

Name:	DudaoRJ-1.PNG
Views:	775
Size:	26.9 KB
ID:	1075164
            Paul H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Davide999, 05-18-2023, 03:55 AM
            4 responses
            554 views
            1 like
            Last Post kcwasher  
            Started by Stanfillirenfro, Today, 07:23 AM
            2 responses
            10 views
            0 likes
            Last Post Stanfillirenfro  
            Started by rexsole, Today, 08:39 AM
            2 responses
            6 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by cmtjoancolmenero, Yesterday, 03:58 PM
            6 responses
            29 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by gbourque, Today, 06:39 AM
            2 responses
            14 views
            0 likes
            Last Post gbourque  
            Working...
            X