testplay 7 posts msg #159612 - Ignore testplay |
9/22/2022 4:50:48 PM
My best filter, I can't remember who originated it but it works for me.
chart-display is weekly-type is ohlc
apply to symlist (spy,sqqq,qid,tqqq,qqqx,midu,upro,dgro,sso,spxx,diax,ety,eos,jpst,bpy,pcm,cefl,agg,udow,tvix,tna,fas,xlf,qyld,enb,fxc,fas,oxlc,swan,bto,srty,fof,utg,bui,flc,bst,asg,ko,bcv,etj,ddf,scd,spmo,htd,nie,tna,jtd,jce,sphd,stk,bhk,qlta,govt,dfp,hyi,hix,jrs,rfi,bmo,abx,bce,bam,bmo,bns,boxc,bpy,bep,cae,ccj,cm,cp,cni,cve,gib,cot,dhxm,enb,fsv,fnv,imo,mga,mfc,qsr,rci,ry,sjr,phys,stn,slf,su,td,tu,trp,fxc,ewc,utsl,dba,drsk,unm,spmo,nusi,bto,gld,pba,fif,labu,pill,fsk,nrz,xyld,mpw,jepi,qld,iak,lumn,ar,iau,et,erh,kyn)
set{ close4, close 4 days ago}
set{ diff4, close - close4}
set{ pct4, round(diff4 multiplied by 100 ) / close4 }
set{ chg, close - close yesterday}
add column chg
add column pct4 { 4 day chg }
add column annual dividend yield
add column pe ratio
add column MA(13)
Set{cntcmadma1abovecmadma7,count( cma(DMA(7,-5),2) > cma(DMA(7,-5),7) ,1)}
draw cntcmadma1abovecmadma7
Set{cntcmadma1abovecmadma7b,count( cma(DMA(7,-5),2)< 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),8) */
set{AAb,days( cma(DMA(7,-5),2) is above cma(DMA(7,-5),7) ,250)}
set{AAa,days( cma(DMA(7,-5),2) 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,-5),7) 1day ago,1)}
draw cntcmadma7abovecmadma7
Set{cntcmadma7abovecmadma7b,count( cma(DMA(7,-5),7)< cma(DMA(7,-5),7) 1day ago,1)}
draw cntcmadma7abovecmadma7b
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),2)
draw cma(DMA(7,-5),7)
draw MACD(5,20,9)
draw MA(13)
do not draw dma(7,-5),7)
do not draw MA(5)
Chart-time is 3 months
|