ASX Banks Relative RoC% setup for MetaStock =========================================== This addon measures relative Rate of Change (RoC) from specified date on seven Australian banks, but may be easily modified to measure RoC between any other seven related securities (see Metals RoC example). Installation ------------ Please close MetaStock and run BanksSetup.exe, which will automatically install the following into MetaStock (v8.01 or higher): Indicator: "RoC - Banks - CBA WBC ANZ NAB SGB MQG SUN" Chart Expert: "Banks" Chart Template: "Banks.mwt" Setup ----- After installing the above, please edit the code within the indicator in order to point it to your CBA/WBC/ANZ/NAB/SGB/MQG/SUN data paths: MetaStock -> Tools -> Indicator Builder -> scroll down to and select "RoC - Banks - CBA WBC ANZ NAB SGB MQG SUN" indicator -> Edit -> scroll down code to { Security data path reference } section. Lets say your ASX Equities data is in C:\Shares\Au-Asx\A-Z\ (A to Z) folders - edit the following indicator code: From original: { Security data path reference } x1:=Security("C:\Norgate\ASX\Equities\CBA",C); x2:=Security("C:\Norgate\ASX\Equities\WBC",C); x3:=Security("C:\Norgate\ASX\Equities\ANZ",C); x4:=Security("C:\Norgate\ASX\Equities\NAB",C); x5:=Security("C:\Norgate\ASX\Equities\SGB",C); x6:=Security("C:\Norgate\ASX\Equities\MQG",C); x7:=Security("C:\Norgate\ASX\Equities\SUN",C); To new: { Security data path reference } x1:=Security("C:\Shares\Au-Asx\C\CBA",C); x2:=Security("C:\Shares\Au-Asx\W\WBC",C); x3:=Security("C:\Shares\Au-Asx\A\ANZ",C); x4:=Security("C:\Shares\Au-Asx\N\NAB",C); x5:=Security("C:\Shares\Au-Asx\S\SGB",C); x6:=Security("C:\Shares\Au-Asx\M\MQG",C); x7:=Security("C:\Shares\Au-Asx\S\SUN",C); After editing the RoC indicator, please verify the data paths are correct by opening any chart and applying the "Banks.mwt" chart template as per attached chart pic (Banks.png). Indicator formula ----------------- ========================================= RoC - Banks - CBA WBC ANZ NAB SGB MQG SUN ========================================= ---8<-------------------------------------- { Rate of Change (RoC) - ASX Banks - v3.0 Plots: ----- x1: CBA - Commonwealth Bank (Yellow) x2: WBC - Westpac Banking Corp (Red) x3: ANZ - ANZ Banking Group (Turquoise) x4: NAB - National Aust. Bank (Orange) x5: SGB - St George Bank (Lime Green) x6: MQG - Macquarie Group (Lt Gray) x7: SUN - Suncorp Metway (Dk Green) Copyright © 2005-2008 Jose Silva. The grant of this license is for personal use only - no resale or repackaging allowed. All code remains the property of Jose Silva. http://www.metastocktools.com } { Security data path reference } x1:=Security("C:\Norgate\ASX\Equities\CBA",C); x2:=Security("C:\Norgate\ASX\Equities\WBC",C); x3:=Security("C:\Norgate\ASX\Equities\ANZ",C); x4:=Security("C:\Norgate\ASX\Equities\NAB",C); x5:=Security("C:\Norgate\ASX\Equities\SGB",C); x6:=Security("C:\Norgate\ASX\Equities\MQG",C); x7:=Security("C:\Norgate\ASX\Equities\SUN",C); { User inputs } StDay:=Input("RoC start Day",1,31,1); StMnth:=Input("start Month",1,12,11); StYear:=Input("start Year",1800,2200,2007); methd:=Input("method: [1]%-percent, [2]$-points",1,2,1); { Start date signal } prd:=Year()>StYear OR (Year()=StYear AND (Month()>StMnth OR Month()=StMnth AND DayOfMonth()>=StDay)); date:=prd AND Alert(prd=0,2); init:=Cum(IsDefined(date))=1; prd:=If(LastValue(Cum(date))<1,1,prd); date:=If(LastValue(Cum(date))<1,init,date); { CBA } sVal:=ValueWhen(1,date OR init,x1); x1:=If(methd=1,(x1/sVal-1)*100,x1-sVal)*prd; { WBC } sVal:=ValueWhen(1,date OR init,x2); x2:=If(methd=1,(x2/sVal-1)*100,x2-sVal)*prd; { ANZ } sVal:=ValueWhen(1,date OR init,x3); x3:=If(methd=1,(x3/sVal-1)*100,x3-sVal)*prd; { NAB } sVal:=ValueWhen(1,date OR init,x4); x4:=If(methd=1,(x4/sVal-1)*100,x4-sVal)*prd; { SGB } sVal:=ValueWhen(1,date OR init,x5); x5:=If(methd=1,(x5/sVal-1)*100,x5-sVal)*prd; { MQG } sVal:=ValueWhen(1,date OR init,x6); x6:=If(methd=1,(x6/sVal-1)*100,x6-sVal)*prd; { SUN } sVal:=ValueWhen(1,date OR init,x7); x7:=If(methd=1,(x7/sVal-1)*100,x7-sVal)*prd; { Display in own window } 0; {Gray-40} x1; {Yellow} x2; {Red} x3; {Turquoise} x4; {Orange} x5; {Lime Green} x6; {Lt Gray} x7; {Dk Green} ---8<-------------------------------------- Example indicator for other securities (10 metals): ====================================================== RoC - Metals - Gld Silv Plat Pll Alu Cp Nkl Ld Tin Znc ====================================================== ---8<------------------------------------------------- { Rate of Change (RoC) - Metals - v3.0 x1: Gold x2: Silver x3: Platinum x4: Palladium x5: Aluminium x6: Copper x7: Nickel x8: Lead x9: Tin x10: Zinc Copyright © 2005-2008 Jose Silva. The grant of this license is for personal use only - no resale or repackaging allowed. All code remains the property of Jose Silva. http://www.metastocktools.com } {Data paths} x1:=Security("C:\Norgate\Futures\Continuous Contracts\Spliced\GC___CCS",C); x2:=Security("C:\Norgate\Futures\Continuous Contracts\Spliced\SI___CCS",C); x3:=Security("C:\Norgate\Futures\Continuous Contracts\Spliced\PL___CCS",C); x4:=Security("C:\Norgate\Futures\Continuous Contracts\Spliced\PA___CCS",C); x5:=Security("C:\Norgate\Futures\Cash\$AL",C); x6:=Security("C:\Norgate\Futures\Continuous Contracts\Spliced\HG___CCS",C); x7:=Security("C:\Norgate\Futures\Cash\$NI",C); x8:=Security("C:\Norgate\Futures\Cash\$PB",C); x9:=Security("C:\Norgate\Futures\Cash\$SN",C); x10:=Security("C:\Norgate\Futures\Cash\$ZN",C); {Inputs} StDay:=Input("RoC start Day",1,31,4); StMnth:=Input("start Month",1,12,3); StYear:=Input("start Year",1800,2200,2008); methd:=Input("method: [1]%-percent, [2]$-points",1,2,1); {Date signal} prd:=Year()>StYear OR (Year()=StYear AND (Month()>StMnth OR Month()=StMnth AND DayOfMonth()>=StDay)); date:=prd AND Alert(prd=0,2); init:=Cum(IsDefined(date))=1; prd:=If(LastValue(Cum(date))<1,1,prd); date:=If(LastValue(Cum(date))<1,init,date); {x1} sVal:=ValueWhen(1,date OR init,x1); x1:=If(methd=1,(x1/sVal-1)*100,x1-sVal)*prd; {x2} sVal:=ValueWhen(1,date OR init,x2); x2:=If(methd=1,(x2/sVal-1)*100,x2-sVal)*prd; {x3} sVal:=ValueWhen(1,date OR init,x3); x3:=If(methd=1,(x3/sVal-1)*100,x3-sVal)*prd; {x4} sVal:=ValueWhen(1,date OR init,x4); x4:=If(methd=1,(x4/sVal-1)*100,x4-sVal)*prd; {x5} sVal:=ValueWhen(1,date OR init,x5); x5:=If(methd=1,(x5/sVal-1)*100,x5-sVal)*prd; {x6} sVal:=ValueWhen(1,date OR init,x6); x6:=If(methd=1,(x6/sVal-1)*100,x6-sVal)*prd; {x7} sVal:=ValueWhen(1,date OR init,x7); x7:=If(methd=1,(x7/sVal-1)*100,x7-sVal)*prd; {x8} sVal:=ValueWhen(1,date OR init,x8); x8:=If(methd=1,(x8/sVal-1)*100,x8-sVal)*prd; {x9} sVal:=ValueWhen(1,date OR init,x9); x9:=If(methd=1,(x9/sVal-1)*100,x9-sVal)*prd; {x10} sVal:=ValueWhen(1,date OR init,x10); x10:=If(methd=1,(x10/sVal-1)*100,x10-sVal)*prd; {Display in own window} 0; x1; x2; x3; x4; x5; x6; x7; x8; x9; x10 ---8<------------------------------------------------- Support ------- Absolutely none. Due to a very busy work schedule I'm not able to provide any support whatsoever for this free MetaStock addon. For more on Relative Strength Comparison studies, please take a look at the URSC toolkit for MetaStock: http://www.metastocktools.com/URSC/URSC.htm Please visit MetaStockTools.com regularly for more. Regards, jose http://www.metastocktools.com