[Bug or Improvement] multiple Plot1 allowed?

Questions about MultiCharts and user contributed studies.
Posts: 502
Joined: 01 Sep 2006
Been thanked: 2 times

[Bug or Improvement] multiple Plot1 allowed?

Postby 2haerim » 14 Jun 2009

Code: Select all

variables: skip(0);
variables: uv(0), dv(0);

if Date<>Date[1] then skip=0;

skip = skip + 1;

if skip >=1 then begin
uv = uv + UpTicks;
dv = dv + DownTicks;
plot1(uv, "uv-1stTick");
plot2(dv, "dv-1stTick");
else begin
plot1(uv, "uv");
plot2(dv, "dv");
fails to compile in TS2ki, but succeeds in MC.

The question is:

Are multiple PlotN statements allowed in MC unlike TS2ki?
If so, we would have "uv" and "uv-1stTick" as the plot name depending on the value of the variable "skip".

I am not sure this is bug or improvement over TS2ki.


User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 17 Jun 2009

Hi HaeRim,

The name of a plot does not depend on the variable names. In your case the name will be uv-1st Tick.
The name of a plot can be seen if you call the Properties window of a compiled indicator from PLEditor.

Return to “MultiCharts”