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

Notification

Icon
Error

Options
Go to last post Go to first unread
naren.orbit  
#1 Posted : Tuesday, February 21, 2012 3:28:03 AM(UTC)
naren.orbit

Rank: Member

Groups: Registered, Registered Users
Joined: 4/26/2011(UTC)
Posts: 14
Location: india

hi. i am collected this formula from 'http://trader-online.tk' . when attaching to chart it's shown "custom indicator math errors" any solution for this??. or any simlar indicator on this site? (if((C-L)/(H-L),>,.66 ,1, if((C-L)/(H-L),<,.38,-1,0))) + (if(oscv(1,50,S,%),>,50,1,0)) +if((mov(HL,1,S)/mov(HL,20,S)),>=,1.00,1,0))+ (if(ref(stoch(14,3),-1),<,65,1, if(stoch(14,3),<,65,1,0)))
wabbit  
#2 Posted : Tuesday, February 21, 2012 6:36:23 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Where to start?

First, the code is actually below, posted using *code* and */code* tags:

Code:

(if((C-L)/(H-L),>,.66 ,1, if((C-L)/(H-L),<,.38,-1,0))) +

 (if(oscv(1,50,S,%),>,50,1,0)) +

 (if((mov(H-L,1,S)/mov(H-L,20,S)),>=,1.00,1,0))+

 (if(ref(stoch(14,3),-1),<,65,1, if(stoch(14,3),<,65,1,0)))


Next, the code is from a very old version of MS (DOS version if I remember correctly). The code is poorly written for the 'modern' versions of MS. Even then, the code is poorly written from the perspective of not using variables when the same operations are repeated, using if(x,1,0) statements when MS does this operation anyway, and no DBZ error checking.

Personally, I'd be doing something more like:
Code:

zero:=Power(10,-5);

range:=H-L;
x:=(C-L)/Max(range,zero);

{plot}
((x>0.66) - (x<0.38)) +
(OscV(1,50,S,%)>50) +
(range/Max(Mov(range,20,S),zero)>=1) +
Alert(Stoch(14,3)<65,2);


Next, the MS error window which appears may have the title of 'math errors', but here on the forum that information is of little use. You should have posted that the math errors the code produces are DBZ errors (or whatever other specifics are being reported). The more information you provide us, the less work we have to do in trying to figure out what is wrong.


wabbit [:D]
wabbit  
#3 Posted : Tuesday, February 21, 2012 5:12:25 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
http://forum.equis.com/forums/thread/30031.aspxbr>
Quote:
In addition to our Forum Rules (which all posters should be familiar with), we are also introducing a “Forum Etiquette and Best Practices” for posting to the MetaStock Online Community Forum. Adhering to these guidelines helps to build a cohesive community – one of trust and one in which people are willing to share their ideas and help those who need help. Forums are only as strong as their members – help to do your part to ensure that the MetaStock forum continues to be a valuable tool by following these practices as well.

  • There is a person behind the post. Never forget that there is a person behind the original post and replies. Speak as you would to someone who was standing in front of you. “Thank you” goes a long way. Not only does it recognize the time a respondent put into answering your question, but it also alerts others that your question was fully answered. And remember, unless it is an Equis employee, the responders are not paid to help you.
  • Research your problem before posting. Forum respondents dedicate much time and effort to answering the same queries over and over again. Prior to posting, do some leg work yourself – search for similar posts, read the help files and/or documentation that comes with your software. Arming yourself with knowledge alerts the responder that you’ve put some effort into it and makes them happy to put effort into the answer as well.
  • Be specific and show examples. Detailed explanations with examples help in correctly diagnosing a problem. In addition, pictures go further in terms of describing the problem, and help to break down language barriers.
  • Don’t post your “holy grail”, but don’t skirt around it either. Posting incomplete portions of code, abstracts or "likenesses" in the forum is rarely helpful for discovering the underlying causes of problems in MetaStock codes. If you think you have discovered the “holy grail” and don't want to publish your codes in the open forum, contact a trusted forum member by private message and ask for their dedicated assistance. If they agree to support you, only then should you send them the problem code in private.
  • The technical analysis world is a tight knit group. Posting part of your project/problem in multiple forums in the hopes of then piecing it together doesn’t win many friends. It does not take much to identify common elements posted in multiple forums all coming from the same source.
  • Inform the respondent that they didn’t solve your problem. If your problem was not fully resolved, let them know. Nothing destroys the willingness of a member to help you more than when they see the posts they took the time to answer on the Equis forum asked later on another forum.
  • Sometimes professional assistance is required. There are occasions when no matter how much effort you put in yourself, you just cannot solve the problem on your own. Hiring an expert can save you a lot of time, frustration, and money.

Common courtesy and common sense go far in terms of keeping services like the Equis forum alive and a valuable resource. Always remember there is a face behind the post, and that face is typically someone helping you just to help you.



wabbit [:D]

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.