chart scaling modification within pla code

Questions about MultiCharts and user contributed studies.
Bundscalper1
Posts: 6
Joined: 24 Mar 2015

chart scaling modification within pla code

Postby Bundscalper1 » 16 Apr 2015

Hi,

I am wondering if it is possible to modify chart scaling from my pla code.

I want to have a fixed scale, f.e. 20 points, it should start with 10 points above / below last price.
Is this possible to define within my code ?

I want to programmatically modify the "User Defined" values within Scaling Tab under Format Instrument. I do not want an outomatic recenter.
I want to see how the market moves out of the chart and then follow manually the market with the keyboard keys arrow Up / Down. SC has such scaling feature integrated without any coding ...

If this should not be possible because there are no such keywords can anyone help me with a workaround,like, f.e. having an invissible indicator that forces the chart to do what i want.

Any idea would be appreciated.

Thx

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

Re: chart scaling modification within pla code

Postby Henry MultiСharts » 23 Apr 2015

Hi,
I am wondering if it is possible to modify chart scaling from my pla code.
Hello Bundscalper1,

There is no such option.
If this should not be possible because there are no such keywords can anyone help me with a workaround,like, f.e. having an invissible indicator that forces the chart to do what i want. Any idea would be appreciated. Thx
You can do that. You need to enable the option "Same as instrument" for your indicator in PLEditor -> Indicator properties.

Bundscalper1
Posts: 6
Joined: 24 Mar 2015

Re: chart scaling modification within pla code

Postby Bundscalper1 » 23 Apr 2015

Hi,

within PLA when I open any indicator and go to Properties there is no "same as instrument" settings.
There is only "same as symbol".

but this does not help.

Maybe you have a very little code example of what you mean i can do once i have checked in indicator properties "same as symbol"

thx

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

Re: chart scaling modification within pla code

Postby Henry MultiСharts » 28 Apr 2015

Hello Bundscalper1,

You need to specify the maximum and minimum price you would normally specify in the Format->Instrument->Scaling ->User Defined for two plots in your code:

Code: Select all

plot1(1.10000);
plot2(1.09000);
Enable the option "Same as Symbol" and apply the study to your chart.


Return to “MultiCharts”