Create and set co-ordinates of your label in init then just use ObjectSetText in start.
mar:
ObjectCreate() an Object that already exists will generate an error. . . you just aren't seeing the error . . . do an ObjectFind() to see if it exists before you try and create it, if it already exists there is no need to create it again . . . just do as GumRai says and change the text each time.
Hi Forum,
I created a small indicator printing the spread as a label-object. It works fine. I just have a technical question:
The label-object is printed with every tick. Is it a problem when the object is printed and printed again? Is is "better" to delete it before creating it new?
I do it this way:
I can't use Comment() because this is just a small part of a more complex indicator. I just wanted to know if this is the "cleanest" way to do it by using a label-object.
Thanks guys!!
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
Hi Forum,
I created a small indicator printing the spread as a label-object. It works fine. I just have a technical question:
The label-object is printed with every tick. Is it a problem when the object is printed and printed again? Is is "better" to delete it before creating it new?
I do it this way:
I can't use Comment() because this is just a small part of a more complex indicator. I just wanted to know if this is the "cleanest" way to do it by using a label-object.