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

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 inanazsocial, Today, 01:15 AM
                1 response
                5 views
                0 likes
                Last Post NinjaTrader_Jason  
                Started by rocketman7, Today, 02:12 AM
                0 responses
                10 views
                0 likes
                Last Post rocketman7  
                Started by dustydbayer, Today, 01:59 AM
                0 responses
                1 view
                0 likes
                Last Post dustydbayer  
                Started by trilliantrader, 04-18-2024, 08:16 AM
                5 responses
                23 views
                0 likes
                Last Post trilliantrader  
                Started by Davidtowleii, Today, 12:15 AM
                0 responses
                3 views
                0 likes
                Last Post Davidtowleii  
                Working...
                X