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

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.

    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 PaulMohn, Today, 05:00 AM
            0 responses
            8 views
            0 likes
            Last Post PaulMohn  
            Started by ZenCortexAuCost, Today, 04:24 AM
            0 responses
            6 views
            0 likes
            Last Post ZenCortexAuCost  
            Started by ZenCortexAuCost, Today, 04:22 AM
            0 responses
            3 views
            0 likes
            Last Post ZenCortexAuCost  
            Started by SantoshXX, Today, 03:09 AM
            0 responses
            16 views
            0 likes
            Last Post SantoshXX  
            Started by DanielTynera, Today, 01:14 AM
            0 responses
            5 views
            0 likes
            Last Post DanielTynera  
            Working...
            X