Download MetaTrader 5
To add comments, please log in or register
Do you have Linux? Find out how to install MetaTrader on it!
Michael
9
Michael 2014.03.30 06:06 

Hi Guys,

I am working on an indicator which performs most of it's work in a background thread, using OnTimer to fetch and update the indicator..

The trouble I'm having, is that the indicator does not update until the chart is moved (eg. scroll left/right, tick, zoom etc..). I have tried sending WM_PAINT to the HWND of the chart, but it doesn't seem to have any effect...

Any ideas?

Michael

qjol
3243
qjol 2014.03.30 06:36  

OnTimer doesn't depend on a tick or anything else

show the relevant code in case you need help

Keith Watford
Moderator
7907
Keith Watford 2014.03.30 06:50  

Obviously, I have no idea what your indicator does or what it draws.

Have you tried using ChartRedraw() ?

Michael
9
Michael 2014.03.31 20:00  

Hey guys,

gjol: Yea I know - my indicator runs in it's own thread, and takes too long to generate data, so I poll it with OnTimer.

GumRai: That did the job perfectly - thanks so much!

Keith Watford
Moderator
7907
Keith Watford 2014.04.01 00:02  
emptee:

Hey guys,

GumRai: That did the job perfectly - thanks so much!

Your welcome :)

I just hope that you didn't waste hours searching through the code, like I did, before learning this

/
To add comments, please log in or register