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

Re: [amibroker] Twiggs Money Flow formula



PureBytes Links

Trading Reference Links

 
  
periods=21;//Input("TMF periods",1,100,21);
TRH=Max(Ref(C,-1),H);
TRL=Min(Ref(C,-1),L);
TR=TRH-TRL;
ADV=((C-TRL)-(TRH-C))/IIf(TR==0,999999,TR)*V;
WV=V+(Ref(V,-1)*0);
Plot(IIf(WV==0,0,Wilders(ADV,periods)/Wilders(WV,periods)),"",colorRed
styleLine); 


-------Original Message-------
 
From: amibroker@xxxxxxxxxxxxxxx
Date: Wednesday, March 05, 2003 20:32:08
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Twiggs Money Flow formula
 
Hi all 
I have seen people using this and became curious enough to check it 
out. It is based on the theme of the Chaiken Money Flow Index but is 
designed to better handle price gaps and volume spikes. Colin Twiggs 
is behind it. 
 
He has given a Metastock formula for it: 
periods:=Input("TMF periods",1,100,21);
TRH:=Max(Ref(C,-1),H);
TRL:=Min(Ref(C,-1),L);
TR:=TRH-TRL;
ADV:=((C-TRL)-(TRH-C))/If(TR=0,999999,TR)*V;
WV:=V+(Ref(V,-1)*0);
If(WV=0,0,Wilders(ADV,periods)/Wilders(WV,periods)) 
 
Now even though I cannot work out what the sixth line is supposed to 
represent you would think that this was easy enough for me to 
translate but whatever I have done is wrong: 
periods=Param("TMF periods",21,1,100,1);
TRH=Max(Ref(C,-1),H);
TRL=Min(Ref(C,-1),L);
TR=TRH-TRL;
ADV=((C-TRL)-(TRH-C))/(IIf(TR=0,999999,TR))*V;
WV=V+(Ref(Volume,-1)*0);
TMF=IIf(WV=0,0,Wilders(ADV,periods)/Wilders(WV,periods)); 
 
Any thoughts appreciated
 
Regards
Anthony
 
 
Yahoo! Groups Sponsor
ADVERTISEMENT
 
 
 
 
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq
html 
 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
 
 

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/