Errors, bugs, questions - page 1456

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
Do you have a solution to this issue in an indicator, without ticks?
And I've said it before. It's strange that you can get the text itself without rendering but not the size.
What do ticks have to do with it? The chart is drawn without ticks.
The size of the text label is found out from the display context using the win api function GetTextExtent. The display context gives this information taking into account the screen resolution and selected font size.
When you first create an object, there is no display context. You could, in principle, create it, but you could easily get into a situation where the "artificially" calculated size will be different from the one that was actually calculated during actual rendering. So, until the object is rendered, its size is unknown.
Try using ChartRedraw() after creation, then check size.
Doesn't work.
In general, you should not draw anything in the indicators before the first event in OnCalculate() - this approach will guarantee the creation of a chart and the correct work with objects.
Approximately like this - at the first tick we create, but the next one SIZE:
In general, you should not draw anything in the indicators before the first event in OnCalculate() - this approach will guarantee the creation of a chart and the correct work with objects.
Approximately so - on the first tick we create, and on the next one we SIZE:
Okay. (chuckles) I'll simulate a few ticks at the weekend.
Is there a function that would return whether the object is rendered?
and WindowRedraw wouldn't help not to wait for a tick?