• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 rickyblah12, Today, 01:01 PM
                0 responses
                7 views
                0 likes
                Last Post rickyblah12  
                Started by dadarara, Today, 12:18 PM
                0 responses
                7 views
                0 likes
                Last Post dadarara  
                Started by joemiller, Today, 07:33 AM
                0 responses
                8 views
                0 likes
                Last Post joemiller  
                Started by TheGameOfProbabilities, 07-18-2019, 06:56 AM
                7 responses
                38 views
                0 likes
                Last Post DaveS
                by DaveS
                 
                Started by claxxical, Yesterday, 10:00 PM
                0 responses
                12 views
                0 likes
                Last Post claxxical  
                Working...
                X