PureBytes Links
Trading Reference Links
|
Hi warren
Code with a forward reference plots all bars except the relevant number of
"look forward" bars at the right side of a chart. Some users assert that this
can be useful for spotting patterns. My personal view is that you should not
use a forward reference, Ref(X,+Y), until you have the ability to accurately
read the future.
This function works in MetaStock because it "cheats" and looks at later data
for the selected data array, in much the same way that the ZigZag function
does. Looking forward has it's uses but one should only use the capability with
an understanding that of the inherent dangers. A forward reference can be
useful in truncating an indicator plot to the right just as ValueWhen() can to the left.
Kind regards
Roy Larsen
www.metastocktips.co.nz
Free formulas and MS links
----- Original Message -----
From: "Warren" <Cool_kat79@xxxxxxxxxxx>
To: <Metastockusers@xxxxxxxxxxxxxxx>
Sent: Monday, May 02, 2005 11:12 AM
Subject: [Metastockusers] Reference function
> Hello. I am kind of new to MEtastock programming and I was looking
> through some code that look interesting. It's the Tom Demark
> sequential code I've seen posted around the internet.
>
> TD1:=If(C<Ref(C,-4),1,0);
>
> TD2:=If(TD1=1 AND Ref(TD1,-1)=1 AND Ref(TD1,-2)=1 AND Ref(TD1,-3)=1
> AND Ref(TD1,-4)=1 AND Ref(TD1,-5)=1 AND Ref(TD1,-6)=1 AND Ref(TD1,-7)
> =1 AND Ref(TD1,-8)=1, 1,0);
>
> TD3:=If(Ref(C,-9)>=Ref(C,-13),1,0);
>
> TD4:=If(TD2=1 AND TD3=1,1,0);
>
> TD5:=If(H>=Ref(LLV(L,5),-3),1,0);
>
> now I'm okay with all the formulas to this point...
> I don't understand the following:
>
> D8:=If(Ref(TD4,1)=1 AND TD5=1,1,0);
>
> It's the Ref(TD4,1)=1 I don't understand. THe manual sez it
> references a previous or subsequent element in the data array. A
> positive Period references n periods in the future; a negative period
> references n periods ago.
>
> I guess what I can't seem to understand is how does one reference a
> period in the future that hasn't happened yet. Or - how does a
> formula refer to a formula in the future.
>
> Any help would be most welcome
>
> thanks
>
> Warren Peace2001
>
>
>
>
>
>
> --------------------------------------------------------------------------------
> Yahoo! Groups Links
>
> a.. To visit your group on the web, go to:
> http://groups.yahoo.com/group/Metastockusers/
>
> b.. To unsubscribe from this group, send an email to:
> Metastockusers-unsubscribe@xxxxxxxxxxxxxxx
>
> c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/zMEolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Metastockusers/
<*> To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|