[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [EquisMetaStock Group] Plain English version of code


  • Date: Mon, 14 Dec 2009 12:02:54 +1300
  • From: "Roy Larsen" <rlarsen@xxxxxxxxxx>
  • Subject: Re: [EquisMetaStock Group] Plain English version of code

PureBytes Links

Trading Reference Links



Hi Jack
 
 
When you see "Keep1:=" you know that a variable named "Keep1" is about to be defined. The character combination of ":=" is always followed by a definition of the variable name preceding those two characters. Therefore, keep1:=  tells us the name of the variable about to be defined, and Alert(haC>=haOpen,2) is the first element or logical _expression_ of the definition that follows. There are two components to this _expression_, the primary one being the logical test for "haC >= haOpen". The test here asks "is the value of variable haC greater than or equal to the value of variable haOpen?". The result or answer to this question will be a logical TRUE or a logical FALSE, depending of course on the relative values.
 
(Generally MetaStock expresses TRUE as a value of 1 (one) and FALSE as a value of 0 (zero). However there are exceptions to this rule and until you are more familiar with MS you should be careful to not mix logical and numerical values.)
 
The Alert() function is designed to extend a logical TRUE for a given number of bars beyond where the underlying _expression_ was actually TRUE. In the case of Alert(haC>=haOpen,2) the instruction is to extend or hold a TRUE from haC>=haOpen for one additional bar (NOT two additional bars as you might think). A parameter of 2 in the Alert() function means that a 1-bar TRUE value of the _expression_ contained within it is to be extended by 1 bar. Consider the last ACTUAL TRUE of the _expression_ parameter to be the first bar of the extension, as in Alert(_expression_=TRUE,1) which is the same as _expression_=TRUE, and the next bar as being the 1-bar extension. Another way to think of Alert() is that it extends a TRUE by 1 bar less than the Periods parameter.
 
If I had all day I could go on for several more pages. If you're serious about learning MFL you need to spend a lot of time reading, experimenting and reading again. My 10 years of learning MFL has taken about that long to accumulate. Sure I've had a lot of help along the way, but I've also taken the time to figure things out by myself most of the time. Don't try to learn the whole lot at once - get a thorough understanding of one function or element at a time. Check out the Formula Primer that's available for free - it will help you somewhat. If you're willing to pay for more detailed information then the MSTT Formula Language Tutorial (available on my website) might be useful. The best MetaStock resource you'll find anywhere is all back-issues MetaStock Tips & Tools (MSTT), but don't waste your money on it if you aren't prepared to read and reread all the articles and work through the hundreds of exercises.
 
 
Regards
 
Roy
 
 
 
 
----- Original Message -----
From: Jack
Sent: Monday, December 14, 2009 9:09 AM
Subject: [EquisMetaStock Group] Plain English version of code

 

Hi, I'm new to this --- like to know what my technical indicators are actually doing - use the Heikin Ashi Oscillator and can't work out what this part of the code is actually doing.... the manual doesn't explain well enough for me to understand.... I'd appreciate some plain English interpretations.... Cheers, Jack

keep1:=Alert(haC>=haOpen,2) OR If(C>=haC,1,If(H>Ref(H,-1) OR L>Ref(L,-1),1,0));
MY INTERPRETATION: ?
If haC>=haOpen, then keep1=2 or
If C>=haC, then keep1=1
else if H>H from prior period, then keep1=-1
or if L>L from prior period, then keep1=1
else keep1=0

keep2:=ZlDif>=0;
MY INTERPRETATION: ?
If Z1Diff>=0, then keep2=Z1Diff

keeping:=(keep1 OR keep2);
MY INTERPRETATION:
????? I can't even guess what this means

keepall:=keeping OR (Ref(keeping,-1) AND (C>=O) OR C>=Ref(C,-1));
MY INTERPRETATION:
?????

keep3:=(Abs(C-O)<(H-L)*.35 AND H>=Ref(L,-1));
MY INTERPRETATION:
?????

utr:=Keepall OR (Ref(keepall,-1) AND keep3);
MY INTERPRETATION:
?????



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4684 (20091213) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


__._,_.___


Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___