Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Button

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

    Button

    Hello
    I have a button created in the chart, I want that when I click it, it recalculates with an increment the moving average associated to the event.
    What steps should I follow?​

    #2
    Hello Gibranes,

    I am not certain I understand what you are asking, are you saying that for example you used a 12 period SMA, when you click the button you want to calculate a 13 period SMA on the next click?

    Comment


      #3
      If so, is it possible?

      Comment


        #4
        Hello Gibranes,

        IF what I described is what you are asking then yes that is possible. In a button event you need to use a trigger custom event and then call the indicator with the parameters you wanted.



        TriggerCustomEvent(o =>
        {
        /// your code
        double value = SMA(12)[0];
        }, null);​

        Comment


          #5
          Not exactly what I am looking for is to be able to change these values from the button without going into the properties box.
          Is this possible?​ Click image for larger version

Name:	ninja.jpg
Views:	93
Size:	10.7 KB
ID:	1321856

          Comment


            #6
            Hello Gibranes,

            You can reset the properties value if you want to however that won't be reflected if the user opens and reconfigures the properties window or applies a new script, the defaults of the script will apply or the users input values will be used.

            Comment


              #7
              Well, I'll give it a try.
              What code do I look at?​

              Comment


                #8
                Hello Gibranes,

                To set the inputs you would use the same code you used to use the inputs.

                MyInputName = someValue;

                Comment


                  #9
                  But it does not do a reload like entering the properties window.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  671 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  379 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  111 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  575 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  582 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X