A bit of help on compiling an indicator

Questions about MultiCharts and user contributed studies.
salsaman
Posts: 3
Joined: 09 Sep 2008

A bit of help on compiling an indicator

Postby salsaman » 11 Jan 2009

Hello. I'm not a programmer by any means. This code (for force index) was posted freely on a blog, but errors on the second to last line at the second " after TRIGGER with the error being 'matching quote is missing.'

Any thoughts?

inputs:
Force_I(Volume * (Close - Close[1]));

variables:
xTrend1(""),
xTrend2(""),
xTrend3(""),
xTrend4("");

Value1 = XAverage(Force_I,13);
Value2 = XAverage(Force_I,2);

xTrend1="TREND";
xTrend2="SETUP";
xTrend3="BUY > HIGH";
xTrend4="SELL <>0then begin Plot1( xTrend1,"13DAYS FORCE", BLACK );
SetPlotBGColor( 1, GREEN );
end;
If Value1<0>0 then begin
Plot2( xTrend2,"2DAYS FORCE", BLACK );
SetPlotBGColor( 2, GREEN );
end;
If Value2<0>0 then If Value2<0>0 then begin
Plot3( xTrend4,"TRIGGER", BLACK );
SetPlot

fs

Postby fs » 11 Jan 2009

This appears that you have copied and pasted it wrong from the blog and the code is missing several parts. Some of the errors I can see after quick review are:

Code: Select all

xTrend4="SELL <>0then begin Plot1( xTrend1,"13DAYS FORCE", BLACK );
is missing a quote and an If statement.

Code: Select all

If Value1<0>0 then begin
This if statement is not correct.

Code: Select all

If Value2<0>0 then If Value2<0>0 then begin
This if statement is not correct and the code below is also missing an end statement.

Code: Select all

SetPlot
This is only half a command and also is missing a ;.


Return to “MultiCharts”