screeners standard-deviation-channel
Forums › ProRealTime forum Italiano › Supporto ProScreener › screeners standard-deviation-channel
- This topic has 3 replies, 2 voices, and was last updated 2 years ago by lowbat.
Viewing 4 posts - 1 through 4 (of 4 total)
-
-
05/28/2022 at 9:02 AM #194032
Buongiorno
sarebbe possibile creare uno screener che indichi le azioni che incrociano o toccano (o anche che siano in un range del 5 % )del canale inferiore o superiore del https://www.prorealcode.com/prorealtime-indicators/standard-deviation-standard-error-linear-regression-channel/?
allego esempio grafico
grazie
05/28/2022 at 9:43 AM #194038Eccolo:
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465//PRC_Std and Ste LinRegChannel | indicator//Standard Deviation and Standard Error//Linear Regression Channel//12.03.2019//Nicolas @ www.prorealcode.com//Sharing ProRealTime knowledge////defparam drawonlastbaronly=true//defparam calculateonlastbars=1000// --- settingslookback= 200 //channel periodChannelType = 1 //1= Standard Deviation ; 2= Standard ErroNbDeviation = 1 //Deviation multiplier//colorRed = 255//colorGreen = 255//colorBlue = 0// --- end of settingssumx = 0sumy = 0sumxy = 0sumx2 = 0for cmpt = lookback downto 0 dotmpx = cmpttmpy = close[cmpt]sumy = sumy+tmpysumx = sumx+tmpxsumx2 = sumx2 + (tmpx*tmpx)sumxy = sumxy + (tmpy*tmpx)nextn = lookback+1if (sumx2 = sumx * sumx) then // protection to avoid infinite valuesb = sumxy - sumx * sumyelseb = (n * sumxy - sumx * sumy) / (n * sumx2 - sumx * sumx)endifa = (sumy - b * sumx) / n//drawsegment(barindex[lookback],a+b*lookback,barindex,a+b*0) coloured(colorRed,colorGreen,colorBlue)//channelif ChannelType = 1 then //Standard Deviationdat = std[lookback]*NbDeviationelsedat = ste[lookback]*NbDeviationendif//drawsegment(barindex[lookback],(a+b*lookback)+dat,barindex,a+b*0+dat) coloured(colorRed,colorGreen,colorBlue)//drawsegment(barindex[lookback],(a+b*lookback)-dat,barindex,a+b*0-dat) coloured(colorRed,colorGreen,colorBlue)UPPERline1 = (a+dat) * 1.05 //+5%UPPERline2 = (a+dat) * 0.95 //-5%LOWERline1 = (a-dat) * 1.05 //+5%LOWERline2 = (a-dat) * 0.95 //-5%Cond = 0IF close >= UPPERline2 AND close <= UPPERline1 THENCond = 1ELSIF close >= LOWERline2 AND close <= LOWERline1 THENCond = 2ENDIFSCREENER[Cond](Cond AS "1=↑,2=↓")05/28/2022 at 9:44 AM #194040Ovviamente i periodi non possono superare 250 (anche se puoi arrivare a 254 se vuoi, oppure 1024 con la versione Premium di PRT).
05/30/2022 at 5:12 PM #194211grazie è perfetto…!!!!!
1 user thanked author for this post.
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
Find exclusive trading pro-tools on
Similar topics: