Re: How do you judge if you are responsible for 3 or 4 tasks when displaying data?

#2741
luo83868008 wrote:
Sat Nov 26, 2022 1:58 pm

Code: Select all

 int start()
{

   recalc = false;
   
       

   
   if (show_data)
      {
      
      //1 click button
      ObjectSetInteger(ChartID(),buttonId,OBJPROP_COLOR,btn_text_ON_color);
      ObjectSetString(ChartID(),buttonId,OBJPROP_TEXT,btn_unpressed);
      start2();
       handleButtonClicks();
      }
      else
      if (show_data1)
      {
      //2 clicks on the button
      ObjectSetInteger(ChartID(),buttonId,OBJPROP_COLOR,btn_text_OFF_color);
      ObjectSetString(ChartID(),buttonId,OBJPROP_TEXT,btn_pressed);     
      deinit2();
       handleButtonClicks();
      }
      else
       {
       //3 clicks on the button
      ObjectSetInteger(ChartID(),buttonId,OBJPROP_COLOR,btn_text_OFF_color);
      ObjectSetString(ChartID(),buttonId,OBJPROP_TEXT,btn_text); 
      handleButtonClicks();
      deinit2();
      }
       return(0);
      } 
Why can the button code be read only twice? thank you!
Sorry, dont know....




Re: Indicators with ON/OFF buttons

#2746
quangvuig wrote:
Tue Nov 29, 2022 3:43 am
Dear developers, I request you to help me add toggles and multi-timeframe MTF. This small request please IT help - add ON/OFF button & multi-timeframe MTF
Image
Tried but can't get the button to work correctly in mtf.

Re: Indicators with ON/OFF buttons

#2750
kvak wrote:
Wed Nov 30, 2022 10:11 am
No mtf, only button....
Image

I am very grateful for the kindness of the programmers. If the dot bar can be converted into a horizontal bar as shown, I think it will be possible to do multi-timeframes. Please help programmers
3.PNG


  1. Similar Topics

    1. What are "buttons" ON/OFF indicators all about?

      1 Replies 302 Views

      by Tradehunter, Tue Nov 08, 2022 2:12 pm in Trader's Lounge

      1 Replies
      302 Views
    2. Add increase/decrease buttons to a panel EA

      1 Replies 1379 Views

      by jjventural, Wed Apr 11, 2018 7:38 pm in Coding Help

      1 Replies
      1379 Views

Return to “MT4 Indicators”

Users viewing this forum: alextschem, CommonCrawl [Bot], Google [Bot], jackishere, Majestic-12 [Bot], waleed060 and 72 guests