Download MetaTrader 5
To add comments, please log in or register
Code Base will help you in mastering your theoretical skills. Come and learn!
rod178
274
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
9418
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