StockFetcher Forums · Stock Picks and Trading · Any good systems for TQQQ<< 1 2 >>Post Follow-up
davesaint86
725 posts
msg #145386
Ignore davesaint86
11/29/2018 2:57:45 PM

The DMA7 triggered two days ago and the Sharpe Allocation trigger yesterday. Tweak as needed.

Fetcher[
SYMLIST(tqqq,sqqq,shy)

SET{perf1A, ma(3) 4 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{perf4, perf - RISKFREERETURN}
SET{STD4, CSTDDEV(CLOSE,4)}
SET{VOL4a, STD4 / MA(4)}
SET{vol4, vol4a * 100}

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

set{var1a, IND(tqqq, var1)}
set{var1b, IND(sqqq, 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(tqqq, sharpe)}
set{var2b, IND(sqqq, 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}


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}

Set{cntcmadma1abovecmadma7,count( cma(DMA(7,-5),1) > cma(DMA(7,-5),7) ,1)}
draw cntcmadma1abovecmadma7

Set{cntcmadma1abovecmadma7b,count( cma(DMA(7,-5),1)< cma(DMA(7,-5),7) ,1)}

draw cntcmadma1abovecmadma7b

/* AxA is number of consecutive days cma(DMA(7,-5),1) above (+)/below(-) previous cma(DMA(7,-5),7) */
set{AAb,days( cma(DMA(7,-5),1) is above cma(DMA(7,-5),7) ,250)}
set{AAa,days( cma(DMA(7,-5),1) is below cma(DMA(7,-5),7) ,250)}
set{dmax7, AAa - AAb} and add column dmax7 {dma_x_1over7}
do not Draw AxA


Set{cntcmadma7abovecmadma7,count( cma(DMA(7,-5),7) > cma(DMA(7,-7),7) 1day ago,1)}
draw cntcmadma7abovecmadma7

Set{cntcmadma7abovecmadma7b,count( cma(DMA(7,-5),7)< cma(DMA(7,-5),7) 1day ago,1)}

draw cntcmadma7abovecmadma7b

do not draw dma(7,-5),7)


set{E3,dma(7,-5),7)-cma(DMA(7,-5),7) }
set{Fastdma7Longposition, count(E3 > 0,1)}
set{Fastdma7Shortposition, count(E3 < 0,1)}
SET{TRIGGER,0}
draw Fastdma7Longposition on plot
draw Fastdma7Shortposition on plot
draw cma(DMA(7,-5),1)
draw cma(DMA(7,-5),7)
set{E9, close above ma(18)}
set{DLongposition, count(E9 > 0,1)}
set{DShortposition, count(E9 < 0,1)}
SET{DTRIGGER,0}

set{vmult, atr(20) * 2}
set{vstopu1a, low 20 day low + vmult}
set{vstopu2a, close + vmult}
set{vstop, min(vstopu1a 1 day ago,vstopu2a)}

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 vstop
ADD COLUMN SEPARATOR
add column BBLongposition{BBSell}
ADD COLUMN SEPARATOR
ADD COLUMN RANK {Rank}
ADD COLUMN SEPARATOR
add column Sharpe Ratio(4) {Sharpe}
add column separator
add column allocation {Alloc %}
add column separator
add column Fastdma7Longposition {DMA7}
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 11 aSCENDING
chart-time is 75 days
]



shillllihs
6,045 posts
msg #145387
Ignore shillllihs
11/29/2018 3:14:13 PM

Thanx for the contribution Dave.

shillllihs
6,045 posts
msg #145388
Ignore shillllihs
modified
11/29/2018 3:17:28 PM

I think I got it. This is what I’m going with but trading it in my own stylings.
You guys can continue to refine or add anything you want but I’m trading this and went long TQQQ.

Fetcher[
draw Aroon Up(25)
draw aroon up(25) line at 90
draw aroon up(25) lime at 10
draw aroon up(25) line at 70
draw aroon up(25) line at 30
draw bollinger(20)
draw weekly linear regression(10) slope
draw weekly ift(5,9) line at 0.5
draw weekly ift(5,9) line at -0.5
etf
and add column stderr(close,45)
draw indposition(OBV,50) line at .80
draw indposition(obv,50) line at .20
SET{SPY, IND(SPY,CLOSE)}
SET{VXX, IND(VXX,CLOSE)}
SET{RATIO, VXX / SPY}
SET{RATIOMA13, CMA(RATIO,13)}
SET{VXX_LONG, COUNT(RATIO ABOVE RATIOMA13,1)}
SET{SP500_LONG, COUNT(RATIO BELOW RATIOMA13,1)}
SET{TRIGGER,0}
DRAW RATIO ON PLOT RATIOMA13
draw ema(50)
DRAW VXX_LONG ON PLOT TRIGGER
DRAW SP500_LONG ON PLOT TRIGGER

SYMLIST(sqqq,tqqq,spxl,spxu,SPY,VXX,uvxy,tvix,tviz,svxy)

ADD COLUMN SP500_LONG
ADD COLUMN VXX_LONG
draw weekly ma(21)
]






shillllihs
6,045 posts
msg #145502
Ignore shillllihs
12/8/2018 4:27:44 PM

Sammyn, I briefly looked at your first filter again and I think I improved on exit.
After relative strength signals, sell on the fourth day unless there is a reversal. Looks great so far but I need to look at it some more.

shillllihs
6,045 posts
msg #147225
Ignore shillllihs
4/5/2019 3:58:43 PM

Just want to revive this filter as I love trading Tqqq. Everyone made great contributions but I am always hoping for improvements. Maybe this is as much as we can ask for but if anyone can improve on these, please do.

shillllihs
6,045 posts
msg #147265
Ignore shillllihs
4/9/2019 2:38:06 PM

Well that's it. Just some above average systems for trading Tqqq.
So unless you have extraordinary discipline or great instincts like me, do not trade.

olathegolf
119 posts
msg #147272
Ignore olathegolf
4/9/2019 7:16:46 PM

And to think I'd given Rocky the credit all these years.

StockFetcher Forums · Stock Picks and Trading · Any good systems for TQQQ<< 1 2 >>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.