Plot - PlotName

Questions about MultiCharts and user contributed studies.
HummerH1
Posts: 66
Joined: 13 Sep 2011
Has thanked: 6 times
Been thanked: 1 time

Plot - PlotName

Postby HummerH1 » 16 Dec 2011

Why can't I put the PlotName from a String Variable like that:

Code: Select all

Var: strTemp("");

strTemp="Test";
plot2(1,strTemp);
This gives an error: Wrong plot name or missed ')' :(

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

Re: Plot - PlotName

Postby Henry MultiСharts » 19 Dec 2011

The line name is displayed in the Format Study->Style tab and cannot be modified.

HummerH1
Posts: 66
Joined: 13 Sep 2011
Has thanked: 6 times
Been thanked: 1 time

Re: Plot - PlotName

Postby HummerH1 » 19 Dec 2011

I don't want to modify it.
I just want to be able to put its name with a variable. I have an array with all the names, ans I want to do

plot1(arrValues[1],arrNames[1])
plot2(arrValues[2],arrNames[2])
plot3(arrValues[3],arrNames[3])
...

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

Re: Plot - PlotName

Postby Henry MultiСharts » 20 Dec 2011

That is not possible to set the plot name as a variable.
This is a constant value. You need to input it manually.

HummerH1
Posts: 66
Joined: 13 Sep 2011
Has thanked: 6 times
Been thanked: 1 time

Re: Plot - PlotName

Postby HummerH1 » 21 Dec 2011

Such a pity :(
I'll have to write hundred lines of code instead of 2 :(

And is there anyway i can plot an array of values using an other name of plot function at each iteration?

sort of :

Code: Select all

Variables : i(0),MaxIndex(0),strTemp("");
Array: MyArray[](0);

....

For i=0 to MaxIndex
begin
strTemp = "Plot" + NumToStr(i,0);
.... and then execute the function strTemp to plot MyArray(i)
end;
I used to develop with a language that can do that. So maybe there's a similar way to do that? or any way at all?

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

Re: Plot - PlotName

Postby Henry MultiСharts » 21 Dec 2011

Our coder suggets to use Trendline (TD_New) instead of Plot.


Return to “MultiCharts”