PureBytes Links
Trading Reference Links
|
Alan,
Sorry, I was away from the computer :( , it was my anniversary.....
What version of AB are you using ?
Also..WATCH out for word wrap when copy and paste....into IB..
Anyway...Here is another version that uses the TITLE= variable to
display the information...Give it a try..
Anthony
//Relative Strength comparison %
period = 250;
//insert Base markets
basemkt1="^ndx";//must be enclosed in quotation marks
basemkt2="^gspc";//must be enclosed in quotation marks
BaseMkt=basemkt2;//Select Base market....
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;
Color=colorBlue;//line color
Plot(rs,"Relative_Strength",color,styleLine);
Title="Relative_Strength of..."+Name()+"...as compared
to..."+WriteIf(basemkt==basemkt1,"^NDX...( Nasdaq index
)",WriteIf(basemkt==basemkt2,"^GSPC..( S & P 500 index )",""))+" = "+
WriteVal(rs,1.2)+"%";
Filter=1;
AddColumn(rs,"RS_%",1.2);
/*************************************************/
Alan Nouray wrote:
> Jason,
>
> OK. I copied the following into IB:
>
>
> /************************************************************/
>
> //Relative Strength comparison %
>
> period = 250;
>
> //insert Base markets
> basemkt1="^ndx";//must be enclosed in quotation marks
> basemkt2="^gspc";//must be enclosed in quotation marks
>
> BaseMkt=basemkt1;//Select Base market....
>
> 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;
>
> Color=colorBlue;//line color
>
> Plot(rs,EncodeColor(colorBlack)+"Relative_Strength of ..
> +EncodeColor(Color)+Name()+EncodeColor(colorBlack)+".. as compared to
> +WriteIf(basemkt==basemkt1,EncodeColor(color)+"^NDX"
> WriteIf(basemkt==basemkt2,EncodeColor(color)
> +"^GSPC","")),color,styleLine);
>
> Filter=1;
> AddColumn(rs,"RS_%",1.2);
>
> /*******************************************************/
>
> I get the following error messages:
>
> Syntax error at line 23, column 53:
> +EncodeColor(Color)+Name()+EncodeColor(colorBlack)+".
> ----------------------------------------------------^
>
> Unknown identifier at line 26, column 2:
> +"
> -^
>
> Alan
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Jayson" <jcasavant@xxxx> wrote:
> > Alan,
> > you need the whole code........ the part that starts with plot(
> >
> > In AB you can place all the code in either IB or AA and it will
> work...
> >
> > Jayson
> > -----Original Message-----
> > From: Alan Nouray [mailto:alann@x...]
> > Sent: Friday, March 14, 2003 3:21 PM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Re: RSI
> >
> >
> > Anthony,
> >
> > This is what I did. I copied the following code to IB:
> >
> > //Relative Comparison %
> > period = 250;//Period of relative Comparison
> > BaseMarket="^ndx";//select Base market
> > x = Foreign(BaseMarket,"C") - Ref(Foreign(BaseMarket,"C"),-period);
> > x = (x / Ref(Foreign(BaseMarket,"C"),-period)) * 100;
> > y = C - Ref(C,-period);
> > y = ( y / Ref(C,-period)) * 100;
> > rs = y - x;
> > Filter=1;
> > AddColumn(RS,"RS_%",1.2);
> >
> > Then select Show Dates, then Apply. I also use yahoo. I get the
> empty
> > window.
> >
> > Alan
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Anthony Faragasso" <ajf1111@xxxx>
>
> > wrote:
> > > Alan...
> > >
> > > Did you receive my last post....If not here it is again.
> > >
> > > Load into Indicator builder..select show dates..insert your base
> > markets as
> > > per your data provider...I use Yahoo...click apply....
> > >
> > > this formula can also be used in the AA window...
> > > /************************************************************/
> > >
> > > //Relative Strength comparison %
> > >
> > > period = 250;
> > >
> > > //insert Base markets
> > > basemkt1="^ndx";//must be enclosed in quotation marks
> > > basemkt2="^gspc";//must be enclosed in quotation marks
> > >
> > > BaseMkt=basemkt1;//Select Base market....
> > >
> > > 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;
> > >
> > > Color=colorBlue;//line color
> > >
> > > Plot(rs,EncodeColor(colorBlack)+"Relative_Strength of ..
> > > +EncodeColor(Color)+Name()+EncodeColor(colorBlack)+".. as compared
>
> > to
> > > +WriteIf(basemkt==basemkt1,EncodeColor(color)+"^NDX"
> > > WriteIf(basemkt==basemkt2,EncodeColor(color)
> > +"^GSPC","")),color,styleLine);
> > >
> > > Filter=1;
> > > AddColumn(rs,"RS_%",1.2);
> > >
> > > /*******************************************************/
> > > Anthony
> > >
> > >
> > > -------Original Message-------
> > >
> > > From: amibroker@xxxxxxxxxxxxxxx
> > > Date: Friday, March 14, 2003 15:01:00
> > > To: amibroker@xxxxxxxxxxxxxxx
> > > Subject: [amibroker] Re: RSI
> > >
> > > Thanks Anthony,
> > >
> > > When I use the plot function instead of your code "AddColumn", I
> > can
> > > see the RS graph but with your code I just get the empty window.
> > >
> > > Alan
> > >
> > >
> > > -------Original Message-------
> > > >
> > > > From: amibroker@xxxxxxxxxxxxxxx
> > > > Date: Friday, March 14, 2003 13:26:43
> > > > To: amibroker@xxxxxxxxxxxxxxx
> > > > Subject: [amibroker] Re: RSI
> > > >
> > > > Thanks Anthony,
> > > >
> > > > I jsut paste the code to IB but the window is empty. Should I do
>
> > > > anything alse?
> > > >
> > > > Alan
> > > >
> > > > --- In amibroker@xxxxxxxxxxxxxxx, "Anthony Faragasso"
> > > <ajf1111@xxxx>
> > > > wrote:
> > > > > Alan,
> > > > >
> > > > > Here is what I use:
> > > > >
> > > > > //Relative Comparison %
> > > > > period = 250;//Period of relative Comparison
> > > > > BaseMarket="^ndx";//select Base market
> > > > > x = Foreign(BaseMarket,"C") - Ref(Foreign(BaseMarket,"C"),-
> > > period);
> > > > > x = (x / Ref(Foreign(BaseMarket,"C"),-period)) * 100;
> > > > > y = C - Ref(C,-period);
> > > > > y = ( y / Ref(C,-period)) * 100;
> > > > > rs = y - x;
> > > > > Filter=1;
> > > > > AddColumn(RS,"RS_%",1.2);
> > > > > Anthony
> > > > >
> > > > > -------Original Message-------
> > > > >
> > > > > From: amibroker@xxxxxxxxxxxxxxx
> > > > > Date: Friday, March 14, 2003 12:50:55
> > > > > To: amibroker@xxxxxxxxxxxxxxx
> > > > > Subject: [amibroker] RSI
> > > > >
> > > > > Has anybody developed a formula that calculates and shows the
> > RS
> > > of
> > > > a
> > > > > certain stock compare to list of stocks (such as N100).
> > Something
> > > > > similar to RS in Investor Business Daily.
> > > > >
> > > > > Alan
> > > > >
> > > > >
> > > > > Yahoo! Groups Sponsor
> > > > > ADVERTISEMENT
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Send BUG REPORTS to bugs@xxxx
> > > > > Send SUGGESTIONS to suggest@xxxx
> > > > > -----------------------------------------
> > > > > 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
> > > > ADVERTISEMENT
> > > >
> > > >
> > > >
> > > >
> > > > Send BUG REPORTS to bugs@xxxx
> > > > Send SUGGESTIONS to suggest@xxxx
> > > > -----------------------------------------
> > > > 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
> > > ADVERTISEMENT
> > >
> > >
> > >
> > >
> > > Send BUG REPORTS to bugs@xxxx
> > > Send SUGGESTIONS to suggest@xxxx
> > > -----------------------------------------
> > > 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
> > ADVERTISEMENT
> >
> >
> >
> >
> > Send BUG REPORTS to bugs@xxxx
> > Send SUGGESTIONS to suggest@xxxx
> > -----------------------------------------
> > 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
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 ---------------------~-->
Your own Online Store Selling our Overstock.
http://us.click.yahoo.com/rZll0B/4ftFAA/46VHAA/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/
|