StockFetcher Forums · Filter Exchange · S&P 500 cumulative strength index and Sector relative strength<< >>Post Follow-up
GameonGman5
7 posts
msg #152598
Ignore GameonGman5
6/11/2020 12:47:40 AM

Looking to scan for the above to determine which sectors are the strongest over the last month, 3 mos and 6 mos. Sector RSI would be by the ETF.

davesaint86
725 posts
msg #152610
Ignore davesaint86
6/11/2020 7:25:30 PM

Fetcher[apply to symlist(spy,qqq,xlc,xly,xlp,xle,fdn,xlv,xlf,xli,xlb,xlre,xlu,xlk,slv,gld,shy,tlt,ief,jnk,tbf)

draw rsi(5)
draw rsi(5) line at 50
draw rsi(5) line at 40
draw rsi(5) line at 50
draw rsi(5) line at 20
draw rsi(5) line at 80
draw atrlong on plot
draw atrshort on plot
draw ma(50)
draw ema(15)

set{E10, price above ma(15)}
set{D10Longposition, count(E10 > 0,1)}
set{D10Shortposition, count(E10 < 0,1)}
SET{D10TRIGGER,0}

set{E27, price above ma(50)}
set{D20Longposition, count(E27 > 0,1)}
set{D20Shortposition, count(E27 < 0,1)}
SET{D20TRIGGER,0}


set{E31, price above Upper Bollinger Bands(18,2)}
set{ABLongposition, count(E31 > 0,1)}
set{ABShortposition, count(E31 < 0,1)}
SET{ABSTRIGGER,0}

set{E35, price below Lower Bollinger Bands(18,2)}
set{BBLongposition, count(E35 > 0,1)}
set{BBShortposition, count(E35 < 0,1)}
SET{BBSTRIGGER,0}


set{CRS1, rsi(5),1)}
set{CRS2, rsi(13),1)}
set{CRS3, rsi(21),1)}
set{CCRS1, CRS1 + CRS2}
set{CCRS2, CCRS1 + CRS3}
set{CCRS3, CCRS2 /3}

set{CRS4, weekly rsi(5),1)}
set{CRS5, weekly rsi(13),1)}
set{CRS6, weekly rsi(321),1)}

set{WCRS1, CRS4 + CRS5}
set{WCRS2, WCRS1 + CRS6}
set{WCRS3, WCRS2 /3}
set{CWRSI1, CCRS3 + WCRS3}
set{C-RSI, CWRSI1 /2}
set{RSI21, RSI(21) - 50}
set{CRSI_Bar, RSI21}
PlotType{CRSI_Bar,zerobar}

set{RSI13, RSI(13) - 50}
set{RSI13_line, RSI13}
draw RSI13 on plot CRSI_Bar

set{RSI5, RSI(5) - 50}
set{RSI5_line, RSI5}
draw RSI5 on plot CRSI_Bar

set{drsilong1, count(rsi(21) above 5, 1)}
set{drsilong2, count(rsi(13) above rsi(21), 1)}
set{drsilong3, count(rsi(5) above rsi(21), 1)}
set{drsilong4, drsilong1 + drsilong2}
set{drsilong5, drsilong4 + drsilong3}
set{drsilong, count(drsilong5 equals 3, 1)}
set{drsishort, count(drsilong5 less than 3, 1)}
SET{DRSITRIGGER,0}


set{wrsi1, weekly rsi(5)}
set{wrsi2, weekly rsi(21)}
set{wrsi3, count(wrsi1 > wrsi2,1)}
set{wrsilong, count(wrsi3 equals 1, 1)}
set{wrsishort, count(wrsi3 less than 1, 1)}


set{CRS21, ROC(21,1)}
set{CRS63, ROC(63,1)}
set{CRS126, ROC(126,1)}
set{CR1, CRS21 + CRS63}
set{C-RS, CR1 + CRS126}

Set{W21, CRS21 * .33}
Set{W63, CRS63 * .33}
Set{W126, CRS126 * .34}
set{rw1, w21 + w63}
set{rw-c, rw1 + w126}

Set{RS1, csto + c-rsi}

Set{RS, rs1 / 2}
add column rs

set{wsto, weekly Slow Stochastics(14,3)}
set{dsto, Slow Stochastics(14,3)}
set{wdsto, wsto + dsto}
set{CSTO, wdsto / 2}
set{TWRSI5, weekly RSI(5)}
set{TWRSI13, weekly RSI(13)}
set{TWRSI21, weekly RSI(21)}
set{TWRSI1, TWRSI5 + TWRSI13}
set{TWRSI2, TWRSI1 + TWRSI21}
set{A-WRSI, TWRSI2 / 3}
set{TDRSI57, RSI(5)}
set{TDRSI13, RSI(13)}
set{TDRSI30, RSI(21)}
set{TDRSI1, TDRSI5 + TDRSI13}
set{TDRSI2, TDRSI1 + TDRSI21}
set{A-DRSI, TDRSI2 / 3}



