I add text to my chart and then switch timeframes, come back and the text is gone. How can i make it stay?
Hi, i have an issue. I add text to my chart and then switch timeframes, come back and the text is gone. How can i make it stay?
- MetaTrader 4 for iOS build 975: redesigned chat interface and in-app language selection
- Filled Rectangles in MT4
- Parabolic SAR inconsistency?
Have you confirmed by looking in the list of objects (Ctrl-B) that it is gone?
- A badly coded indicator/EA deleted all objects on deinit
- Or you added text (which move with the bars) instead of a label
whroeder1:
Yeah, Text. I need it to stay in place so i can keep track of what happened in the past. Is there a way to make it stay?
- A badly coded indicator/EA deleted all objects on deinit
- Or you added text (which move with the bars) instead of a label
Did you have some code maybe it gets deleted upon timeframe switch ?
Marco vd Heijden:
Did you have some code maybe it gets deleted upon timeframe switch ?
Yeah, when i look into the objects list, the text is no longer there.
Did you have some code maybe it gets deleted upon timeframe switch ?
jakubdonovan36: Yeah, when i look into the objects list, the text is no longer there.
| What part of "A badly coded indicator/EA deleted all objects on deinit" was unclear? Fix your broken indicator. |
whroeder1:
What part of "A badly coded indicator/EA deleted all objects on deinit" was unclear? Fix your broken indicator. |
I figured out which indicator it is. It's called "daysofweeklabels" but I can't code. How would i fix this? what is "deinit"
Files:
dayofweeklabels.ex4
29 kb
dayofweeklabels.mq4
7 kb
On lines 168 and 184 you have
Obj_Name=Time[pos];
You should add a prefix
eg. change them to
Obj_Name="DWlabels"+Time[pos];
Then lines 88 and 89 (in deinit)
ObjectsDeleteAll(0,OBJ_VLINE);
ObjectsDeleteAll(0, OBJ_TEXT);
should be replaced with the single line
ObjectsDeleteAll(0,"DWlabels",EMPTY,EMPTY);
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