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

Re: [amibroker] Relative strength exploration



PureBytes Links

Trading Reference Links

For anyone who might find this useful...

 

//Relative Strength % comparison

//to respective Index

//USING YAHOO DATABASE

SetChartOptions(0,chartShowDates);

//Relative Strength period of comparison

period = Param("Periods",21,10,252,1);

//Base Market

BaseMkt=WriteIf(MarketID(1)=="NYSE","^DJI",WriteIf(MarketID(1)=="Nasdaq","^NDX",WriteIf(MarketID(1)=="AMEX","^XAX",""))); //Base market....

//Relative strength calculation

x = Foreign(BaseMkt,"C") - Ref(Foreign(BaseMkt,"C"),-period);

x = (x / Ref(Foreign(BaseMkt,"C"),-period)) * 100;

y = C - Ref(C,-period);

y = ( y / Ref(C,-period)) * 100;

rs = y - x;

//line color

Color=colorBlue;

//Plot Relative strength line

Plot(rs,"",color,styleLine);

 

//Header

Title=EncodeColor(colorBlack)+"("+WriteVal(period,1)+") Day.."

+"Relative_Strength of ."+EncodeColor(Color)+FullName()+

EncodeColor(colorBlack)+".as compared to "+EncodeColor(color)

+ baseMkt +EncodeColor(colorBlack)+" = "+WriteVal(rs,1.2)+"\n"+"\n"+

FullName()+"\n"+"\n"+" MARKET = "+MarketID(1)+"\n"+" SECTOR = "+SectorID(1)+"\n"+

" INDUSTRY = "+IndustryID(1);

 

//Exploration

//Note: you can change the relative strength setting using the Parameter button in AA window...

Filter = rs >= Param("Relative_strength",0,-1000,1000,1) AND V >= 100000 ;

AddColumn(rs,"RS_%",1.2);

AddTextColumn(MarketID(1),"Market");

AddColumn(C,"close",1.2);

AddColumn(V,"Volume",1);

----- Original Message -----
Sent: Thursday, January 22, 2009 6:30 AM
Subject: [amibroker] Relative strength exploration

I would like to perform a Relative strength exploration between stocks and their respective market.....
 
How do we iterate through the database and associate each stock with its Market index when the database
contains several markets...
 
 
 
Thank you
Anthony



No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.10.12/1908 - Release Date: 1/21/2009 9:15 PM


__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___