Attachments forums

List of attachments posted on this forum.


All files on forums: 161024

Re: MT4 Indicator requests and ideas

luo83868008, Sat Nov 26, 2022 2:12 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!

//2 clicks on the button ?
All files in topic