StockFetcher Forums · Filter Exchange · Connors TPS<< 1 2 3 4 >>Post Follow-up
snappyfrog
731 posts
msg #146154
Ignore snappyfrog
1/19/2019 10:38:09 AM

Dave, thank you.
Cheese, your abbreviated version is great.
Shill, you are right. This works great with playing options on ETFs.

Cheese
1,374 posts
msg #146161
Ignore Cheese
1/20/2019 11:07:10 AM

Fetcher[

/* COMBINE 2019 New Year IDEAS of snappyfrog davesaint86 */

/* ------------------------------------------------------------------------ snappyfrog */
/* apply to symlist(GE,AMD,F,CHK,USO,NOK,SIRI,RIG,SWN,SNAP,CZR,S,FCX,ABEV,RF,JCP,CLF) */

draw Stochastic %K(40,40,4) /* snappyfrog exits based on the EMA(13) then wait for next Stoch cross. */
draw EMA(13) /* snappyfrog exits based on the EMA(13) then wait for next Stoch cross. */
chart-time is 4 months


/* ------------------------------------------------------------------------ davesaint86 */
/* https://www.stockfetcher.com/forums/Filter-Exchange/Connors-TPS/146101 */
/* symlist(ba,iwm,fdn,ibb,rpv,qqq,fdn,vgt,iwp,ita,robo,xlk,psq,tbt,tlt,nvda,qld,sso,aapl,def,usmv,psch,mlpa,amlp,mla,amj,vht,vdc,vcr,sqqq,psq,iwp,tqqq,ziv,vxx,faz) */

apply to symlist(spy,iwm,agg,qqq)
chart-time 5 months


draw weekly ma(21) /* davesaint86 */

Set{ADR15, ATR(20) * 1.5} /* davesaint86 */
Set{ATR1, high 10 day high - ADR15} /* davesaint86 */
Set{Buy1, high 10 day high - ADR15} /* davesaint86 */
draw BUY1 on plot price /* buy or hold above; sell or wait below */


set{RSI30, RSI(30) - 50} /* davesaint86 */
set{CRSI_Bar, RSI30} /* davesaint86 */
draw CRSI_Bar
PlotType{CRSI_Bar,zerobar}
set{RSI14, RSI(14) - 50} /* davesaint86 */
set{RSI14_line, RSI14}
draw RSI14 on plot CRSI_Bar
set{RSI7, RSI(7) - 50} /* davesaint86 */
set{RSI7_line, RSI7}
draw RSI7 on plot CRSI_Bar

]



Cheese
1,374 posts
msg #146162
Ignore Cheese
1/20/2019 11:31:37 AM

My opinions and twenty five cents used to buy me a cup of coffee. Here we go...

I may use the above signals from snappyfrog in strong bull runs, more risk for more gain.

I may use the above signals from davesaint86 in tentative bull runs, bear markets,
and bear market rallies to still get decent gains with less risk and more safety of capital.

In times of crises, drained liquidity, and/or high volatility, I may throw all technical analyses
out the window.


davesaint86
725 posts
msg #146168
Ignore davesaint86
modified
1/20/2019 2:54:02 PM

Below is a combo filter that you can play with and backtest. I'm calling it the combo monkey wrench filter. It contains a variation of Kevins's Sharpe Allocation filter, the Atr 1.5 filter Cheese parsed out of my other filter and the controversial DMA(7,5).

So you can add three symbols to the filter. Do not forget to update the symbols on the two Vars.

So you can add, (tmf,tmv,shy), (upro,spxu,shy), (tna,tza,shy), (ugld,dgld,shy), (uwt,dwt,shy), (ugaz,dgaz,shy, (soxl,soxs,shy), (tecl,tecs,shy), (tqqq,sqqq,shy), (udow,sdow, shy) You get the picture.


Fetcher[SYMLIST(tecl,tecs,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(tecl, var1)}
set{var1b, IND(tecs, 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(tecl, sharpe)}
set{var2b, IND(tecs, 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}

Set{ADR15, ATR(20) * 1.25} /* davesaint86 */
Set{ATR1, high 10 day high - ADR15} /* davesaint86 */
Set{Buy1, high 10 day high - ADR15} /* davesaint86 */

draw BUY1 on plot price /* buy or hold above; sell or wait below */
Set{Long,count(close > buy1 ,1)}
Set{Short,count(close < buy1 ,1)}
set{E20,close - buy1 }


draw long on plot
draw short on plot
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{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

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 atr(21) {Atr}
add column separator
add column average day range (21){ADR%}

SORT COLUMN 11 DESCENDING
chart-time is 75 days
]



Cheese
1,374 posts
msg #146170
Ignore Cheese
1/20/2019 3:16:28 PM

davesaint86,
Thank you, thank you, thank you for the monkey wrench combo filter.
One person's monkey wrench is another person's Swiss Army knife.


Cheese
1,374 posts
msg #146171
Ignore Cheese
1/20/2019 3:22:37 PM

Fetcher[


/* https://www.stockfetcher.com/forums/Filter-Exchange/Connors-TPS/146101/99999 */
/* davesaint86 modified 1/20/2019 COMBO MONKEY WRENCH FILTER for TNA,TZA,SHY */



SYMLIST(TNA,TZA,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(TNA, var1)}
set{var1b, IND(TZA, 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(TNA, sharpe)}
set{var2b, IND(TZA, 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}

Set{ADR15, ATR(20) * 1.25} /* davesaint86 */
Set{ATR1, high 10 day high - ADR15} /* davesaint86 */
Set{Buy1, high 10 day high - ADR15} /* davesaint86 */

draw BUY1 on plot price /* buy or hold above; sell or wait below */
Set{Long,count(close > buy1 ,1)}
Set{Short,count(close < buy1 ,1)}
set{E20,close - buy1 }


draw long on plot
draw short on plot
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{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

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 atr(21) {Atr}
add column separator
add column average day range (21){ADR%}

SORT COLUMN 11 DESCENDING
chart-time is 75 days
]



Cheese
1,374 posts
msg #146172
Ignore Cheese
1/20/2019 3:25:49 PM


Submit
Fetcher[

/* https://www.stockfetcher.com/forums/Filter-Exchange/Connors-TPS/146101/99999 */
/* davesaint86 modified 1/20/2019 COMBO MONKEY WRENCH FILTER for TQQQ,SQQQ,SHY */



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}

Set{ADR15, ATR(20) * 1.25} /* davesaint86 */
Set{ATR1, high 10 day high - ADR15} /* davesaint86 */
Set{Buy1, high 10 day high - ADR15} /* davesaint86 */

draw BUY1 on plot price /* buy or hold above; sell or wait below */
Set{Long,count(close > buy1 ,1)}
Set{Short,count(close < buy1 ,1)}
set{E20,close - buy1 }


draw long on plot
draw short on plot
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{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

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 atr(21) {Atr}
add column separator
add column average day range (21){ADR%}

SORT COLUMN 11 DESCENDING
chart-time is 75 days
]



Cheese
1,374 posts
msg #146173
Ignore Cheese
modified
1/20/2019 3:27:33 PM

Submit
Fetcher[

/* https://www.stockfetcher.com/forums/Filter-Exchange/Connors-TPS/146101/99999 */
/* davesaint86 modified 1/20/2019 COMBO MONKEY WRENCH FILTER for UPRO,SPXS,SHY */



SYMLIST(UPRO,SPXS,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(UPRO, var1)}
set{var1b, IND(SPXS, 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(UPRO, sharpe)}
set{var2b, IND(SPXS, 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}

Set{ADR15, ATR(20) * 1.25} /* davesaint86 */
Set{ATR1, high 10 day high - ADR15} /* davesaint86 */
Set{Buy1, high 10 day high - ADR15} /* davesaint86 */

draw BUY1 on plot price /* buy or hold above; sell or wait below */
Set{Long,count(close > buy1 ,1)}
Set{Short,count(close < buy1 ,1)}
set{E20,close - buy1 }


draw long on plot
draw short on plot
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{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

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 atr(21) {Atr}
add column separator
add column average day range (21){ADR%}

SORT COLUMN 11 DESCENDING
chart-time is 75 days
]



Cheese
1,374 posts
msg #146174
Ignore Cheese
1/20/2019 3:31:03 PM


Submit
Fetcher[

/* https://www.stockfetcher.com/forums/Filter-Exchange/Connors-TPS/146101/99999 */
/* davesaint86 modified 1/20/2019 COMBO MONKEY WRENCH FILTER for SVXY,UVXY,SHY */



SYMLIST(SVXY,UVXY,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(SVXY, var1)}
set{var1b, IND(UVXY, 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(SVXY, sharpe)}
set{var2b, IND(UVXY, 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}

Set{ADR15, ATR(20) * 1.25} /* davesaint86 */
Set{ATR1, high 10 day high - ADR15} /* davesaint86 */
Set{Buy1, high 10 day high - ADR15} /* davesaint86 */

draw BUY1 on plot price /* buy or hold above; sell or wait below */
Set{Long,count(close > buy1 ,1)}
Set{Short,count(close < buy1 ,1)}
set{E20,close - buy1 }


draw long on plot
draw short on plot
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{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

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 atr(21) {Atr}
add column separator
add column average day range (21){ADR%}

SORT COLUMN 11 DESCENDING
chart-time is 75 days
]



ron22
255 posts
msg #146177
Ignore ron22
1/20/2019 4:37:50 PM

davesaint86 & cheese, I do not understand why you would use DMA(7,5) in this or any filter. I personally have seen DMA repaint on more than one occasion. Repainting makes any back test results incorrect. Right?

StockFetcher Forums · Filter Exchange · Connors TPS<< 1 2 3 4 >>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.