logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Ztrader  
#1 Posted : Friday, July 19, 2013 1:48:38 PM(UTC)
Ztrader

Rank: Newbie

Groups: Registered, Registered Users
Joined: 7/12/2013(UTC)
Posts: 9

I entered the formula below and got the error message: "End of function ')' expected." for kay2 col.name
Where do you think the error is ?

Indicator 1 (kapy)
a:=valuewhen(1,(YEAR()=2013 and ((MONTH()=2 and DAYOFMONTH()>15)) or (MONTH()>2 and MONTH()<6)),c);
b:=if(a>prev,a,prev);
b

Indicator 2 (yuky)
a:=valuewhen(1,(YEAR()=2013 and ((MONTH()=2 and DAYOFMONTH()>15)) or (MONTH()>2 and MONTH()<6)),H);
b:=if(a>prev,a,prev);
b

Indicator 3 (kay2)
a:=valuewhen(1,YEAR()=2013 and ((MONTH()=7 and DAYOFMONTH()<6) or (MONTH()=6),c);
b:=if(a>prev,a,prev);
b
Indıcator 4 (yuy2)
a:=valuewhen(1,YEAR()=2013 and ((MONTH()=7 and DAYOFMONTH()<6) or (MONTH()=6),h);
b:=if(a>prev,a,prev);
b

Filter:
FML(''kay2'')>FML("kapy") AND FML(''yuy2'')<FML("yuky")
mstt  
#2 Posted : Friday, July 19, 2013 2:35:25 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi Ztrader

MetaStock actually tells you what the error is - and it shows you where it is by placing the curser there. If you still can't find the error then print the formula and pair each set of brackets with a pencil until you come to the odd one out.

Roy
haddison  
#3 Posted : Saturday, July 20, 2013 7:09:20 AM(UTC)
haddison

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/6/2010(UTC)
Posts: 113
Location: London

What you could also do is use an advanced text editor such as Notepad++. It highlights in red the brackets so you know which ones you are dealing with.
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.