Download MetaTrader 5

Can't place text - example code does NOT work

To add comments, please log in or register
enjoysmath
64
enjoysmath  

The example code for MQL4 can be found here:

 

 https://docs.mql4.com/constants/objectconstants/enum_object/obj_text

 

 What it does:  Absolutely nothing!!!!

Someone please help with displaying text at any time / price.  This should be an easy thing to do. 

enjoysmath
64
enjoysmath  
I've tried cutting up the example code and even borrowing ideas from it seems to fail or crash the indicator.
Keith Watford
Moderator
9994
Keith Watford  

Apart from int i being declared twice it works as it should. There is an error report when compiling it. Once the second declaration is removed, no problem.

Please note that it is a script, so copying and pasting into an indicator (as it is) will not work properly. 

whroeder1
15019
whroeder1  
enjoysmath What it does:  Absolutely nothing!!!!
  1. I put the code, in a script, compiled, and ran
  2. What is does: Absolutely perfect!!!

    Click on the image.

enjoysmath
64
enjoysmath  
Thanks got it to work.
To add comments, please log in or register