Controlling Decimal Places on Indicator Window  [SOLVED]

Questions about MultiCharts and user contributed studies.
IT-Trader
Posts: 26
Joined: 22 Sep 2010
Has thanked: 4 times
Been thanked: 4 times

Controlling Decimal Places on Indicator Window

Postby IT-Trader » 12 Jun 2019

On the status line of an indicator, I want the code to define how many decimal places are shown. Its fine if it affects the scale on the Y axis too.

I can figure out the number of decimal places needed within the code.
I can't see how to then tell MC to use that number in the window.

I can set this manually by going into Format - Study - Scaling but I don't want to have to do that manually each time I change the instrument.
How do I control that setting in EasyLanguage?
Capture.PNG
(27.84 KiB) Downloaded 238 times

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Controlling Decimal Places on Indicator Window  [SOLVED]

Postby Henry MultiСharts » 13 Jun 2019

Hello IT-Trader,

There is no way to control that setting from the code.
If you want the plot value to match the symbol's price scale - you can enable the checkbox "Same as symbol" (right click on the study in PL Editor->Properties->Properties tab). The option will come into effect for the newly applied studies.

IT-Trader
Posts: 26
Joined: 22 Sep 2010
Has thanked: 4 times
Been thanked: 4 times

Re: Controlling Decimal Places on Indicator Window

Postby IT-Trader » 16 Jun 2019

Thanks Henry, that works but by default it then puts the indicator on the price chart rather than in a subchart.

I'm sure I've read somewhere recently that I can specify in EL where to place the indicator (top/bottom/subchart x) etc.
I've looked but I can't find it again! sigh.
Do you know the command for this?

Many Thanks.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Controlling Decimal Places on Indicator Window

Postby Henry MultiСharts » 17 Jun 2019

IT-Trader,

I'm afraid there is no such command. When you add an indicator to the chart, it can be either plotted on the instrument's subchart, or on the individual subchart. Then you can manually change the subchart it is plotted on.

IT-Trader
Posts: 26
Joined: 22 Sep 2010
Has thanked: 4 times
Been thanked: 4 times

Re: Controlling Decimal Places on Indicator Window

Postby IT-Trader » 17 Jun 2019

Just to clarify, I want to place it on its *own* subchart by default but with the same d.p. as the symbol.

However setting the plot value to match the symbol's price scale places the indicator on the main price chart.

Perhaps you could add an option to the Indicator Properties window in PowerLanguage Editor to specify 'Default Placement'.
...and while you're at it, maybe add 'Default Decimal Places'.

Thanks for the help.


Return to “MultiCharts”