Needs Help to build a Screener. Thanks
Forums › ProRealTime English forum › ProScreener support › Needs Help to build a Screener. Thanks
- This topic has 6 replies, 4 voices, and was last updated 4 years ago by
Khaled.
-
-
05/18/2020 at 3:28 AM #132052
Hi, I’ve found a useful Indictor courtesy of “kallaganne” which provides Buy and Sell signals.
I’d like to build a Screener based on the same selection methodology. Can you please HELP!!!
Much appreciated.
Indicator code:
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182once rr=1mb=average[20](typicalprice)k=48n=(k*2)-4p=(n/2)-1h1=DPO[n](high)moyh=high-h1hi=(moyh-moyh[1]+(high[p])/n)*nhi=(round(hi*100))/100l1=dpo[n](low)moyl=low-l1lo=(moyl-moyl[1]+(low[p])/n)*nlo=(round(lo*100))/100clo1=dpo[n](close)moyc=close-clo1clot=(moyc-moyc[1]+(close[p])/n)*nclot=(round(clot*100))/100cond1=(high>high[1] and high>high[2])cond2=(cond1 and high>hi[46]) and (barindex>bari or rr=-1)if cond1 and cond2 thenflagg=1targeth=hightargetl=lo[46]elseflagg=0signa=mbendiffor zz=0 to 45if clot[45-zz]<targetl and hi[45-zz]<=targeth and flagg=1 thensigna=high+(averagetruerange[20](close))*.5rr=1bari=barindex+zz+2breakelsif hi[45-zz]>targeth thensigna=mbbreakendifnextcondi=(low<low[1] and low<low[2]) and low<lo[46] and (barindex>bar or rr=1)if condi thenfflag=1target1=lowtarget2=hi[46]elsefflag=0siigna=mbendiffor kk=0 to 45if clot[45-kk]>target2 and lo[45-kk]>=target1 and fflag=1 thensiigna=low-(averagetruerange[20](close))*.5rr=-1bar=barindex+kk+2breakelsif lo[45-kk]<target1 thensiigna=mbbreakendifnextif barindex < 100 thensigna=undefinedsiigna=undefinedendifgolong = (siigna < mb)goshort = (signa > mb)*-1atr=AverageTrueRange[14](close)if golong<>0 thendrawarrowup(barindex,low-atr/2) coloured(0,200,0)endifif goshort<>0 thendrawarrowdown(barindex,high+atr/2) coloured(200,0,0)endifreturn golong as "LONG",goshort as "SHORT",0Moderator’s edit: link to the indicator topic https://www.prorealcode.com/topic/comment-mettre-fleche-sur-graph-pour-signal-plutot-que-signal-sur-histogramme/05/18/2020 at 6:50 AM #132059Welcome, but please help to be helped, by respecting the rules of the yellow box just above the “submit” button of any message :
– you have posted in the wrong language forum, I now move your topic from French proscreener forum to English proscreener forum as you chose to speak English in your topic
– you have not used the “insert PRT code” button, and without proper code formatting, the members who help other members just won’t read your message if it doesn’t highlight in appropriate color the prt keywords, not just for eye comfort but also to see bugs faster. See attached image to locate the button if you haven’t found it yet. I’ll spend time reformatting your message this time, but please use the “insert prt code” button without need for moderator intervention next time
– you have not given your topic a meaningful title. Vast majority of topics are about needing help, but the forum is a huge database for search and in your future searches on titles you will be happy that everybody used words on what the search is about rather than words like “help screener” which would make the search result unusable. Please choose another title and the next moderator reading the message will edit your title
05/18/2020 at 10:30 AM #132103The screener code below should work, it gives alerts each time a green or a red arrow is detected.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182once rr=1mb=average[20](typicalprice)k=48n=(k*2)-4p=(n/2)-1h1=DPO[n](high)moyh=high-h1hi=(moyh-moyh[1]+(high[p])/n)*nhi=(round(hi*100))/100l1=dpo[n](low)moyl=low-l1lo=(moyl-moyl[1]+(low[p])/n)*nlo=(round(lo*100))/100clo1=dpo[n](close)moyc=close-clo1clot=(moyc-moyc[1]+(close[p])/n)*nclot=(round(clot*100))/100cond1=(high>high[1] and high>high[2])cond2=(cond1 and high>hi[46]) and (barindex>bari or rr=-1)if cond1 and cond2 thenflagg=1targeth=hightargetl=lo[46]elseflagg=0signa=mbendiffor zz=0 to 45if clot[45-zz]<targetl and hi[45-zz]<=targeth and flagg=1 thensigna=high+(averagetruerange[20](close))*.5rr=1bari=barindex+zz+2breakelsif hi[45-zz]>targeth thensigna=mbbreakendifnextcondi=(low<low[1] and low<low[2]) and low<lo[46] and (barindex>bar or rr=1)if condi thenfflag=1target1=lowtarget2=hi[46]elsefflag=0siigna=mbendiffor kk=0 to 45if clot[45-kk]>target2 and lo[45-kk]>=target1 and fflag=1 thensiigna=low-(averagetruerange[20](close))*.5rr=-1bar=barindex+kk+2breakelsif lo[45-kk]<target1 thensiigna=mbbreakendifnextif barindex < 100 thensigna=undefinedsiigna=undefinedendifgolong = (siigna < mb)goshort = (signa > mb)*-1//atr=AverageTrueRange[14](close)//if golong<>0 then//drawarrowup(barindex,low-atr/2) coloured(0,200,0)//endif//if goshort<>0 then//drawarrowdown(barindex,high+atr/2) coloured(200,0,0)//endifscreener[golong or goshort]05/18/2020 at 11:29 AM #132111Sincèrement désolé d’être passé très rapidement sur les conditions générales et merci encore pour avoir remis le post dans le bon forum.Sincerely sorry to have passed very quickly on the general conditions and thank you again for putting the post in the right forum.
05/18/2020 at 11:31 AM #13211205/18/2020 at 11:50 AM #132118Khaled – Please pay attention to the forum rules! English only in the English language forums…. and French only in the French language forums. Noobywan has already had to remind you of this rule and then in your reply to him you break the rule again! Moderators have better things to do with their time than continuously tidy up after you.
05/18/2020 at 11:58 AM #132124 -
AuthorPosts