Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Disallow change of parameter as specified?

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

    Disallow change of parameter as specified?

    Is there any way to prevent a parameter from being changed once it has been specified and applied to the chart?

    Scenario:
    I have an input parameter on an indicator which triggers code to be executed. Due to the processing in my code if the user changes this value and then reapplies it to the chart it causes my code not to work correctly.

    Currently if I need to change it i just remove the indicator and add it back.withe h different value.
    Can I lock a parameter once a value is entered so it can't be changed or is there some unique value like a task number or unit-of-work-id for a chart so I can save my values with a retrievable unique name and perform the checking myself?
    Last edited by ct; 09-27-2015, 10:08 AM.

    #2
    Hello ct,

    Thank you for writing in. Could you please let me know exactly where in your indicator you are calling the code that is causing the issue? If you could give me a basic code example of what is going on in your actual script, this would help me to provide any possible solutions.

    In general I would say this is not possible, but based on what you are saying it appears you may already have a workaround in how your code is executing in the first place.

    Thank you in advance.
    Michael M.NinjaTrader Quality Assurance

    Comment


      #3
      Michael

      In simple form is there a way I can uniquely identify one chart from another within an indicator in NinjaTrader? I need a way to link back the data I have saved back to the chart. A combination of market/time-frame/other data is not unique. I need a CurrentBar function for a chart.

      Comment


        #4
        Hello ct,

        Thank you for clarifying. Unfortunately I do not have a solution for you at this time. I will continue investigating this and update you as soon as possible.

        Thank you for your continued patience in the meantime.
        Michael M.NinjaTrader Quality Assurance

        Comment


          #5
          Michael

          Thanks for the extra effort. We will see if you come up with something.

          Cheers

          Comment


            #6
            Hello ct,

            This will give you an ID for a chart that is unique (so far as I can tell) during the time you have the program open. Upon restarting the program these values will change.

            Code:
            Print(ChartControl.Controls[0].TopLevelControl.Handle.ToString());
            Please let me know if I may be of further assistance.
            Michael M.NinjaTrader Quality Assurance

            Comment


              #7
              Michael

              You are a star. That will be perfect.

              Cheers

              Comment


                #8
                Hello ct,

                It is always my pleasure. Please let me know if I may be of further assistance anytime.
                Michael M.NinjaTrader Quality Assurance

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Hwop38, 05-04-2026, 07:02 PM
                0 responses
                169 views
                0 likes
                Last Post Hwop38
                by Hwop38
                 
                Started by CaptainJack, 04-24-2026, 11:07 PM
                0 responses
                327 views
                0 likes
                Last Post CaptainJack  
                Started by Mindset, 04-21-2026, 06:46 AM
                0 responses
                252 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by M4ndoo, 04-20-2026, 05:21 PM
                0 responses
                353 views
                0 likes
                Last Post M4ndoo
                by M4ndoo
                 
                Started by M4ndoo, 04-19-2026, 05:54 PM
                0 responses
                181 views
                0 likes
                Last Post M4ndoo
                by M4ndoo
                 
                Working...
                X