You can recreate the custom indicator described in Giorgos Siligardos’ article in this issue, “Applying The Sector Rotation Model,” by using the following TradeSense code.
First, open the Trader’s Toolbox, click on the Functions tab and click the New button. Input the following code:
&bull01 := Close Of "XLY" / (Close.(lbp) Of "XLY").1 &bull02 := Close Of "XLF" / (Close.(lbp) Of "XLF").1 &bear01 := Close Of "XLE" / (Close.(lbp) Of "XLE").1 &bear02 := Close Of "XLU" / (Close.(lbp) Of "XLU").1 &bear03 := Close Of "XLP" / (Close.(lbp) Of "XLP").1 &bear := (&bear01 + &bear02 + &bear03) / 3 &bull := (&bull01 + &bull02) / 2 100 * (&bull - &bear)
Click the Verify button. The “Add inputs” window will pop up. Click “Add.” Change the values to the following:
Lbp = 75
When you are finished, click on the Save button, type a name for your new function, and click OK.
Now that we have the function created, go to a daily chart and go to the “Add to chart” window by clicking on the chart and typing “A” on the keyboard. Click on the Indicators tab, find the indicator in the list, and either doubleclick on it or highlight the name and click the “Add” button.
Click on the chart and type the letter “E” to bring up the Chart Settings window. Highlight the indicator you just added and change the “type” to “histogram” under “appearance,” then click OK.
We will be providing a library called “Applying The Sector Rotation Model” that includes the custom indicator SRMind from this article. You can download a special file named “SC201208,” downloadable through Trade Navigator, to get this library.