Download MetaTrader 5
To add comments, please log in or register
How to choose the most appropriate signal and subscribe to it in no time
rod178
276
rod178 2014.04.28 03:49 


I am endeavoring to have a button redraw, for about one second, to give the appearance of the button being pressed and immediately unpressed, on a single click.
The below code does not delay the change of STATE by one second between true and false. I have also tried a loop delay, instead of Sleep(1000), to no avail.

Any suggestions?

 ObjectSetInteger(0,sparam,OBJPROP_STATE,true); 
 ChartRedraw();
 Sleep(1000); 
 ObjectSetInteger(0,sparam,OBJPROP_STATE,false); 
 ChartRedraw();



Keith Watford
Moderator
7907
Keith Watford 2014.04.28 06:31  
rod178:


I am endeavoring to have a button redraw, for about one second, to give the appearance of the button being pressed and immediately unpressed, on a single click.
The below code does not delay the change of STATE by one second between true and false. I have also tried a loop delay, instead of Sleep(1000), to no avail.

Any suggestions?




If it is in an indicator, sleep will have no effect
/
To add comments, please log in or register