Changing y-axis labels for an Indicator

 

Hi!

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.

Labels on y-axis

Any ideas?

Best regards, Andrew.

 
The code? Please use SRC when posting the code.
 

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:

   IndicatorSetInteger(INDICATOR_LEVELS, 3);
   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.

 
Yeah, absolutely, that sorts out the labeling of the zero line... but I want to have the full range of -100 to 100 on the y-axis.
 
collierab:
Yeah, absolutely, that sorts out the labeling of the zero line... but I want to have the full range of -100 to 100 on the y-axis.
I don't think it's possible to change level 0, it's built-in. Nor to hide a label, either you have a level with a label, either you don't have a level.