testplay 7 posts msg #151286 - Ignore testplay |
3/19/2020 11:20:43 AM
Xarlor.
If you are interested, this is what I have done with your code. I'm following mostly income funds. Some codes are stolen from others on this site and put together here.
chart-type is ohlc
and chart-display is weekly
apply to symlist (ddf,scd,gab,ety,htd,asg,eos,nie,jtd,jce,zf,dnp,usa,sphd,csq,tpz,fei,fen,bui,inf,utg,utf,duk,bhk,qlta,govt,dfp,flc,ztr,mci,kio,hps,pfn,pcm,jps,hyi,hix,ra,ladr,jrs,rnp,rfi,mitt,nrz,cim,bto,mgu,bcv,avk,stk,govt,bpy,upro,td,bmo,spy,ewc)
Show stocks where close is more than 50% below 52 week high
add column Average Day Range(30)
add column annual dividend yield
add column weekly stochastic (14,3,3)%k
and add column sector and add column industry
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)
do not draw dma(7,-5),7)
Chart-time is 12 months
set{52wh,high 52-week high}
set{cls,close}
set{var1,52wh - cls}
set{var2,cls / 52wh}
set{var3,var2 - 1}
set{var4,var3 * 100}
add column var1 {52-week high - close}
add column var4 {Percentage difference}
add column high 52-week high
|