OBJ_TEXT is anchored in time and price not xy coordinates. Check documentation. There is an example in there.
https://www.mql5.com/en/docs/constants/objectconstants/enum_object/obj_text
![Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Types / OBJ_TEXT Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Types / OBJ_TEXT](https://c.mql5.com/36/83/documentation-on-mql5-constants__7.png)
Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Types / OBJ_TEXT
- www.mql5.com
Text object. Note Anchor point position relative to the text can be selected from ENUM_ANCHOR_POINT enumeration. You can also change text slope...
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
I'm trying to write some text on the top or bottom of the candle (closest possible). I'm using the code below without success:
Please, can anybody point me to what I'm doing wrong.
Thanks.