Can't place text - example code does NOT work

 

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. 

 
I've tried cutting up the example code and even borrowing ideas from it seems to fail or crash the indicator.
 

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. 

 
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.

 
Thanks got it to work.
Reason: