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

RE: [amibroker] Setting the start date for "Relative Performance" indicator



PureBytes Links

Trading Reference Links

Try this code. It doesn't have selectable tickers, but it does what you
want:

"INDEX RelStrength";
"Indexes will MATCH at Selected Bar";

constant = SelectedValue(Foreign("^SPC","C"));

/* RelStrength of the NDX */
ndx = Foreign( "^NDX", "C" )/Foreign( "^SPC", "C" ) * 1000 /
(SelectedValue(Foreign("^NDX","C"))/constant);
Plot(ndx ,"^NDX", colorWhite,styleThick);

/* RelStrength of the COMP */
Comp = Foreign( "IWM", "C" )/Foreign( "^SPC", "C" ) * 1000 /
(SelectedValue(Foreign("IWM","C"))/constant);
Plot(Comp ,"IWM",colorBlue,styleThick);

/* RelStrength of the RUT */
Comp = Foreign( "QQQQ", "C" )/Foreign( "^SPC", "C" ) * 1000 /
(SelectedValue(Foreign("QQQQ","C"))/constant);
Plot(Comp ,"QQQQ", colorGreen,styleThick);

/* RelStrength of the RYVYX */
Comp = Foreign( "SMH", "C" )/Foreign( "^SPC", "C" ) * 1000 /
(SelectedValue(Foreign("SMH","C"))/constant);
Plot(Comp ,"SMH", colorViolet,styleThick);

/* RelStrength of the RYVNX
Comp = Foreign( "RYVNX", "C" )/Foreign( "^SPC", "C" ) * 1000 /
(SelectedValue(Foreign("RYVNX","C"))/constant);
Plot(Comp ,"Venture RS",colorRed,styleThick);*/

--
Terry


| -----Original Message-----
| From: amibroker@xxxxxxxxxxxxxxx 
| [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of a1ex_douglas
| Sent: Tuesday, May 31, 2005 8:47 AM
| To: amibroker@xxxxxxxxxxxxxxx
| Subject: [amibroker] Setting the start date for "Relative 
| Performance" indicator
| 
| 
| Is there a way to set the start date for the "Relative Performance" 
| Indicator?  As it is, it simply resets all securities to "0" at the 
| far left-hand side of the screen and allows the relative performance 
| to unfold across the screen - but there doesn't appear t obe an easy 
| way to elect which date is the first visible date on the screen (& 
| thus the first date of the "Relative Performance").
| 
| Any ideas?
| 
| Many thanks,
| Alex.
| 
| alexdouglas@xxxxxxxxx
| 
| 
| 
| 
| 
| 
| 
| ------------------------ Yahoo! Groups Sponsor 
| --------------------~--> 
| What would our lives be like without music, dance, and 
| theater? Donate or volunteer in the arts today at Network for 
| Good! http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/GHeqlB/TM
| --------------------------------------------------------------
| ------~-> 
| 
| Please note that this group is for discussion between users only.
| 
| To get support from AmiBroker please send an e-mail directly to 
| SUPPORT {at} amibroker.com
| 
| For other support material please check also: 
| http://www.amibroker.com/support.html
| 
|  
| Yahoo! Groups Links
| 
| 
| 
|  
| 
| 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/