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

Stop and Target indicator for Rockwell trading need to modify code

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

    Stop and Target indicator for Rockwell trading need to modify code

    Here is an indicator that displays stops and targets based on 10% of the 7 day Average Daily Range for the stop and 15% of ADR for Target. For some reason it is not calculating the daily range correctly. I think the code is excluding Saturday and Sunday, this is incorrect. It should include the Sunday session for the emini indexes.

    If anyone wants to take a look at it and modify the code so that it calculates the ADR correctly, that would be great.

    The way Rockwell is calculating the ADR is the entire range for day+overnight session.

    For example, today's Daily Range would be high-low from 3:30PM CST yesterday through 3:15 PM CST today.

    The attached indicator AvgofDailyRange calculates the ADR correctly. I cant figure out how to make the StopTargetInfo indicator calculate ADR this way.
    Attached Files

    #2
    Hello Jason11,

    Unfortunately we can't make the modifications for you, but you're pretty close.

    In the file info.cs you can modify the delcaration of ADR and instead use the other indicator.

    ADR = AvgofDailyRange(1,1)[0];

    I just used 1 , 1, as inputs. You'll want to use values that make sense for the indicator.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Adr

      Hey, I would like to use the ADR indicator and import it into ninja trader, but i can't. I found on your forum some .zip file with the ADR but it doesn't work. Can you help me please?

      Originally posted by Jason11 View Post
      Here is an indicator that displays stops and targets based on 10% of the 7 day Average Daily Range for the stop and 15% of ADR for Target. For some reason it is not calculating the daily range correctly. I think the code is excluding Saturday and Sunday, this is incorrect. It should include the Sunday session for the emini indexes.

      If anyone wants to take a look at it and modify the code so that it calculates the ADR correctly, that would be great.

      The way Rockwell is calculating the ADR is the entire range for day+overnight session.

      For example, today's Daily Range would be high-low from 3:30PM CST yesterday through 3:15 PM CST today.

      The attached indicator AvgofDailyRange calculates the ADR correctly. I cant figure out how to make the StopTargetInfo indicator calculate ADR this way.

      Comment


        #4
        Hello lory.suba,

        Welcome to the NinjaTrader forums!

        To import:

        1. From the Control Center window select the menu File > Utilities > Import NinjaScript to open the Import NinjaScript dialog window
        2. Select the file you want to import
        3. Press the "Open" button
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Thank you for your quick answer. I know how to import the file, but i didn't have what to import, because I didn't have the zip file with the ADR indicator. But I found some files on the forum and now it's okay.



          Originally posted by NinjaTrader_RyanM View Post
          Hello lory.suba,

          Welcome to the NinjaTrader forums!

          To import:

          1. From the Control Center window select the menu File > Utilities > Import NinjaScript to open the Import NinjaScript dialog window
          2. Select the file you want to import
          3. Press the "Open" button

          Comment


            #6
            Can Ninja trader help us with this?

            Hello. Can someone help us with this? I would like to have on my chart the stop loss and the profit target, 10% and 15% of the ADR. Can you help us with this?

            Originally posted by Jason11 View Post
            Here is an indicator that displays stops and targets based on 10% of the 7 day Average Daily Range for the stop and 15% of ADR for Target. For some reason it is not calculating the daily range correctly. I think the code is excluding Saturday and Sunday, this is incorrect. It should include the Sunday session for the emini indexes.

            If anyone wants to take a look at it and modify the code so that it calculates the ADR correctly, that would be great.

            The way Rockwell is calculating the ADR is the entire range for day+overnight session.

            For example, today's Daily Range would be high-low from 3:30PM CST yesterday through 3:15 PM CST today.

            The attached indicator AvgofDailyRange calculates the ADR correctly. I cant figure out how to make the StopTargetInfo indicator calculate ADR this way.

            Comment


              #7
              Lory, as Ryan mentioned we unfortunately could not develop this code for you, however you're pretty close it seems as you would just need to add means to visualize the levels, right?

              You could for example draw trendlines / horizontal lines at the levels indicated by the calcs.
              BertrandNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by lightsun47, Today, 03:51 PM
              0 responses
              4 views
              0 likes
              Last Post lightsun47  
              Started by 00nevest, Today, 02:27 PM
              1 response
              8 views
              0 likes
              Last Post 00nevest  
              Started by futtrader, 04-21-2024, 01:50 AM
              4 responses
              44 views
              0 likes
              Last Post futtrader  
              Started by Option Whisperer, Today, 09:55 AM
              1 response
              13 views
              0 likes
              Last Post bltdavid  
              Started by port119, Today, 02:43 PM
              0 responses
              8 views
              0 likes
              Last Post port119
              by port119
               
              Working...
              X