StockFetcher Forums · General Discussion · XIV<< 1 ... 14 15 16 17 18 ... 22 >>Post Follow-up
davesaint86
725 posts
msg #141806
Ignore davesaint86
2/3/2018 12:07:20 PM

Mac - do you think this downward move is about over?

Mactheriverrat
3,131 posts
msg #141809
Ignore Mactheriverrat
2/3/2018 12:54:12 PM

Well until cma(DMA(8,-5),1) cross above cma(DMA(8,-5),8) its still in a downward movement-
Unless someone has a Holy Grail indicator

IMHO!

davesaint86
725 posts
msg #141810
Ignore davesaint86
2/3/2018 1:03:58 PM

Good answer! I should have asked based on analyzing previous down moves do you think we are close to a bottom in this downtrend?

pthomas215
1,251 posts
msg #141811
Ignore pthomas215
2/3/2018 1:08:58 PM

and that cross could be the 97 support level. believe it or not. already lost 21% of it's value in a couple weeks.

Mactheriverrat
3,131 posts
msg #141812
Ignore Mactheriverrat
2/3/2018 2:22:37 PM



davesaint86
725 posts
msg #141814
Ignore davesaint86
2/3/2018 7:16:01 PM

I modified one of Kevin's Sharpe Allocation filters and embedded the code into my DMA8 filter. I do not know if it buys me anything. My goal is to find something that can get you in and out of a position faster when a trend changes abruptly. You can add whatever Bull/Inverse pair that you like to it (UGAZ/DGAZ, LABU/LABD, ZIV/VXZ, TMF/TMV, etc). I'm just playing around since I couldn't go skiing today.

Fetcher[
SYMLIST(xiv,vxx,shy)

SET{perf1A, ma(3) 6 days ago}
SET{perf1b, MA(3) / perf1a}
SET{perf, perf1b - 1}
SET{var1, perf*100}
SET{rfr, ind(^irx,close)}
SET{RISKFREERETURN, rfr/100}
SET{perf6, perf - RISKFREERETURN}
SET{STD6, CSTDDEV(CLOSE,6)}
SET{VOL6a, STD6 / MA(6)}
SET{vol6, vol6a * 100}

/*CALCULATION OF SHARPE RATIO - ANNUALIZED*/
SET{SHARPE1a, perf6 / VOL6a}
set{sharpe, sharpe1a * 0.5}

set{var1a, IND(xiv, var1)}
set{var1b, IND(vxx, var1)}
set{var1c, IND(shy, var1)}


SET{RANK1A, COUNT(var1 is above var1a,1)}
SET{RANK1B, COUNT(var1 is above var1b,1)}
SET{RANK1C, COUNT(var1 is above var1c,1)}


SET{RANK1D, RANK1A + RANK1B}
SET{RANK1E, RANK1C + RANK1D}

SET{RANK, 3 - RANK1E}


set{var2a, IND(xiv, sharpe)}
set{var2b, IND(vxx, sharpe)}
set{var2c, IND(shy, sharpe)}


SET{var3a, COUNT(var2a is above 0,1)}
SET{var3b, COUNT(var2b is above 0,1)}
SET{var3c, COUNT(var2c is above 0,1)}


SET{var4a, var2A * var3a}
SET{var4b, var2b * var3b}
SET{var4c, var2c * var3c}


set{var5a, var4a + var4b}
set{var5b, var4c}
set{var5c, var5a + var5b}


SET{allocation1, sharpe / var5c}



set{allocation2, allocation1 * count(sharpe above 0,1)}
set{allocation, allocation2 *100}

draw ema(25)
draw ema(30)
draw ema(35)
draw ema(40)
draw ema(45)
draw ema(50)
and draw Slow Stochastic(14,3) Fast %K line at 20.00 and draw Slow Stochastic(14,3) Fast %K line at 80.00
and draw Slow Stochastic(14,3) Fast %K line at 50.00
and draw Slow Stochastic(5,1) Fast %K line at 20.00 and draw Slow Stochastic(5,1) Fast %K line at 80.00 and draw Slow Stochastic(5,1) Fast %K line at 50.00
draw macd(8,17,5)
set{E4, TSI(5,5,9) - Smoothed TSI(5,5,9)}
set{TDLongposition, count(E4 > 0,1)}
set{TDShortposition, count(E4 < 0,1)}
SET{TDTRIGGER,0}

/* AxA is number of consecutive days cma(DMA(8,-5),8) above (+)/below(-) previous cma(DMA(8,-5),8) */
set{AAb,days( cma(DMA(8,-5),8) is above cma(DMA(8,-5),8) 1 day ago,250)}
set{AAa,days( cma(DMA(8,-5),8) is below cma(DMA(8,-5),8) 1 day ago,250)}
set{dmax8, AAa - AAb}
and add column dmax8 {dma_x_8}
do not Draw AxA
Set{cntcmadma8abovecmadma8,count( cma(DMA(8,-5),8) > cma(DMA(8,-5),8) 1day ago,1)}
draw cntcmadma8abovecmadma8
Set{cntcmadma8abovecmadma8b,count( cma(DMA(8,-5),8)< cma(DMA(8,-5),8) 1day ago,1)}
draw cntcmadma8abovecmadma8b
draw cntema13aboveema13b
set{E3,dma(8,-5),8)-cma(DMA(8,-5),8) }
set{Longposition, count(E3 > 0,1)}
set{Shortposition, count(E3 < 0,1)}
draw Longposition on plot
draw Shortposition on plot
draw dma(8,-5),8)
draw cma(DMA(8,-5),8)

set{E9, close above ma(18)}
set{DLongposition, count(E9 > 0,1)}
set{DShortposition, count(E9 < 0,1)}
SET{DTRIGGER,0}

set{CRS1, rsi(4),1)}
set{CRS2, rsi(9),1)}
set{CRS3, rsi(30),1)}
set{CCRS1, CRS1 + CRS2}
set{CCRS2, CCRS1 + CRS3}
set{CCRS3, CCRS2 /3}


set{CRS4, weekly rsi(4),1)}
set{CRS5, weekly rsi(9),1)}
set{CRS6, weekly rsi(30),1)}

set{WCRS1, CRS4 + CRS5}
set{WCRS2, WCRS1 + CRS6}
set{WCRS3, WCRS2 /3}
set{CWRSI1, CCRS3 + WCRS3}
set{C-RSI, CWRSI1 /2}
set{RSI30, RSI(30) - 50}
set{CRSI_Bar, RSI30}
draw CRSI_Bar
PlotType{CRSI_Bar,zerobar}
set{RSI9, RSI(9) - 50}
set{RSI9_line, RSI9}
draw RSI9 on plot CRSI_Bar
set{RSI4, RSI(4) - 50}
set{RSI4_line, RSI4}
draw RSI4 on plot CRSI_Bar
set{drsilong1, count(rsi(30) above 5, 1)}
set{drsilong2, count(rsi(4) above rsi(30), 1)}
set{drsilong3, count(rsi(9) above rsi(30), 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}
draw drsilong on plot
draw drsishort on plot

set{wrsi1, weekly rsi(4)}
set{wrsi2, weekly rsi(30)}
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{wsto, weekly Slow Stochastics(14,3)}
set{dsto, Slow Stochastics(14,3)}
set{wdsto, wsto + dsto}
set{CSTO, wdsto / 2}

set{TWRSI4, weekly RSI(4)}
set{TWRSI9, weekly RSI(9)}
set{TWRSI30, weekly RSI(30)}
set{TWRSI1, TWRSI4 + TWRSI9}
set{TWRSI2, TWRSI1 + TWRSI30}
set{A-WRSI, TWRSI2 / 3}

set{TDRSI4, RSI(4)}
set{TDRSI9, RSI(9)}
set{TDRSI30, RSI(30)}
set{TDRSI1, TDRSI4 + TDRSI9}
set{TDRSI2, TDRSI1 + TDRSI30}
set{A-DRSI, TDRSI2 / 3}
set{E10, close above Upper Bollinger Bands(18,2)}
set{BBLongposition, count(E10 > 0,1)}
set{BBShortposition, count(E10 < 0,1)}
SET{BBTRIGGER,0}

ADD COLUMN SEPARATOR
add column BBLongposition{BBSell}
ADD COLUMN SEPARATOR
ADD COLUMN RANK {Rank}
ADD COLUMN SEPARATOR
add column Sharpe Ratio(6) {Sharpe}
add column separator
add column allocation {Alloc %}
add column separator
add column Longposition {DMA8}
add column separator
add column drsilong {drsi}
add column separator
add column TDLongposition {DTSI}
add column separator
add column wrsilong {WRSI}
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 C-RS
add column separator
add column Upper Bollinger Bands(18.2) {Up-BB}
add column separator
add column lower Bollinger Bands(18.2) {Low-BB}
ADD COLUMN SEPARATOR
add column weekly Slow Stochastics(14,3){wSto}
ADD COLUMN SEPARATOR
add column Slow Stochastics(14,3){dSto}
ADD COLUMN SEPARATOR
add column csto
ADD COLUMN SEPARATOR
add column A-WRSI
ADD COLUMN SEPARATOR
add column A-DRSI
ADD COLUMN SEPARATOR
add column c-rsi
ADD COLUMN SEPARATOR
add column IFT(4,1) {dift}
add column separator
add column weekly IFT(4,1) {wift}
add column separator

add column rsi(4){drsi4}
add column separator
add column rsi(9){drsi9}
add column separator
add column rsi(30){drsi30}
add column separator
add column RSI(2)
add column separator
add column atr(21) {Atr}
add column separator
add column average day range (21){ADR%}

SORT COLUMN 9 ASCENDING
chart-time is 75 days
]



davesaint86
725 posts
msg #141815
Ignore davesaint86
2/3/2018 7:20:02 PM

Hedge 4-ETF Version

Fetcher[
apply to symlist(eev,ugld,vxx,tmf)
SET{perf1A, ma(3) 6 days ago}
SET{perf1b, MA(3) / perf1a}
SET{perf, perf1b - 1}
SET{var1, perf*100}
SET{rfr, ind(^irx,close)}
SET{RISKFREERETURN, rfr/100}
SET{perf6, perf - RISKFREERETURN}
SET{STD6, CSTDDEV(CLOSE,6)}
SET{VOL6a, STD6 / MA(6)}
SET{vol6, vol6a * 100}

/*CALCULATION OF SHARPE RATIO - ANNUALIZED*/
SET{SHARPE1a, perf6 / VOL6a}
set{sharpe, sharpe1a * 0.5}

set{var1a, IND(eev, var1)}
set{var1b, IND(ugld, var1)}
set{var1c, IND(vxx, var1)}
set{var1d, IND(tmf, var1)}

SET{RANK1A, COUNT(var1 is above var1a,1)}
SET{RANK1B, COUNT(var1 is above var1b,1)}
SET{RANK1C, COUNT(var1 is above var1c,1)}
SET{RANK1D, COUNT(var1 is above var1d,1)}
SET{RANK1E, RANK1A + RANK1B}
SET{RANK1F, RANK1C + RANK1D}
SET{RANK1G, RANK1E + RANK1F}
SET{RANK, 4 - RANK1G}

set{var2a, IND(eev, sharpe)}
set{var2b, IND(ugld, sharpe)}
set{var2c, IND(vxx, sharpe)}
set{var2d, IND(tmf, sharpe)}

SET{var3a, COUNT(var2a is above 0,1)}
SET{var3b, COUNT(var2b is above 0,1)}
SET{var3c, COUNT(var2c is above 0,1)}
SET{var3d, COUNT(var2d is above 0,1)}

SET{var4a, var2A * var3a}
SET{var4b, var2b * var3b}
SET{var4c, var2c * var3c}
SET{var4d, var2d * var3d}

set{var5a, var4a + var4b}
set{var5b, var4c + var4d}
set{var5c, var5a + var5b}

SET{allocation1, sharpe / var5c}
set{allocation2, allocation1 * count(sharpe above 0,1)}
set{allocation, allocation2 *100}

draw ema(25)
draw ema(30)
draw ema(35)
draw ema(40)
draw ema(45)
draw ema(50)
and draw Slow Stochastic(14,3) Fast %K line at 20.00 and draw Slow Stochastic(14,3) Fast %K line at 80.00
and draw Slow Stochastic(14,3) Fast %K line at 50.00
and draw Slow Stochastic(5,1) Fast %K line at 20.00 and draw Slow Stochastic(5,1) Fast %K line at 80.00 and draw Slow Stochastic(5,1) Fast %K line at 50.00
draw macd(8,17,5)
set{E4, TSI(5,5,9) - Smoothed TSI(5,5,9)}
set{TDLongposition, count(E4 > 0,1)}
set{TDShortposition, count(E4 < 0,1)}
SET{TDTRIGGER,0}

/* AxA is number of consecutive days cma(DMA(8,-5),8) above (+)/below(-) previous cma(DMA(8,-5),8) */
set{AAb,days( cma(DMA(8,-5),8) is above cma(DMA(8,-5),8) 1 day ago,250)}
set{AAa,days( cma(DMA(8,-5),8) is below cma(DMA(8,-5),8) 1 day ago,250)}
set{dmax8, AAa - AAb}
and add column dmax8 {dma_x_8}
do not Draw AxA
Set{cntcmadma8abovecmadma8,count( cma(DMA(8,-5),8) > cma(DMA(8,-5),8) 1day ago,1)}
draw cntcmadma8abovecmadma8
Set{cntcmadma8abovecmadma8b,count( cma(DMA(8,-5),8)< cma(DMA(8,-5),8) 1day ago,1)}
draw cntcmadma8abovecmadma8b
draw cntema13aboveema13b
set{E3,dma(8,-5),8)-cma(DMA(8,-5),8) }
set{Longposition, count(E3 > 0,1)}
set{Shortposition, count(E3 < 0,1)}
draw Longposition on plot
draw Shortposition on plot
draw dma(8,-5),8)
draw cma(DMA(8,-5),8)

