Help needed and appreciated. Problem in using Button in Expert Advisor
hhemmat:
I Don't know why Expert doesn't delete the button.
Please someone help me find why
You have to pass the ID to the function otherwise it won't know what button
void OnChartEvent(const int id,const long &lparam,const double &dparam,const string &sparam) { if(sparam==buttonID) // Activation Button { Print("Button Pressed"); Action_Button(buttonID); ObjectSetInteger(0,buttonID,OBJPROP_STATE,false); } } void Action_Button(string buttonID) { Print("Button Pressed Subroutine"); ExpertActive=true; ObjectDelete(0,buttonID); }