Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Varying Indicator Parameters

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

    Varying Indicator Parameters

    Hi

    I've tried searching the forum but I'm not too sure what I'm searching for!

    I'm developing an indicator that needs to access the value of another indicator, in this case T3.
    I know I can access the current value of T3 with T3(34,3,0.01)[0], for example, but T3 parameters may be changed by the user to other values (e.g. 21, 2, 0.5). How can I get my indicator to access the current parameters of T3.

    Not sure if that is clear and that's why I'm having trouble searching for the answer.

    Many thanks.

    #2
    Hi FatCanary,

    Can you clarify "but T3 parameters may be changed by the user"...
    Changed where?

    If you explicitly call the indicator with it's parameters as in "T3(34,3,0.01)[0]" that is the value you will always get.

    If you are referring to trying to access an active version of the indicator that is changed, for example, on a random chart, unfortunately that is not supported.
    TimNinjaTrader Customer Service

    Comment


      #3
      By "but T3 parameters may be changed by the user"... I mean on a chart.

      So can I program my indicator to access the current parameters that are being used by another indicator on the same chart, in this case T3?

      I'm guessing from your reply that this is not supported.

      Thanks for the swift reply.

      Comment


        #4
        Hi FatCanary,

        Correct, not supported.
        TimNinjaTrader Customer Service

        Comment


          #5
          Originally posted by FatCanary View Post
          Hi

          I've tried searching the forum but I'm not too sure what I'm searching for!

          I'm developing an indicator that needs to access the value of another indicator, in this case T3.
          I know I can access the current value of T3 with T3(34,3,0.01)[0], for example, but T3 parameters may be changed by the user to other values (e.g. 21, 2, 0.5). How can I get my indicator to access the current parameters of T3.

          Not sure if that is clear and that's why I'm having trouble searching for the answer.

          Many thanks.
          Hi FatCanary,

          It may not be that hard. First open up T3 and save it under a new name.

          Now you have an indicator with the same variables as T3.

          Open up strategy analyzer and create a strategy using the T3 indicator to do something. To get the code your going to need, Now view the code. copy the code sequence that calls T3 and paste it into the bar update section. This code has numeric values for each variable.

          When you place the cursor over T3 code, intellisense will light up with the names of each variable used by T3. Rename each numeric variable with its name.

          Now you have a T3 indicator feed into your current indicator, controlled by the variables of the current indicator.

          Remove original code for T3 calculations and add what ever else you need.

          Its very do able.

          RJay
          RJay
          NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

          Comment


            #6
            Hi RJay

            I had already tried that. Not sure I need to create a strategy though as intellisense works within the indicator code.

            The result when trying this method was an error saying that the variables had not been defined, in the case of T3 these would be period, tCount and vFactor.

            Thanks for the suggestion though.

            Comment


              #7
              Not sure why it isn't working for you. Works just fine here.

              Here is a NT7 beta18 version of what I was referring to.
              Attached Files
              RJay
              NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

              Comment


                #8
                I may be missing the point but I'm trying to access T3(period, tCount, vFactor) from another indicator.

                I was trying, within my indicator, if(Low[0] < MyT3(34,3,0.01)[0]) which is fine if T3 parameters match my hard coded ones. If T3 is changed (on the chart) to (21,3,0.5), for example, my indicator will not be referencing the changed T3 parameters.

                I can't use T3(period, tCount, vFactor) in my indicator because period, tCount, vFactor won't be defined.

                Comment


                  #9
                  Originally posted by FatCanary View Post
                  I may be missing the point but I'm trying to access T3(period, tCount, vFactor) from another indicator.

                  I was trying, within my indicator, if(Low[0] < MyT3(34,3,0.01)[0]) which is fine if T3 parameters match my hard coded ones. If T3 is changed (on the chart) to (21,3,0.5), for example, my indicator will not be referencing the changed T3 parameters.

                  I can't use T3(period, tCount, vFactor) in my indicator because period, tCount, vFactor won't be defined.
                  The variables in the new indicator control the parameters for the T3 input in the new indicator.

                  Don't be confused because the variable names are the same for both indicators.

                  If you have a separate T3 indicator on the chart, it's parameters are set with its own variables.

                  You can do both if I am understanding you correctly.
                  RJay
                  NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

                  Comment


                    #10
                    Hi RJay

                    Really appreciate the help.

                    So, are you saying that if I have a T3 indicator on a chart and then my own separate indicator on the same chart, my indicator should be able to plot based upon the T3 value no matter what parameters T3 is set to?
                    I can understand how this would work if I modified the T3 code to include the code for my indicator, so then I'm just working with one indicator.

                    I'm confused as Tim says that what I'm trying to do is not supported. I take that to mean that NT physically can't do this rather than it's beyond what they provide support for.

                    Comment


                      #11
                      Hi FatCanary,

                      To clarify, it is outside the scope of support we can offer. Keep in mind NinjaScript is based on the C# language, which has practically endless possibilities, we simply can't provide support for everything.
                      TimNinjaTrader Customer Service

                      Comment


                        #12
                        Originally posted by FatCanary View Post
                        Hi RJay

                        Really appreciate the help.

                        So, are you saying that if I have a T3 indicator on a chart and then my own separate indicator on the same chart, my indicator should be able to plot based upon the T3 value no matter what parameters T3 is set to?
                        I can understand how this would work if I modified the T3 code to include the code for my indicator, so then I'm just working with one indicator.

                        I'm confused as Tim says that what I'm trying to do is not supported. I take that to mean that NT physically can't do this rather than it's beyond what they provide support for.
                        Hi FatCanary,

                        Let me clarify, the T3 indicator is adjusted from its own parameters.

                        The new indicator with the T3 feed is treated like a second T3 indicator by NT and is adjusted by its own parameters..

                        Making parameter changes to one of these indicators will not automatically change the parameters of the other.

                        Does this help???

                        RJay
                        RJay
                        NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

                        Comment


                          #13
                          Hi Tim

                          Thanks for clarifying. I fully understand that you cannot provide support for everything.

                          RJay

                          Not sure if that helps or not ;-)

                          I'm now assuming, from Tim's post, that what I want to do is possible. I'm just having trouble getting my head round it!

                          If there is a T3 indicator (or any other indicator for that matter) on the chart I want to be able to access it's current parameters.
                          So, they may currently be T3(31, 3, 0.1) but the user (me) may change them to T3(21, 3, 0.5), for example.
                          I can't work out how to pick up this change in my own indicator.

                          Comment


                            #14
                            Originally posted by FatCanary View Post
                            Hi Tim

                            Thanks for clarifying. I fully understand that you cannot provide support for everything.

                            RJay

                            Not sure if that helps or not ;-)

                            I'm now assuming, from Tim's post, that what I want to do is possible. I'm just having trouble getting my head round it!

                            If there is a T3 indicator (or any other indicator for that matter) on the chart I want to be able to access it's current parameters.
                            So, they may currently be T3(31, 3, 0.1) but the user (me) may change them to T3(21, 3, 0.5), for example.
                            I can't work out how to pick up this change in my own indicator.
                            You need to manually change the numbers for the parameters to the parameter names.

                            Change T3(31, 3, 0.1) to T3(period, tCount, vFactor)

                            Then you can dynamically change the parameter settings for each indicator on the fly.

                            Look at the file I uploaded in an earlier post for examples.


                            You can also change parameter default settings in variables area when you find values that you like.

                            Current defaults are:

                            private double vFactor = 0.7;
                            private int tCount = 3;
                            private int period = 14;


                            RJay
                            RJay
                            NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

                            Comment


                              #15
                              So, are you saying that if I changed the parameters for T3 (that is already on the chart) I could then go into my indicator and change the parameters to match those of T3.

                              I'm not sure if I am missing your point or whether I've not explained my needs probably ;-(

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              596 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              343 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              103 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              556 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              554 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X