set{LongRSI21Trend,count(RSI(21) > 50 ,1)}

set{LongRSI,count(RSI5 > RSI13 ,1)}


set{LongRSI5,count(RSI5 above the 0 line ,1)}
draw longrsi5 on plot
set{LongRSI13,count(RSI13 above the 0 line ,1)}
draw longrsi13 on plot
set{LongRSI21,count(RSI21 above the 0 line ,1)}
draw longrsi21 on plot
DRAW FIBONACCI UP(65)
DRAW FIBONACCI DOWN(65)
SET{TI42, MA(4) / MA(42)}


add column separator
add column ti42

add column separator
add column ABLongposition{a-u-bb}
add column separator
add column BBShortposition{b-l-bb}
add column separator
add column D10Longposition {EMA15}
add column separator
add column D20Longposition {MA50}
add column separator
add column rsi(5)
add column separator
add column longrsi5 {rsi5t}
add column separator
add column LongRSI13 {RSI13t}
add column separator
add column LongRSI21Trend{RSI21T}
add column separator


ADD column rw-c
add column separator
ADD COLUMN ROC(126,1) {6 mth %}
add column separator
ADD COLUMN ROC(63,1) {3 mth %}
add column separator
ADD COLUMN ROC(21,1) {1 mth %}
add column separator

add column csto
ADD COLUMN SEPARATOR
add column c-rsi
ADD COLUMN SEPARATOR

add column RSI(2)

add column separator
add column RSI(13)
add column separator
add column RSI(21)
add column separator

add column atr(14) {Atr}
add column separator
add column average day range (14){ADR%}



SORT COLUMN 5 desCENDING
CHART-TIME IS 120 days
]



davesaint86
725 posts
msg #152611
Ignore davesaint86
6/11/2020 7:29:44 PM

Fetcher[apply to symlist(xlc,xly,xlp,xle,fdn,xlv,xlf,xli,xlb,xlre,xlu,xlk,slv,gld,shy,xrt,vgt,fdn,ita,robo)


Set{RS1, csto + c-rsi}
Set{RS, rs1 / 2}

draw ma(18)
draw ma(50)

draw Bollinger bands(18,2.0)
set{E31, price above Upper Bollinger Bands(18,2)}
set{ABLongposition, count(E31 > 0,1)}
set{ABShortposition, count(E31 < 0,1)}
SET{ABSTRIGGER,0}
set{E35, price below Lower Bollinger Bands(18,2)}
set{BBLongposition, count(E35 > 0,1)}
set{BBShortposition, count(E35 < 0,1)}
SET{BBSTRIGGER,0}


set{CRS1, rsi(5),1)}
set{CRS2, rsi(13),1)}
set{CRS3, rsi(28),1)}
set{CCRS1, CRS1 + CRS2}
set{CCRS2, CCRS1 + CRS3}
set{CCRS3, CCRS2 /3}

set{CRS4, weekly rsi(5),1)}
set{CRS5, weekly rsi(13),1)}
set{CRS6, weekly rsi(28),1)}

set{WCRS1, CRS4 + CRS5}
set{WCRS2, WCRS1 + CRS6}
set{WCRS3, WCRS2 /3}
set{CWRSI1, CCRS3 + WCRS3}
set{C-RSI, CWRSI1 /2}
set{RSI28, RSI(28) - 50}
set{CRSI_Bar, RSI28}
PlotType{CRSI_Bar,zerobar}

set{RSI13, RSI(13) - 50}
set{RSI13_line, RSI13}


set{RSI5, RSI(5) - 50}
set{RSI5_line, RSI5}



set{drsilong1, count(rsi(28) above 1, 1)}
set{drsilong2, count(rsi(5) above rsi(28), 1)}
set{drsilong3, count(rsi(13) above rsi(28), 1)}
set{drsilong4, drsilong1 + drsilong2}
set{drsilong5, drsilong4 + drsilong3}
set{drsilong, count(drsilong5 equals 3, 1)}
set{drsishort, count(drsilong5 less than 3, 1)}
SET{DRSITRIGGER,0}


set{wrsi1, weekly rsi(5)}
set{wrsi2, weekly rsi(28)}
set{wrsi3, count(wrsi1 > wrsi2,1)}
set{wrsilong, count(wrsi3 equals 1, 1)}
set{wrsishort, count(wrsi3 less than 1, 1)}


