This version of the Jurik RSX (smoothed RSI with Jurik MA applied on it) has the dynamic overbought / oversold zones built with the DSL function (Discontinued Signal Lines).
When the oscillator is in overbought or oversold zones (above or below the DSL upper and lower lines), it changes color.
Converted following a request in the indicators forum:
https://www.prorealcode.com/topic/dsl-rsx-conversion-code-mq4-too-prc/
Other indicators using DSL as dynamic OB/OS zones: https://www.prorealcode.com/tag/dsl/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
//PRC_DSL RSX | indicator //11.12.2020 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge //converted from MT4 version (mladen) // --- settings RSIperiod = 32 SignalPeriod = 32 // Signal period // --- end of settings rsiprice=customclose //RSX if barindex>max(RSIperiod,SignalPeriod) then Len=rsiperiod smallRsiValue = 0.0000000000000001 if (f90 = 0.0) then f90 = 1.0 f0 = 0.0 if (Len-1 >= 5) then f88 = Len-1.0 else f88 = 5.0 endif f8 = 100.0*(rsiprice) f18 = 3.0 / (Len + 2.0) f20 = 1.0 - f18 else if (f88 <= f90) then f90 = f88 + 1 else f90 = f90 + 1 endif f10 = f8 f8 = 100*Close v8 = f8 - f10 f28 = f20 * f28 + f18 * v8 f30 = f18 * f28 + f20 * f30 vC = f28 * 1.5 - f30 * 0.5 f38 = f20 * f38 + f18 * vC f40 = f18 * f38 + f20 * f40 v10 = f38 * 1.5 - f40 * 0.5 f48 = f20 * f48 + f18 * v10 f50 = f18 * f48 + f20 * f50 v14 = f48 * 1.5 - f50 * 0.5 f58 = f20 * f58 + f18 * Abs(v8) f60 = f18 * f58 + f20 * f60 v18 = f58 * 1.5 - f60 * 0.5 f68 = f20 * f68 + f18 * v18 f70 = f18 * f68 + f20 * f70 v1C = f68 * 1.5 - f70 * 0.5 f78 = f20 * f78 + f18 * v1C f80 = f18 * f78 + f20 * f80 v20 = f78 * 1.5 - f80 * 0.5 if ((f88 >= f90) and (f8 <> f10)) then f0 = 1.0 endif if ((f88 = f90) and (f0 = 0.0)) then f90 = 0.0 endif endif if ((f88 < f90) and (v20 > smallRsiValue)) then v4 = (v14 / v20 + 1.0) * 50.0 if (v4 > 100.0) then v4 = 100.0 endif if (v4 < 0.0) then v4 = 0.0 endif else v4 = 50.0 endif irsi=v4 alpha = 2.0/(1.0+SignalPeriod) val = irsi if val>50 then levelu = levelu[1]+alpha*(val-levelu[1]) endif if val<50 then leveld = leveld[1]+alpha*(val-leveld[1]) endif //OB and OS colors r=200 g=200 b=200 if val>levelu then r=50 g=205 b=50 elsif val<leveld then r=255 g=165 b=0 endif endif return val coloured(r,g,b) style(line,2), levelu style(dottedline), leveld style(dottedline) |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Bonjour Nicolas
Serait-ce possible d’avoir la ligne DSL bicolore quand elle est en zone sur-achetée ou sur-vendue.
couleur claire quand ça monte et foncée quand ça descend par exemple.
merci et bon week end
J’ai rajouté ce bout de code et ça marche, reste à peaufiner les couleurs
if val>levelu and val < val[1] then
r= 0
g= 0
b= 255
elsif val val [1] then
r= 255
g= 0
b= 0
endif
gloups ! j’en ai oublié un bout …
//OB and OS colors
r=200
g=200
b=200
if val>levelu then
r=255
g=165
b=0
elsif vallevelu and val <= val[1] then
r= 255
g= 0
b= 0
elsif val= val [1] then
r= 84
g= 249
b= 141
endif
///////////////////////////////////////////////////////////////
https://zupimages.net/viewer.php?id=20/50/2e3v.jpg
Bonjour Je souhaite l’avoir sur l’indicateur MT4 si possible s’il vous plait. car je l’ai fait mais ça montre 7 erreurs
ProRealCode est un site dédié à l’utilisation de la plateforme de trading ProRealTime: https://www.prorealtime.com