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
Bonjour, à tester:
//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
// --- settings
per1 = 27 //"Fast period"
mult1 = 1.6 //"Fast range"
per2 = 55 //"Slow period"
mult2 = 2 //"Slow range"
// --- end of settings
source = customclose
once wper1 = per1 * 2 - 1
avrng1 = average[per1,1](abs(source - source[1]))
smrng1 = average[wper1,1](avrng1) * mult1
once wper2 = per2 * 2 - 1
avrng2 = average[per2,1](abs(source - source[1]))
smrng2 = average[wper2,1](avrng2) * mult2
smrng = (smrng1 + smrng2) / 2
r = smrng
if source>rngfilt[1] then
if (source-r)<rngfilt[1] then
rngfilt=rngfilt[1]
else
rngfilt=source-r
endif
elsif (source+r)>rngfilt[1] then
rngfilt=rngfilt[1]
else
rngfilt=source+r
endif
if rngfilt > rngfilt[1] then
upward=upward+1
downward=0
endif
if rngfilt < rngfilt[1] then
upward=0
downward=downward+1
endif
longCond = (source > rngfilt and source > source[1] and upward > 0) or (source > rngfilt and source < source[1] and upward > 0)
SCREENER[longCond]
Autre version pour ce screener pour signaux haussier et baissier aussi:
//PRC_Twing Range Filter | screener
// --- settings
per1 = 27 //"Fast period"
mult1 = 1.6 //"Fast range"
per2 = 55 //"Slow period"
mult2 = 2 //"Slow range"
// --- end of settings
source = customclose
once wper1 = per1 * 2 - 1
avrng1 = average[per1,1](abs(source - source[1]))
smrng1 = average[wper1,1](avrng1) * mult1
once wper2 = per2 * 2 - 1
avrng2 = average[per2,1](abs(source - source[1]))
smrng2 = average[wper2,1](avrng2) * mult2
smrng = (smrng1 + smrng2) / 2
r = smrng
if source>rngfilt[1] then
if (source-r)<rngfilt[1] then
rngfilt=rngfilt[1]
else
rngfilt=source-r
endif
elsif (source+r)>rngfilt[1] then
rngfilt=rngfilt[1]
else
rngfilt=source+r
endif
if rngfilt > rngfilt[1] then
upward=upward+1
downward=0
endif
if rngfilt < rngfilt[1] then
upward=0
downward=downward+1
endif
longCond = (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 then
colorr=0
//colorg=255
elsif shortcond then
colorr=255
//colorg=0
endif
signal=0
if colorr=0 and colorr[1]=255 then
signal=1
//drawarrowup(barindex,min(low,rngfilt)-averagetruerange[14]/2) coloured("green")
endif
if colorr=255 and colorr[1]=0 then
signal=-1
//drawarrowdown(barindex,max(high,rngfilt)+averagetruerange[14]/2) coloured("crimson")
endif
screener[signal<>0] (signal as "signals")
Merci 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! 🙂