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

Dynamic profit target

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

    Dynamic profit target

    Hello everyone,

    I've been trying to come up with a dynamic profit target for my script when using range bars. ATR doesn't do a great job when using non-time based charts. I've been thinking of a few options such as including volume analysis of the current bar vs. previous but that also hasn't been great. The PT should be dynamic in the sense that if volatility is low it doesn't shoot off very far and if its high it keeps going till it flat.

    Any recommendations are highly appreciated!
    Thanks in advance..

    Ash

    #2
    Hello ashmanz80,

    Thanks for opening the thread.

    It is possible to create a dynamic profit target and dynamic stop loss using the Managed Approach's SetStopLoss() and SetProfitTarget() methods inside of OnBarUpdate().

    You could place a check using the Volume Series object that can trigger a different SetProfitTarget() if the volume is above or below a certain amount.

    I would not be able to provide trade advise for what you should do. If you opened this thread looking for that kind of input, perhaps other members would like to share their advise.

    As for dynamic profit targets and using the Volume Series object, the documentation on these items can be found below:

    SetProfitTarget() - http://ninjatrader.com/support/helpG...ofittarget.htm

    Volume Series - https://ninjatrader.com/support/help...ies_volume.htm

    Please let me know if I can be of further help.
    JimNinjaTrader Customer Service

    Comment


      #3
      Thanks Jim. Appreciate your feedback. I was just thinking of ideas ..I have no issue placing dynamic profit and stop orders. I actually have a dynamic stop loss order which does a good job. The issue is profit targets.. can't think of something that is truly smart for profit targets to make it work properly with different market conditions (flat vs trending). Any ideas are welcome from the community.

      Comment


        #4
        its dead silent here.. anyone bother to bounce ideas here? if its good I can share the code with the best idea.

        Comment


          #5
          Hi,

          Tried using ROC or when price get's far away from mean etc.?


          br,
          Chris

          Comment


            #6
            Hi Chris,

            I've settled on ATR for (n) periods. Seems to be doing ok for now. I still use some discretion on exits..
            appreciate the feedback though!

            Comment


              #7
              No worries!

              I'm actually trying to accomplish something similar, as "visual backtesting" seems to work best with ATR as TP & SL.

              I'm however having trouble with getting ATR as a TP or SL in my strategy. I have tried to "SetProfitTarget("",CalculationMode.Pips,ATR(Close ,14)[0]; in the strategy builder, stops and targets but it doesn't work.

              How did you get this working?

              br,
              Chris

              Comment


                #8
                I used this

                SetProfitTarget("",CalculationMode.Price, Position.AveragePrice - ATR(ATRPeriod)[0]);

                Comment


                  #9
                  Thanks!

                  I guess it should be Position.AveragePrice + ATR(ATRPeriod) and not Position.AveragePrice - ATR(ATRPeriod) , right?

                  br,
                  Chris

                  Comment


                    #10
                    depends on the initiated position really (short vs.long)

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Perr0Grande, Today, 08:16 PM
                    0 responses
                    2 views
                    0 likes
                    Last Post Perr0Grande  
                    Started by elderan, Today, 08:03 PM
                    0 responses
                    4 views
                    0 likes
                    Last Post elderan
                    by elderan
                     
                    Started by algospoke, Today, 06:40 PM
                    0 responses
                    10 views
                    0 likes
                    Last Post algospoke  
                    Started by maybeimnotrader, Today, 05:46 PM
                    0 responses
                    9 views
                    0 likes
                    Last Post maybeimnotrader  
                    Started by quantismo, Today, 05:13 PM
                    0 responses
                    7 views
                    0 likes
                    Last Post quantismo  
                    Working...
                    X