Thu06202013

Last update12:00:00 AM

BackHomeS&C MagazineDepartmentsTraders' Tips AMIBROKER, SECTOR ROTATION MODEL (SRM) INDICATOR

AMIBROKER, SECTOR ROTATION MODEL (SRM) INDICATOR

logo

In “Applying The Sector Rotation Model” in this issue, author Giorgos Siligardos presents his sector rotation model (SRM) indicator.

A ready-to-use AmiBroker formula for implementing the SRM is presented below. To use it, enter the formula in the AFL Editor, then press Insert Indicator. To modify the lookback period, right-click on the chart and select “parameters” from the menu.

// SRM Indicator 
Lbp = Param("Lookback period", 75, 10, 200 ); 
Bull01 = 0.01 * ROC( Foreign("XLY", "C" ), Lbp ); 
Bull02 = 0.01 * ROC( Foreign("XLF", "C" ), Lbp ); 
Bear01 = 0.01 * ROC( Foreign("XLE", "C" ), Lbp ); 
Bear02 = 0.01 * ROC( Foreign("XLU", "C" ), Lbp ); 
Bear03 = 0.01 * ROC( Foreign("XLP", "C" ), Lbp ); 
Bull = ( Bull01 + Bull02 )/2; 
Bear = ( Bear01 + Bear02 + Bear03 ) /3; 
Plot( 100 * ( Bull - Bear ), "SRM"+_PARAM_VALUES(), colorRed, styleHistogram );

A sample chart is shown in Figure 11.

Image 11

FIGURE 11: AMIBROKER, SECTOR ROTATION MODEL (SRM) INDICATOR. Here is a daily price chart of the S&P 500 (upper pane) and the SRM indicator (bottom pane).

—Tomasz Janeczko, AmiBroker.com
www.amibroker.com


To read the entire issue click here and subscribe today!

PTSK — The Professional Traders' Starter Kit
Home| Working Money Magazine | S&C Magazine | Traders.com Advantage | Online Store | Traders’ Resource
Add a Product to Traders’ Resource | Message Boards | Subscribe/Renew | Free Trial Issue | Article Code | Search

DEPARTMENTS: Advertising | Editorial | Circulation | Employment | Contact Us | BY PHONE: (206) 938-0570

Join us on Facebook     Follow us on Twitter     Follow Us on StockTwits

Bookmark and ShareCopyright © 1996-2013 Technical Analysis, Inc. All rights reserved. Read our disclaimer & privacy statement.

SUBSCRIBE TO OUR FREE
EMAIL NEWSLETTER!