• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATR Targets from Secondary Data Sets

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

    ATR Targets from Secondary Data Sets

    I am VERY green to coding in Ninjascript, and I would like to translate one of my ideas into code. I have been pretty successful generating strategies in the Strategy Builder, so kudos to the developers on that feature. It has been incredibly useful, and I have learned some small tidbits of Ninjascript from unlocking code on some of my strategies and tinkering.

    With that being said, I have hit a bit of a technical roadblock. I am uncertain how to reference a secondary data set in a profit target. Specifically, I would like the strategy to take profits after entering and attaining a set multiple of the DAILY ATR. I am trading tick charts, but would like to use the either today's or yesterday's Daily time frame ATR. I don't believe there is a way to do this without editing code, or at least I have been unable to determine how to make this in the Strategy Builder.

    I have searched through the forum a bit for this, but I only see threads concerning the incorporation of ATR in general for various things, but not from a second data set. They are also almost all not for my version, NT8, and are for NT7 instead.

    Any help that can be provided is appreciated in advance! Thanks!

    #2
    Hello liquid150, and thank you for your question.

    I have prepared a video where I demonstrate this in the Strategy Builder. Please let us know if there are any other ways we can help.

    https://www.screencast.com/t/ahGohvoJQKs
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_JessicaP View Post
      Hello liquid150, and thank you for your question.

      I have prepared a video where I demonstrate this in the Strategy Builder. Please let us know if there are any other ways we can help.

      https://www.screencast.com/t/ahGohvoJQKs
      Hi Jess, how can this method be used as a profit target? I don't believe that I understand how this would work. Is this measuring the profit target from an entry point in any way?

      Comment


        #4
        Generally speaking if you would like a profit target to occur conditionally with more options than are given to you through SetProfitTarget and SetStopLoss in the strategy builder, after you set up the condition you'd like to exit on (as I have done in my video), your next step would be to add an Action which places an Exit order. Exit orders can be safely called, since they will be ignored if you are not in a position. Other conditions in the Conditions section will let you determine how long it has been since you've placed an entry order (Misc -> Bars Since Entry / Exit), and how many ticks of profit you have made (Strategy -> Unrealized PnL). In both these cases you can compare against a numeric value with Misc -> Numeric Value.

        I would like to encourage you to explore the Conditions and Actions section, and come to us with any questions we can help with.
        Jessica P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_JessicaP View Post
          Generally speaking if you would like a profit target to occur conditionally with more options than are given to you through SetProfitTarget and SetStopLoss in the strategy builder, after you set up the condition you'd like to exit on (as I have done in my video), your next step would be to add an Action which places an Exit order. Exit orders can be safely called, since they will be ignored if you are not in a position. Other conditions in the Conditions section will let you determine how long it has been since you've placed an entry order (Misc -> Bars Since Entry / Exit), and how many ticks of profit you have made (Strategy -> Unrealized PnL). In both these cases you can compare against a numeric value with Misc -> Numeric Value.

          I would like to encourage you to explore the Conditions and Actions section, and come to us with any questions we can help with.
          I think I understand now. I have been using similar methodology to create trailing stops as shown in the video. Are you telling me if I use Unrealized PnL instead of close price, then this will function as a profit target?

          Thanks so much Jess. You're my hero.

          Comment


            #6
            You're exactly right The profit target and stop loss you set on the screen after the Conditions and Actions screen are for simplified profit target and stop loss action. The idea is that traders who wanted more advanced control would set up conditional exit orders instead.

            Please let us know if there are any other ways we can help.
            Jessica P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by claxxical, Today, 10:00 PM
            0 responses
            5 views
            0 likes
            Last Post claxxical  
            Started by ct, Today, 08:13 PM
            0 responses
            6 views
            0 likes
            Last Post ct
            by ct
             
            Started by Lumbeezl, Today, 05:17 PM
            0 responses
            6 views
            0 likes
            Last Post Lumbeezl  
            Started by wishing, Today, 03:33 PM
            0 responses
            10 views
            0 likes
            Last Post wishing
            by wishing
             
            Started by ATMtrader0001, Today, 01:48 PM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_PaulH  
            Working...
            X