créer un screener basé sur twin range filter
Forums › ProRealTime forum Français › Support ProScreener › créer un screener basé sur twin range filter
- This topic has 3 replies, 3 voices, and was last updated 1 year ago by
francis59.
-
-
04/07/2023 at 10:01 AM #213004
Bonjour,
Ne connaissant rien en code, est-ce que quelqu’un serait intéressé de créer un screener pour détecter les stocks dès qu’une flèche verte apparaît?
base pour créer le screener : https://www.prorealcode.com/prorealtime-indicators/twin-range-filter/
D’avance merci et bon courage ! 🙂
Bonne journée
04/07/2023 at 10:21 AM #213005Bonjour, à tester:
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849//PRC_Twing Range Filter | indicator//28.03.2023//Nicolas @ www.prorealcode.com//Sharing ProRealTime knowledge//author: colinmck//PRT indicator into screener 07.04.23 JC_Bywan @ www.prorealcode.com// --- settingsper1 = 27 //"Fast period"mult1 = 1.6 //"Fast range"per2 = 55 //"Slow period"mult2 = 2 //"Slow range"// --- end of settingssource = customcloseonce wper1 = per1 * 2 - 1avrng1 = average[per1,1](abs(source - source[1]))smrng1 = average[wper1,1](avrng1) * mult1once wper2 = per2 * 2 - 1avrng2 = average[per2,1](abs(source - source[1]))smrng2 = average[wper2,1](avrng2) * mult2smrng = (smrng1 + smrng2) / 2r = smrngif source>rngfilt[1] thenif (source-r)<rngfilt[1] thenrngfilt=rngfilt[1]elserngfilt=source-rendifelsif (source+r)>rngfilt[1] thenrngfilt=rngfilt[1]elserngfilt=source+rendifif rngfilt > rngfilt[1] thenupward=upward+1downward=0endifif rngfilt < rngfilt[1] thenupward=0downward=downward+1endiflongCond = (source > rngfilt and source > source[1] and upward > 0) or (source > rngfilt and source < source[1] and upward > 0)SCREENER[longCond]04/07/2023 at 10:23 AM #213007Autre version pour ce screener pour signaux haussier et baissier aussi:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263//PRC_Twing Range Filter | screener// --- settingsper1 = 27 //"Fast period"mult1 = 1.6 //"Fast range"per2 = 55 //"Slow period"mult2 = 2 //"Slow range"// --- end of settingssource = customcloseonce wper1 = per1 * 2 - 1avrng1 = average[per1,1](abs(source - source[1]))smrng1 = average[wper1,1](avrng1) * mult1once wper2 = per2 * 2 - 1avrng2 = average[per2,1](abs(source - source[1]))smrng2 = average[wper2,1](avrng2) * mult2smrng = (smrng1 + smrng2) / 2r = smrngif source>rngfilt[1] thenif (source-r)<rngfilt[1] thenrngfilt=rngfilt[1]elserngfilt=source-rendifelsif (source+r)>rngfilt[1] thenrngfilt=rngfilt[1]elserngfilt=source+rendifif rngfilt > rngfilt[1] thenupward=upward+1downward=0endifif rngfilt < rngfilt[1] thenupward=0downward=downward+1endiflongCond = (source > rngfilt and source > source[1] and upward > 0) or (source > rngfilt and source < source[1] and upward > 0)shortCond = (source < rngfilt and source < source[1] and downward > 0) or (source < rngfilt and source > source[1] and downward > 0)if longcond thencolorr=0//colorg=255elsif shortcond thencolorr=255//colorg=0endifsignal=0if colorr=0 and colorr[1]=255 thensignal=1//drawarrowup(barindex,min(low,rngfilt)-averagetruerange[14]/2) coloured("green")endifif colorr=255 and colorr[1]=0 thensignal=-1//drawarrowdown(barindex,max(high,rngfilt)+averagetruerange[14]/2) coloured("crimson")endifscreener[signal<>0] (signal as "signals")1 user thanked author for this post.
04/07/2023 at 10:39 AM #213009Merci beaucoup à JC_Bwan et Nicolas pour votre réponse claire et rapide 😉
J’en profite pour savoir si vous auriez une idée pour cet autre sujet : https://www.prorealcode.com/topic/creer-un-screener-base-sur-zizg-volume-by-price-fibonacci/
Belle journée! 🙂
-
AuthorPosts
Find exclusive trading pro-tools on