PureBytes Links
Trading Reference Links
|
Dave:
Here is another TSV that I think visually mimics the "real" TSV that I think we know about. Not saying this produces a better or worse result than Jayson's code below--you can decide for yourself. At least you have two to play with.
Ken
T = 18; // For a TSV with 28 day period
TMA = 9; // For MA of TSV
Alpha = 2/(T+1);
TSVd= ( C-Ref(C,-1)) / ( H-L )*V;
/* The following calculates Exponential Average for
TSV */
TSV_exp = 100*(AMA(TSVd,Alpha) * T/10000000);
TSV_ref= Sum((( C-Ref(C,-1)) / ( H-L ))*V, T ); //for reference
/* The following is simple TSV */
TSV = MA(TSVd,T) * T/10000000;
TSV_MA = MA(TSV_exp,TMA);
//Plot(TSV,"TSV",4,4 + 2);
//Plot(TSV,"TSV"+ WriteVal(T,1.0),5,4);
Plot(TSV_MA,"MA",4,4);
Plot(TSV_Exp,"TSV(exp)",colorYellow,4);
Plot(0,"",7,1);
-----Original Message-----
From: Jayson [mailto:jcasavant@xxxxxxxxxxx]
Sent: Tuesday, November 18, 2003 11:50 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] baby and bathwater: Canon?
Dave,
here is one...
/* Modified TSV calculation from Mohan
on 11/26/02 */
T = 18; // For a TSV with 28 day period
TMA = 10; // For MA of TSV
TSVd= ( C-Ref(C,-1)) / ( H-L )*V;
/* The following is simple TSV */
TSV = MA(TSVd,T) * T/10000000;
TSV_MA = MA(TSV,TMA);
Plot(TSV,"TSV",IIf(tsv>0,5,4), 2);
//Plot(TSV,"TSV"+ WriteVal(T,1.0),5,4);
Plot(TSV_MA,"MA",6,4);
Regards,
Jayson
-----Original Message-----
From: Dave Merrill [mailto:dmerrill@xxxxxxx]
Sent: Tuesday, November 18, 2003 11:30 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] baby and bathwater: Canon?
Gary, not to hijack this thread, but could you post your TSV AFL? I've been
looking for something like that, but never saw an explanation of how it was
built internally.
thanks,
dave
I've been trying to get my arms around volume using StdDev bands, MAs, etc.,
but have found stuff like the afl version of the TSV pretty good if volume
divergence is your thing.
Kind Regards,
Gary
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.
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
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/
Yahoo! Groups Sponsor
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.
|