| Posted by: Salil V Gangal on January 10, 2005 at 15:13:24
|
Subscribers of Breadth.BIZ PC Based Service,Following script will print the BreadthThrust of 27 Sectors/Indices.
Regards,
Salil V Gangal
; --- Script Begins ---
; -----------------------------------------------------------
; BreadthThrust.INI
; Sctipt to calculate/print the Breadth Thrust
; Original Breadth Thrust was developed by Dr Martin Zweig.
; -----------------------------------------------------------
[Expression]
; This script will error if the denominator (Advancing Issues + Declining Issues )
; is zero for the division. However the chances of this happening are negligible.
; Per Dr Zweig, EMA over 10 periods is useful. I find EMA over 9 periods suitable.
btBIO = 100 * Ema ( BIOAD / ( BIOAD + BIODC ),9)
btBMT = 100 * Ema ( BMTAD / ( BMTAD + BMTDC ),9)
btBNK = 100 * Ema ( BNKAD / ( BNKAD + BNKDC ),9)
btCYC = 100 * Ema ( CYCAD / ( CYCAD + CYCDC ),9)
btDJI = 100 * Ema ( DJIAD / ( DJIAD + DJIDC ),9)
btESV = 100 * Ema ( ESVAD / ( ESVAD + ESVDC ),9)
btFIN = 100 * Ema ( FINAD / ( FINAD + FINDC ),9)
btGLD = 100 * Ema ( GLDAD / ( GLDAD + GLDDC ),9)
btHTL = 100 * Ema ( HTLAD / ( HTLAD + HTLDC ),9)
btINT = 100 * Ema ( INTAD / ( INTAD + INTDC ),9)
btLEI = 100 * Ema ( LEIAD / ( LEIAD + LEIDC ),9)
btMID = 100 * Ema ( MIDAD / ( MIDAD + MIDDC ),9)
btNCY = 100 * Ema ( NCYAD / ( NCYAD + NCYDC ),9)
btNDX = 100 * Ema ( NDXAD / ( NDXAD + NDXDC ),9)
btOIL = 100 * Ema ( OILAD / ( OILAD + OILDC ),9)
btPAP = 100 * Ema ( PAPAD / ( PAPAD + PAPDC ),9)
btPHA = 100 * Ema ( PHAAD / ( PHAAD + PHADC ),9)
btRIT = 100 * Ema ( RITAD / ( RITAD + RITDC ),9)
btRTL = 100 * Ema ( RTLAD / ( RTLAD + RTLDC ),9)
btRU2 = 100 * Ema ( RU2AD / ( RU2AD + RU2DC ),9)
btSEM = 100 * Ema ( SEmaD / ( SEmaD + SEMDC ),9)
btSML = 100 * Ema ( SMLAD / ( SMLAD + SMLDC ),9)
btSPX = 100 * Ema ( SPXAD / ( SPXAD + SPXDC ),9)
btTEL = 100 * Ema ( TELAD / ( TELAD + TELDC ),9)
btTRN = 100 * Ema ( TRNAD / ( TRNAD + TRNDC ),9)
btUTL = 100 * Ema ( UTLAD / ( UTLAD + UTLDC ),9)
btWIR = 100 * Ema ( WIRAD / ( WIRAD + WIRDC ),9)
; -------------------------------------------------------------
; Following vectors are written to files so that they may be
; viewed using FastTrack / Excel etc.
; -------------------------------------------------------------
WriteFile ( btBIO , btBIO , "Breadth Thrust Biotech ")
WriteFile ( btBMT , btBMT , "Breadth Thrust Basic Materials ")
WriteFile ( btBNK , btBNK , "Breadth Thrust Banking ")
WriteFile ( btCYC , btCYC , "Breadth Thrust Consumer Services ")
WriteFile ( btDJI , btDJI , "Breadth Thrust Dow Jones Industrial ")
WriteFile ( btESV , btESV , "Breadth Thrust Energy Services ")
WriteFile ( btFIN , btFIN , "Breadth Thrust Financial Services ")
WriteFile ( btGLD , btGLD , "Breadth Thrust Precious Metals ")
WriteFile ( btHTL , btHTL , "Breadth Thrust Health Care ")
WriteFile ( btINT , btINT , "Breadth Thrust Internet ")
WriteFile ( btLEI , btLEI , "Breadth Thrust Leisure ")
WriteFile ( btMID , btMID , "Breadth Thrust S&P 400 ")
WriteFile ( btNCY , btNCY , "Breadth Thrust Consumer Goods ")
WriteFile ( btNDX , btNDX , "Breadth Thrust Nasdaq 100 ")
WriteFile ( btOIL , btOIL , "Breadth Thrust Energy ")
WriteFile ( btPAP , btPAP , "Breadth Thrust Paper and Forrest ")
WriteFile ( btPHA , btPHA , "Breadth Thrust Pharmacutical ")
WriteFile ( btRIT , btRIT , "Breadth Thrust Real Estate ")
WriteFile ( btRTL , btRTL , "Breadth Thrust Rydex Retailing ")
WriteFile ( btRU2 , btRU2 , "Breadth Thrust Russell 2000 ")
WriteFile ( btSEM , btSEM , "Breadth Thrust Semiconductor ")
WriteFile ( btSML , btSML , "Breadth Thrust S&P 600 ")
WriteFile ( btSPX , btSPX , "Breadth Thrust S&P 500 ")
WriteFile ( btTEL , btTEL , "Breadth Thrust Telecommunications ")
WriteFile ( btTRN , btTRN , "Breadth Thrust Rydex Transportation ")
WriteFile ( btUTL , btUTL , "Breadth Thrust Utilities ")
WriteFile ( btWIR , btWIR , "Breadth Thrust Wireles ")
btFam = Family (
btBIO, btBMT, btBNK, btCYC, btDJI, btESV, btFIN, btGLD
, btHTL, btINT, btLEI, btMID, btNCY, btNDX, btOIL, btPAP
, btPHA, btRIT, btRTL, btRU2, btSEM, btSML, btSPX, btTEL
, btTRN, btUTL, btWIR
)
Print("--- Breadth Thrust Summary Sorted: OverSold to OverBought ---")
FamPrint ( -Sort(-btFam), "Breadth Thrust " )
Print("--- Breadth Thrust Detailed ---")
Print(
btBIO , " ($Sym) BioTech "
, btBMT , " ($Sym) Basic Materials "
, btBNK , " ($Sym) Banking "
, btCYC , " ($Sym) Consumer Services "
, btDJI , " ($Sym) Dow Jones Industrial "
, btESV , " ($Sym) Energy Services "
, btFIN , " ($Sym) Financial Services "
, btGLD , " ($Sym) Precious Metals "
, btHTL , " ($Sym) Health Care "
, btINT , " ($Sym) Internet "
, btLEI , " ($Sym) Leisure "
, btMID , " ($Sym) S&P 400 "
, btNCY , " ($Sym) Consumer Goods "
, btNDX , " ($Sym) Nasdaq 100 "
, btOIL , " ($Sym) Energy "
, btPAP , " ($Sym) Paper and Forrest "
, btPHA , " ($Sym) Pharmacutical "
, btRIT , " ($Sym) Real Estate "
, btRTL , " ($Sym) Rydex Retailing "
, btRU2 , " ($Sym) Russell 2000 "
, btSEM , " ($Sym) Semiconductor "
, btSML , " ($Sym) S&P 600 "
, btSPX , " ($Sym) S&P 500 "
, btTEL , " ($Sym) Telecommunications "
, btTRN , " ($Sym) Transportation "
, btUTL , " ($Sym) Utilities "
, btWIR , " ($Sym) Wireless "
)
Print(
"\nNotes:"
, "\nBreadth Thrust was developed by Dr. Martin Zweig."
, "Above output is my interpretation of this Breadth Thrust alongwith my changes."
, "\n OverSold: Any Index/Sector that has Breadth Thrust under 40 is OverSold."
, " OverBought: Any Index/Sector that has Breadth Thrust above 70 is OverBought."
, "\nHowever, these values 40/70 are quite artificial and there is no logical"
, "reason as to why these should not be 39.99 or 70.01 or any other value !"
, "With everchanging market conditions, these values need your judgement/adjustment."
, "\nAlso read text at URL below for some thoughts about breadth."
, "http://fundvision.com/mfv/breadth_info.shtml"
, "\nRegards,\nSalil V Gangal"
)
; --- Script Ends ---
Read the Follow Ups:
|
Copyright © 1998-2000 Salil V Gangal, All Rights Reserved.