Rank: Newbie
Groups: Registered, Registered Users Joined: 10/6/2009(UTC) Posts: 2
|
Would someone be kind enough to run an experienced eye over this Indicator as I am having no luck getting Metastock to accept it.
No doubt inexperience by me.
Upperband:=(H*(1+2*((((H-L)/((H+L)/2))*1000*0.001)));Mov(Upperband, 20, S)
Lowerband:=(L*(1-2*((((H-L)/((H+L)/2))*1000)*0.001)));Mov(Lowerband, 20, S);
This is what appears in the Functions window when I click OK
End of function ] expected !!!!
Thank you
Mark
|
|
|
|
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 Mark
Check for closing brackets in the correct place. One is apparently missing - the upper band formul does not match placement with the lower formula, so check both definitions for correctness when the bracket problem is solved. Caution: where MS tells you to place the closing bracket may not be the correct place if you've misplaced an opening bracket.
Also make sure that you terminate definitions or intermediate outputs with a semicolon as one is missing on the upper line.
As a general rule MetaStock will tell you what the error is and stop the cursor right at that point. Mis-typing is the usual cause of such errors and the best person to solve them is the person that made the mistake. Since i don't have a copy of the original formula I'm not going to try and tell you where the brackets should be. Ten seconds of eyballing should just about do it.
Roy
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Unverified Users Joined: 10/30/2004(UTC) Posts: 2
|
The Upperband formula is missing a right parenthese following the 1000.
The Lowerband has it.
Counting left and right parenthesis give you a clue. In the Lowerband formula there are a total of 9 left parenthesis and 9 right parenthesis.
In the Upperband formula there are a total of 9 left parenthesis and 8 right parenthesis.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 10/6/2009(UTC) Posts: 2
|
Many thanks for all your prompt answers; This has fixed the problems (2).
I'm going to get my "parenthesis & semicolon" glasses checked immediately.
Regards
Mark
|
|
|
|
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.