set{TWRSI5, weekly RSI(5)}
set{TWRSI13, weekly RSI(13)}
set{TWRSI28, weekly RSI(28)}
set{TWRSI1, TWRSI5 + TWRSI13}
set{TWRSI2, TWRSI1 + TWRSI28}
set{A-WRSI, TWRSI2 / 3}
set{TDRSI5, RSI(5)}
set{TDRSI13, RSI(13)}
set{TDRSI28, RSI(28)}
set{TDRSI1, TDRSI5 + TDRSI13}
set{TDRSI2, TDRSI1 + TDRSI21}
set{A-DRSI, TDRSI2 / 3}
set{LongRSI28Trend,count(RSI(28) > 49 ,1)}
set{LongRSI,count(RSI13 > RSI28 ,1)}
draw LongRSI on plot
set{ShortRSI,count(RSI13 < RSI28 ,1)}
draw ShortRSI on plot


set{LongRSI5,count(RSI5 above the 0 line ,1)}
set{ShortRSI5,count(RSI5 below the 0 line ,1)}
set{LongRSI13,count(RSI13 above the 0 line ,1)}
set{LongRSI28,count(RSI28 above the 0 line ,1)}



draw rsi(5)
draw rsi(5) line at 50
draw rsi(5) line at 30
draw rsi(5) line at 70

draw LongRSI5 on plot
draw ShortRSI5 on plot


set{wsto, weekly Slow Stochastics(14,3)}
set{dsto, Slow Stochastics(14,3)}
set{wdsto, wsto + dsto}
set{CSTO, wdsto / 2}
set{E10, price above ema(15)}
set{D10Longposition, count(E10 > 0,1)}
set{D10Shortposition, count(E10 < 0,1)}
SET{D10TRIGGER,0}
SET{TI42, MA(4) / MA(42)}

draw vxvvxx on plot vxxavg
draw eriskon
draw eriskoff
set{vxxc, ind(vxx,close)}
set{vixc, ind(^vix,close)}
set{vxvc, ind(vxv,close)}
set{spyc, ind(spy,close)}
set{spxl, ind(spxl,close)}
set{vix3, ind(^VIX3M,close)}

set{vxvvix, vxvc / vixc}
set{vixavg, cema(vxvvix,7)}
set{vxvvxx, vxvc / vxxc}
set{vxxavg, cema(vxvvxx,7)}

set{eriskon, count(vxvvxx > or = to vxxavg,1)}
set{eriskoff, count(vxvvxx < or = to vxxavg,1)}

set{erisk_on, count(vxvvxx crossed above vxxavg,1)}
set{erisk_off, count(vxvvxx crossed below vxxavg,1)}
set{ervar, vxvvxx - vxxavg}

add column rs
add column separator
add column ti42
add column separator
add column eriskon {Risk-On}
add column separator
add column longrsi {RSI(13/28)-Long}
add column separator
add column shortrsi {RSI(13/28)-Short}
add column separator
add column ma(5)
add column separator
add column cma(low,3) {MA3-L}
add column separator
add column ABLongposition{a-u-bb}
add column separator
add column D10Longposition {ema15}
add column separator
add column BBShortposition{b-l-bb}
add column separator
add column LongRSI5 {rsi(5)-Long}
add column separator
add column ShortRSI5 {rsi(5)-Short}
add column separator
ADD COLUMN ROC(126,1) {6 mth %}
add column separator

ADD COLUMN ROC(63,1) {3 mth %}
add column separator
ADD COLUMN ROC(21,1) {1 mth %}
add column separator
add column slow Stochastic(14,3) Fast %K {Fast%K}
add column slow Stochastic(14,3) Slow %D {Slow%D}
add column separator
add column slow Stochastic(14,3) Fast %K 2 day ago {Fast%K-2}
add column slow Stochastic(14,3) Slow %D 2 day ago {Slow%D-2}
add column separator
add column slow Stochastic(14,3) Fast %K 3 day ago {Fast%K-3}
add column slow Stochastic(14,3) Slow %D 3 day ago {Slow%D-3}
add column separator


add column atr(14) {Atr}
add column separator
add column average day range (14){ADR%}
SORT COLUMN 5 DESCENDING
CHART-TIME IS 120 days
]



GameonGman5
7 posts
msg #152617
Ignore GameonGman5
6/12/2020 1:05:27 PM

Thank you!!!

GameonGman5
7 posts
msg #152618
Ignore GameonGman5
6/12/2020 1:15:20 PM

That is awesome! How would I go about adding an additional column for the avg of the 6, 3 and 1 mo RSI?



StockFetcher Forums · Filter Exchange · S&P 500 cumulative strength index and Sector relative strength<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.