How to get the keyboard function??

 
Hello, I'm planning to refresh a repaint indicator from inside the indicator, it's similar with using a keyboard shortcut. How to do it? I found an information about it on http://www.metatrader.info/node/167, but it's not working. Anybody know why? Thank you
 
See MQL4 function WindowRedraw.
 
Hi Rosh, Thanks for your reply. But what need to be refreshed is indicator's index, not it's object. I've try your tips but not working. Any other suggestion maybe? Currently the only way to refresh is double click on the indicator then click "ok". Thanks
 
Now I see.
 
err... any suggestion? can we code a script inside the indicator to manually refresh it? Codersguru already suggest how to do it in his website, but somehow it's not working on my terminal. Thanks
 
Hello.. so it's not possible to do it?
 
Indicator buffers are drawn only after function start() has completed its operation, in order not to retard the terminal. This was made purposely, since indicators work in an interface thread.
 

So in short, it's not possible?

Is there no other way to call start() function once the indicator established?


Thanks

 

You can call start() inside your start() if you like.

I haven't figured out what you are trying to do yet.

 

Hi Phy,


Thanks for your respond.

My aim is to make the indicator refreshing it self.

As we now, for some repaint indicators, we need to reattach them to the chart to make it refreshed. So if the indicator could refreshing itself every x minute for example, that would be nice.

Any suggestion?


Thanks


 

To get a repaint on a tick, run back through as many bars as you want repainted. Don't limit the loop with the IndicatorCounted() value.

Reason: