Help with indicator error please!!

Questions about MultiCharts and user contributed studies.
gdm-glen
Posts: 5
Joined: 03 Aug 2006

Help with indicator error please!!

Postby gdm-glen » 19 Apr 2008

Hi
I have a indicator running in TS but i get errors in multicharts..I dont know why really as it gives a error on a blank line.
Can anybody please help me with this error. Its a different version of a keltner channel..quite good really.

Thanks
Glen
Attachments
keltner.xml
(69.6 KiB) Downloaded 31 times

2haerim
Posts: 502
Joined: 01 Sep 2006
Been thanked: 2 times

MC's Plot does NOT allow string expression unlike TS2ki/TS8

Postby 2haerim » 19 Apr 2008

The source fails in compiling line 792:
plot1 ( Plot_$Predict, "$ Predict" , Color_$Predict ) ;
where

Vars:
Plot_Close_OverUKC( 0.00) ,
Plot_Close_OverLKC( 0.00) ,
Plot_Close_UnderUKC( 0.00) ,
Plot_Close_UnderLKC( 0.00) ,
Plot_$Predict( "") ,

As you see Plot_$Predict's type differs from others.

This Keltner code should be modified not using string type for Plot_$Predict, but it is assigned to DirectionPredict (this is also string) in many places. So, care should be taken to modify this code to work.


This kind of incompatibility with TS2ki/TS8 has been bugging MC users because the PLEditor does not provide correct location and cause of compilation failure.

PL should allow string expression in plot like TS2ki/TS8 eventually, I think.


Plot
Plots the specified numerical expression on a chart; up to 999 different plots can be used simultaneously.
Plot offset, name, color, and plot line width can be specified by using the optional parameters.
Usage
PlotN <[Offset]>(Expression <,"PlotName"<,PlotColor <,Default <,LineWidth >>>>)

Parameters inside the angled brackets are optional
Parameters
N - a number used to identify the plot; plot numbers can range from 1 to 999

Offset - an optional parameter; a numerical expression specifying the plot offset, in bars; a positive value will displace the plot to the left along the time axis, and a negative value will displace the plot to the right along the time axis

Expression - the numerical expression to be plotted
PlotName - an optional parameter; assigns a name to the plot

PlotColor - an optional parameter; specifies the plot color
Plot color can be specified by a numerical expression representing an RGB color number or a legacy color value, by one of 17 base color words, or by the word Default to specify the color chosen by the user. In order for PlotColor to be used, PlotName parameter must also be used.

Default - an optional parameter reserved for future use; should be specified as Default; use of this parameter is required in order for LineWidth to be used

LineWidth - an optional parameter; specifies the plot line width, ranging from 1 to 14
Plot line width can be specified as a numerical expression or by the word Default to specify the line width chosen by the user. In order for LineWidth to be used, PlotName, PlotColor, and Default parameters must also be used.
Examples
Plot the closing price using the default plot color and line width:

Plot1(Close);

Plot the closing price using the default plot color and line width, and name the plot "Close":

Plot1(Close,"Close",Default,Default,Default);

Plot the closing price, offset back by 3 bars, using the plot color of blue and line width of 3, and name the plot "Close 3 bars later":

Plot1[3](Close,"Close 3 bars later",Blue,Default,3);

Plot the closing price, offset forward by 3 bars, using the RGB color 2138336 (Orange), and name the plot "Close 3 bars ago":

Plot1[-3](Close,"Close 3 bars ago",2138336);

Plot the closing price using the legacy color value of 4 (Green) and name the plot "Close":

[LegacyColorValue=True];
Plot1(Close,"Close",4);


Return to “MultiCharts”