Dear Nic,
I’m asking if you could please help create a simple watermark indicator that displays the name/pair being traded just like on Tradingview.
It would really help with multiple charts from a glance.
I tried to just use “Anchored Text” but I can’t chose a large enough size with the font.
I have an MQL4 code which creates the watermark in MT4 but I’m unsure on where to start with Prorealcode.
This is a rough idea, but it will not work as expect:
defparam drawonlastbaronly=true
middle = (highest[barindex](high)+lowest[barindex](low))/2
drawtext("GBPUSD",round(barindex/2),middle,Dialog,Bold,30) coloured(100,100,100,100)
return
Vertical and horizontal axis are not in pixels, but in barindex/price and while we know how much bars are loaded, we can’t know how much of them are actually displayed on the screen. In this example, I’m displaying the instrument name (which cannot be retrieved automatically, so you’ll have to write it in the code) at the middle of loaded history (X coordinate) and at the average price detected for that price history (Y coordinate).
The biggest font height is 30, so It could be narrowed on a wide area of price like in my test.
Thanks Nic, really appreciate the help 🙂