range filter buy ad sell
Forums › ProRealTime forum Français › Support ProScreener › range filter buy ad sell
-
-
11/28/2024 at 9:49 PM #240863range filter buy and sell123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103// Original Script > @DonovanWall// Adapted Version > @guikroth//////////////////////////////////////////////////////////////////////////// Settings for 5min chart, BTCUSDC. For Other coin, change the parameters//////////////////////////////////////////////////////////////////////////// Sourcesrc = customclose// Sampling Period// Settings for 5min chart, BTCUSDC. For Other coin, change the paremeters// per = defval=100, minval=1, "Sampling Period"// Range Multiplier// mult = defval=3.0, minval=0.1, "Range Multiplier"// Smooth Average Rangewper = per*2 -1avrng = exponentialaverage[per](abs(src-src[1]))smrng = mult * exponentialaverage[wper](avrng)// Range Filterrngfilt = srcIf src > rngfilt[1] thenIf rngfilt[1] > src-smrng thenrngfilt = rngfilt[1]Elserngfilt = src-smrngendifelsif rngfilt[1] < src+smrng thenrngfilt = rngfilt[1]elserngfilt = src+smrngendiffilt = rngfilt// Filter Directionupward = 0If filt > filt[1] thenupward = upward[1]+1elsif filt < filt[1] thenupward = 0elseupward = upward[1]endifdownward = 0If filt < filt[1] thendownward = downward[1]+1elsif filt > filt[1] thendownward = 0elsedownward = downward[1]endif// Target Bandshband = filt + smrnglband = filt - smrng//// Zone de couleurs : selon des conditions////////////////////////////////////////////////////////////////////////////mbTendance = ( Average[3](filt) + filt)/2if mbTendance > mbTendance[1] thenred=0green=0blue=255elsif mbTendance < mbTendance[1] thenred=255green=0blue=0endifcolorbetween(lband,hband,red,Green,Blue,88)// Break OutslongCond = (src > filt and src > src[1] and upward > 0) or (src > filt and src < src[1] and upward > 0)shortCond = (src < filt and src < src[1] and downward > 0) or (src < filt and src > src[1] and downward > 0)CondIni = 0If longCond thenCondIni = 1elsif shortCond thenCondIni = -1elseCondIni = CondIni[1]endiflongCondition = longCond and CondIni[1] = -1shortCondition = shortCond and CondIni[1] = 1//AlertsIf longCondition thenDrawtext("▲",barindex,low-AverageTrueRange[18](close)) coloured(0,0,255)endifIf shortCondition thenDrawtext("▼",barindex,high+AverageTrueRange[18](close)) coloured(255,0,0)endifReturn filt as "Range Filter", hband as "High Target", lband as "Low Target"
bonsoir,
j’aimerai un screener permettant d’identifier quand la bande est de couleur bleue (mbTendance > mbTendance[1] ) et quand elle est de couleur rouge mbTendance < mbTendance[1] )
Je bute.
Merci.
11/29/2024 at 11:20 AM #240876Ici tu as :
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172// Original Script > @DonovanWall// Adapted Version > @guikroth//////////////////////////////////////////////////////////////////////////// Settings for 5min chart, BTCUSDC. For Other coin, change the parameters//////////////////////////////////////////////////////////////////////////// Sourcesrc = customclose// Sampling Period// Settings for 5min chart, BTCUSDC. For Other coin, change the paremetersper = 100//defval=100, minval=1, "Sampling Period"// Range Multipliermult = 3//defval=3.0, minval=0.1, "Range Multiplier"// Smooth Average Rangewper = per*2 -1avrng = exponentialaverage[per](abs(src-src[1]))smrng = mult * exponentialaverage[wper](avrng)// Range Filterrngfilt = srcIf src > rngfilt[1] thenIf rngfilt[1] > src-smrng thenrngfilt = rngfilt[1]Elserngfilt = src-smrngendifelsif rngfilt[1] < src+smrng thenrngfilt = rngfilt[1]elserngfilt = src+smrngendiffilt = rngfilt// Filter Directionupward = 0If filt > filt[1] thenupward = upward[1]+1elsif filt < filt[1] thenupward = 0elseupward = upward[1]endifdownward = 0If filt < filt[1] thendownward = downward[1]+1elsif filt > filt[1] thendownward = 0elsedownward = downward[1]endif// Break OutslongCond = (src > filt and src > src[1] and upward > 0) or (src > filt and src < src[1] and upward > 0)shortCond = (src < filt and src < src[1] and downward > 0) or (src < filt and src > src[1] and downward > 0)CondIni = 0If longCond thenCondIni = 1elsif shortCond thenCondIni = -1elseCondIni = CondIni[1]endiflongCondition = longCond and CondIni[1] = -1shortCondition = shortCond and CondIni[1] = 1screener[longCondition or shortCondition](shortCondition as "SH",longCondition as "LG")11/29/2024 at 11:32 AM #240878Un grand merci.
j’avais cru que longCondition = longCond and CondIni[1] = –1 et shortCondition = shortCond and CondIni[1] = 1 servait pour indiquer un signal et pas pour déterminer la tendance comme codée ci-dessous :
mbTendance = ( Average[3](filt) + filt)/2if mbTendance > mbTendance[1] thenred=0green=0blue=255elsif mbTendance < mbTendance[1] thenred=255green=0blue=0endifcolorbetween(lband,hband,red,Green,Blue,88)11/29/2024 at 5:47 PM #24091612/01/2024 at 5:58 PM #24095212/01/2024 at 7:04 PM #24095412/01/2024 at 7:06 PM #240955voilà mon code.// Original Script > @DonovanWall
// Adapted Version > @guikroth//////////////////////////////////////////////////////////////////////////
// Settings for 5min chart, BTCUSDC. For Other coin, change the parameters
//////////////////////////////////////////////////////////////////////////// Source
src = customclose// Sampling Period
// Settings for 5min chart, BTCUSDC. For Other coin, change the paremeters
per = 100//defval=100, minval=1, “Sampling Period”// Range Multiplier
mult = 3//defval=3.0, minval=0.1, “Range Multiplier”// Smooth Average Range
wper = per*2 -1
avrng = exponentialaverage[per](abs(src-src[1]))
smrng = mult * exponentialaverage[wper](avrng)// Range Filter
rngfilt = src
If src > rngfilt[1] then
If rngfilt[1] > src-smrng then
rngfilt = rngfilt[1]
Else
rngfilt = src-smrng
endif
elsif rngfilt[1] < src+smrng then
rngfilt = rngfilt[1]
else
rngfilt = src+smrng
endif
filt = rngfilt// Filter Direction
upward = 0
If filt > filt[1] then
upward = upward[1]+1
elsif filt < filt[1] then
upward = 0
else
upward = upward[1]
endif
downward = 0
If filt < filt[1] then
downward = downward[1]+1
elsif filt > filt[1] then
downward = 0
else
downward = downward[1]
endif// Break Outs
longCond = (src > filt and src > src[1] and upward > 0) or (src > filt and src < src[1] and upward > 0)
shortCond = (src < filt and src < src[1] and downward > 0) or (src < filt and src > src[1] and downward > 0)CondIni = 0
If longCond then
CondIni = 1
elsif shortCond then
CondIni = -1
else
CondIni = CondIni[1]
endiflongCondition = longCond and CondIni[1] = 1
shortCondition = shortCond and CondIni[1] = -1screener[longCondition or shortCondition](shortCondition as “SH”,longCondition as “LG”)
12/06/2024 at 1:03 PM #24118912/06/2024 at 5:04 PM #24120912/06/2024 at 9:27 PM #241221 -
AuthorPosts
Find exclusive trading pro-tools on