Unresponsive Buttons - page 2

 
MikeT:

I'm trying to resolve something here... 

Try to add ChartRedraw() at the end of your Trading_Button() function.

And please watch your language.

 

Sure Alain... sorry...

ChartRedraw() is not really an option for me because in my experience it really slows things down.... I have a User Interface that has a lot of "Chart Objects" so ChartRedraw() is a real killer for me...

I'll try it... but, I'm still confused why a simple...

//+-----------------------------------+
//| GUI Trade Info Box                |
//+-----------------------------------+

//--- Rhythm Trading Button -------------------------------------------
   if(id == CHARTEVENT_OBJECT_CLICK
      && sparam == "Rhythm_TradingButton")
      {
      PlaySound("ok.wav");
         if(Allow_Live_Trading==false) 
            {
             Allow_Live_Trading = true; 
            }
         else 
            {
             Allow_Live_Trading = false;
            }
         Trading_Button();
      }

...ChartEvent as above is delayed... even if I had a ChartRedraw() in the code... the "PlaySound("ok.wav") would be first and give me that sound... 

It's just confusing me...

Any ideas...?

edit: What I'm saying is that when I click on that button then the first thing that should happen is that I get the "PlaySound("ok.wav") - sound...or am I missing something here... A ChartRedraw() in my Trading_Button() function should have no effect on the click of the button... surely?

 
39257304:
Guys I have an issue the app doesn't allow me to place my pending orders whilst I have everything correct on my side plz advice me.
Why posting here ? You are off-topic.
 
MikeT:

Sure Alain... sorry...

ChartRedraw() is not really an option for me because in my experience it really slows things down.... I have a User Interface that has a lot of "Chart Objects" so ChartRedraw() is a real killer for me...

I'll try it... but, I'm still confused why a simple...

...ChartEvent as above is delayed... even if I had a ChartRedraw() in the code... the "PlaySound("ok.wav") would be first and give me that sound... 

It's just confusing me...

Any ideas...?

I see.

It's difficult to answer without being able to reproduce the error (so without the source code). You have to monitor your code to find what is the problem.

By the way you don't need to delete and recreate your button just to update it. You can just change the needed properties.

 
Do you think that by adding a function (that triggers the OnChartEvent) more regularly spaced out in my code might work? I'm not even sure if we can do that in Mql4...
 
MikeT:
Do you think that by adding a function (that triggers the OnChartEvent) more regularly spaced out in my code might work? I'm not even sure if we can do that in Mql4...
No I think you need to fix your code. A ChartRedraw() is needed somewhere for sure.
 
Ok... thanx... I'll look into it... thanx for the pointer about deleting the button...
 

Thanx Alain... The ChartRedraw() did the trick.... I've been avoiding it in my code for so long now that I neglected it... Things are now nice and responsive... and my code is running fine...

Thanx

 
MikeT:

Hi Guys...

I'm just wondering if anyone has the same issue... my mql4 "Buttons" (OnChartEvent) on my MT4 charts are very delayed or un-responsive.... It's definitely got something to do with the Data Feed but I have no other way to explain this to you... You will either know what I am talking about or you won't... I'm hoping one of you guru's will...


When I "Click" a button... I'm never sure if I need to "Click" it again.... sometimes it's quick and there are no issues... but other times I need to wait... then either it turns ON or I'm not sure if I should click it again... Sorry for being so vague... but there is no other way to explain it...

ObjectSetInteger(0,"CloseButton1",OBJPROP_STATE,false);

 
Why was MikeT banned???
Reason: