You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Is onTimer() in onTimer()? If yes, what Event in milliseconds is set?
But typically 30 milliseconds to render an animation.
Just a demonstration of Canvas capabilities.
Video is not accelerated, everything works without lags.
OpenCL and DirectX were not used.
If you use OpenCL, the processor will not be loaded at all.
But even with the use of a simple processor the time of formation of one frame is on average 5 -15 milliseconds.
.
I have a multi timer system there:
But typically 30 milliseconds to render an animation.
How do I overcome Canvas render freezing when I rewind the chart using the mouse-click method? Mine doesn't render until I release the mouse.
How to overcome freezing of Canvas rendering when rewinding the chart by mouse-clicking? I don't get it to render until I release the mouse.
This is a problem with the choice of event for redrawing Canvas.
When scrolling the main chart, you can use two events CHARTEVENT_CHART_CHANGE or CHARTEVENT_MOUSE_MOVE (if the mouse button is pressed).
For example, look at this example.
If we are talking about MT4, you may need to use a timer for redrawing, and in OnChartEvent() set only permissive bool marks. Because in MT4 there is a glitch in the event model that leads to lags.
In general, it would be good to accompany your questions about problems with minimal code that reproduces these problems. There would be no need to make guesses and assumptions.
These are problems with the choice of event for redrawing Canvas.
When scrolling the main chart, you can use two events CHARTEVENT_CHART_CHANGE or CHARTEVENT_MOUSE_MOVE (if the mouse button is pressed).
For example, see this example.
If we are talking about MT4, you may need to use a timer for redrawing, and in OnChartEvent() set only permissive bool marks. Because in MT4 there is a glitch in the event model that leads to lags.
In general, it would be good to accompany your questions about problems with minimal code that reproduces these problems. There would be no need to make guesses and assumptions.
Working with events helped to solve my problem.
Thank you!
Is there anyway to use CCanvas and OBJ_BUTTON together?
I created a CCanvas that is the width and height of the entire screen. I set the background to false for the canvas (I added a function to Canvas.mqh for that).
I have another indicator that is loaded on the chart that has buttons to change symbols. But the button clicks are not getting processed. Do I have to make sure the location of the canvas doesn't interfere with the location of the buttons?
Thanks,
Elliot
But the button clicks are not processed. Should I make sure that the layout of the canvas does not interfere with the layout of the buttons?