set{E9, close above ma(18)}
set{DLongposition, count(E9 > 0,1)}
set{DShortposition, count(E9 < 0,1)}
SET{DTRIGGER,0}

set{CRS1, rsi(4),1)}
set{CRS2, rsi(9),1)}
set{CRS3, rsi(30),1)}
set{CCRS1, CRS1 + CRS2}
set{CCRS2, CCRS1 + CRS3}
set{CCRS3, CCRS2 /3}


set{CRS4, weekly rsi(4),1)}
set{CRS5, weekly rsi(9),1)}
set{CRS6, weekly rsi(30),1)}

set{WCRS1, CRS4 + CRS5}
set{WCRS2, WCRS1 + CRS6}
set{WCRS3, WCRS2 /3}
set{CWRSI1, CCRS3 + WCRS3}
set{C-RSI, CWRSI1 /2}
set{RSI30, RSI(30) - 50}
set{CRSI_Bar, RSI30}
draw CRSI_Bar
PlotType{CRSI_Bar,zerobar}
set{RSI9, RSI(9) - 50}
set{RSI9_line, RSI9}
draw RSI9 on plot CRSI_Bar
set{RSI4, RSI(4) - 50}
set{RSI4_line, RSI4}
draw RSI4 on plot CRSI_Bar
set{drsilong1, count(rsi(30) above 5, 1)}
set{drsilong2, count(rsi(4) above rsi(30), 1)}
set{drsilong3, count(rsi(9) above rsi(30), 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}
draw drsilong on plot
draw drsishort on plot

set{wrsi1, weekly rsi(4)}
set{wrsi2, weekly rsi(30)}
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{wsto, weekly Slow Stochastics(14,3)}
set{dsto, Slow Stochastics(14,3)}
set{wdsto, wsto + dsto}
set{CSTO, wdsto / 2}

set{TWRSI4, weekly RSI(4)}
set{TWRSI9, weekly RSI(9)}
set{TWRSI30, weekly RSI(30)}
set{TWRSI1, TWRSI4 + TWRSI9}
set{TWRSI2, TWRSI1 + TWRSI30}
set{A-WRSI, TWRSI2 / 3}

set{TDRSI4, RSI(4)}
set{TDRSI9, RSI(9)}
set{TDRSI30, RSI(30)}
set{TDRSI1, TDRSI4 + TDRSI9}
set{TDRSI2, TDRSI1 + TDRSI30}
set{A-DRSI, TDRSI2 / 3}
set{E10, close above Upper Bollinger Bands(18,2)}
set{BBLongposition, count(E10 > 0,1)}
set{BBShortposition, count(E10 < 0,1)}
SET{BBTRIGGER,0}

ADD COLUMN SEPARATOR
add column BBLongposition{BBSell}
ADD COLUMN SEPARATOR
ADD COLUMN RANK {Rank}
ADD COLUMN SEPARATOR
add column Sharpe Ratio(6) {Sharpe}
add column separator
add column allocation {Alloc %}
add column separator
add column Longposition {DMA8}
add column separator
add column drsilong {drsi}
add column separator
add column TDLongposition{DTSI}


add column separator
add column wrsilong {WRSI}
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 C-RS
add column separator
add column Upper Bollinger Bands(18.2) {Up-BB}
add column separator
add column lower Bollinger Bands(18.2) {Low-BB}
ADD COLUMN SEPARATOR
add column weekly Slow Stochastics(14,3){wSto}
ADD COLUMN SEPARATOR
add column Slow Stochastics(14,3){dSto}
ADD COLUMN SEPARATOR
add column csto
ADD COLUMN SEPARATOR
add column A-WRSI
ADD COLUMN SEPARATOR
add column A-DRSI
ADD COLUMN SEPARATOR
add column c-rsi
ADD COLUMN SEPARATOR
add column IFT(4,1) {dift}
add column separator
add column weekly IFT(4,1) {wift}
add column separator

add column rsi(4){drsi4}
add column separator
add column rsi(9){drsi9}
add column separator
add column rsi(30){drsi30}
add column separator
add column RSI(2)
add column separator
add column atr(21) {Atr}
add column separator
add column average day range (21){ADR%}

SORT COLUMN 9 ASCENDING
chart-time is 75 days
]



pthomas215
1,251 posts
msg #141816
Ignore pthomas215
2/3/2018 7:47:56 PM

mac, it may stop at 105 but there is an additional support like if you go back to August...topped @ 97, then went back down to that exact level later. Just saying we may see an up day Monday but it would not surprise me if next week we dropped below 100 to 97

davesaint86
725 posts
msg #141822
Ignore davesaint86
2/3/2018 9:16:49 PM

Mac - Just noticed that you changed the code a little. Cool!

Mactheriverrat
3,131 posts
msg #141826
Ignore Mactheriverrat
2/4/2018 1:02:51 AM

@PT -Support levels are always good to watch.

@Dave Roger that on the changed code

cma(DMA(8,-5),1) cross above cma(DMA(8,-5),8)

I've added
do not draw dma(8,-5),8) but still keep watching it

It seems that the cma(DMA(8,-5),1) and cma(DMA(8,-5),8) are a little slower and so far seem to be working well with each other.

I just got out of WFC 2 days ago in my IRA on a cma(DMA(8,-5),1) cross below cma(DMA(8,-5),8)




StockFetcher Forums · General Discussion · XIV<< 1 ... 14 15 16 17 18 ... 22 >>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.