How to run realtime "CHART_BRING_TO_TOP" (Indicator)

 

Hi. i create indicator for change pair chart. - MQL4

with  button :  ChartSetInteger(chartID,CHART_BRING_TO_TOP,0,true);

my problem :  "CHART_BRING_TO_TOP" runing after get new tick. i need chart change realtime when i press button.

Thanks 

 
Use chartevent keydown in indicator.
 
  1. You test for buttons and keys in OnChartEvent not in OnTick.
  2. Why did you post your MT4 question in the MT5 Indicators section instead of the MQL4 section, (bottom of the Root page?)
              General rules and best pratices of the Forum. - General - MQL5 programming forum?
    Next time post in the correct place. The moderators will likely move this thread there soon.

 

Thanks for reply. i already solve the problem with 1 single command.

sorry for wrong section and thank you. 

 
Fonal #:

Thanks for reply. i already solve the problem with 1 single command.

sorry for wrong section and thank you. 

Hey, Can you tell how you fixed that. I'm having the same issue.

 
Muhammad Hammad Maqsood #:

Hey, Can you tell how you fixed that. I'm having the same issue.
Adding this piece of code along with the CHART_BRING_TO_FRONT fixes the delay!

MqlTick ti;
SymbolInfoTick(ChartSymbol(chart_id,ti));
Reason: