Whats Wrong with this section: If then else Begin

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Whats Wrong with this section: If then else Begin

Postby arjfca » 18 Jan 2011

Hell O

This little code does not compile
All variables as been define

Probably a problem with "end;" somwhere. Many minutes to look around without succees.

Code: Select all

If Close > UpperBand then Begin
If PowerTrendL then Begin
WaitTouchMidLineL= True; // A P.trend, A more p. trend. Wait for the price to touch the middline
MessageString = MessageString + "// Wait to touch the mid Line ";
end
else Begin
powertrendL = True;
End;
else begin
PowerTrendL = False;
end;
end;

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Whats Wrong with this section: If then else Begin

Postby TJ » 18 Jan 2011

you have a missmatched BEGIN/END

pay attention to how I format the code,
you can easily match the BEGIN with a corresponding END.

Code: Select all

If Close > UpperBand then
Begin
If PowerTrendL then
Begin
WaitTouchMidLineL= True; // A P.trend
MessageString = MessageString + "// Wait to touch the mid Line ";
end
else
Begin
powertrendL = True;
End;
end
else
begin
PowerTrendL = False;
end;

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: Whats Wrong with this section: If then else Begin

Postby arjfca » 18 Jan 2011

I'm humble TJ


Thanks again, I owe you many beers :)
Martin


Return to “MultiCharts”