Rendering text at the computed SMA value, specific to the chart EA is on
From ObjectCreate() help:
Note Objects of the OBJ_LABEL type ignore the coordinates. Use the ObjectSet() function to set up the OBJPROP_XDISTANCE and OBJPROP_YDISTANCE properties. |
|---|
For some reason, the labels "H4 SMA" and "H1 SMA" are not being rendered on the y-axis where the H1 SMA has been calculated.
Instead, they are always rendered at the exact same place on every chart that I put this EA on.
How can I get the labels to render at the computed value of the SMA?
Source code follows: