I was wondering if anybody knows how to change the labeling on the y-axis of an indicator?
At present my indicator has a fixed range of values running from -100 to +100. I have added levels at +30, +50 and +70. I am happy with the labels on the level lines. However, I would like to change the label of the zero line from "0.00" to simply "0" and remove the label "-100" at the bottom.
Best regards, Andrew.
Sure. Not going to post the whole indicator because it is mostly irrelevant, but here are the salient bits.
First set up the limits for the y-axis:
#property indicator_minimum -100
#property indicator_maximum 100
The layer on the levels:
IndicatorSetDouble(INDICATOR_LEVELVALUE, 0, 30);
IndicatorSetDouble(INDICATOR_LEVELVALUE, 1, 50);
IndicatorSetDouble(INDICATOR_LEVELVALUE, 2, 70);
How do I manipulate the labels on the y-axis? Level labels are fine but I want to change the label at "0.00" and remove the label at "-100".
#property indicator_minimum 0
Have you tried that?
Be advised that changing minimum and maximum might makes your indicator calculate incorrectly and thus wrong plotting.
To add comments, please log in or register