Conversion Indicateur RSI cyclic smoothed v2 de TV à PRT
Forums › ProRealTime forum Français › Support ProBuilder › Conversion Indicateur RSI cyclic smoothed v2 de TV à PRT
- This topic has 2 replies, 2 voices, and was last updated 3 hours ago by AdilMed10.
-
-
11/18/2024 at 9:05 PM #240510
Bonjour à toute l’équipe ProRealCode,
Tout d’abord, merci pour votre travail exceptionnel et votre contribution à la communauté ProRealTime.
SVP est il possible de convertir cet indicateur TradingView en ProRealTime : Lien vers l’indicateur TV. De plus, serait-il envisageable d’y ajouter des divergences haussières et baissières (ligne verte et rouge) similaires à celles décrites dans cet indicateur RSI de votre forum : Lien vers l’indicateur PRT.
Cet outil serait précieux pour identifier les renversements. Merci d’avance pour votre aide !
Cordialement,
RSI cyclic smoothed v212345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788//@version=4//// Copyright (C) 2017 CC BY, whentotrade / Lars von Thienen// Source:// Book: Decoding The Hidden Market Rhythm - Part 1: Dynamic Cycles (2017)// Chapter 4: "Fine-tuning technical indicators for more details on the cRSI Indicator//// Usage:// You need to derive the dominant cycle as input parameter for the cycle length as described in chapter 4.//// License:// This work is licensed under a Creative Commons Attribution 4.0 International License.// You are free to share the material in any medium or format and remix, transform, and build upon the material for any purpose,// even commercially. You must give appropriate credit to the authors book and website, provide a link to the license, and indicate// if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.//study(title="RSI cyclic smoothed", shorttitle="cRSI")src = closedomcycle = input(20, minval=10, title="Dominant Cycle Length")crsi = 0.0cyclelen = domcycle / 2vibration = 10leveling = 10.0cyclicmemory = domcycle * 2//set min/max ranges?h1 = hline(30, color=color.silver, linestyle=hline.style_dashed)h2 = hline(70, color=color.silver, linestyle=hline.style_dashed)torque = 2.0 / (vibration + 1)phasingLag = (vibration - 1) / 2.0up = rma(max(change(src), 0), cyclelen)down = rma(-min(change(src), 0), cyclelen)rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - 100 / (1 + up / down)crsi := torque * (2 * rsi - rsi[phasingLag]) + (1 - torque) * nz(crsi[1])lmax = -999999.0lmin = 999999.0for i = 0 to cyclicmemory - 1 by 1if nz(crsi[i], -999999.0) > lmaxlmax := nz(crsi[i])lmaxelseif nz(crsi[i], 999999.0) < lminlmin := nz(crsi[i])lminmstep = (lmax - lmin) / 100aperc = leveling / 100db = 0.0for steps = 0 to 100 by 1testvalue = lmin + mstep * stepsabove = 0below = 0for m = 0 to cyclicmemory - 1 by 1below := below + iff(crsi[m] < testvalue, 1, 0)belowratio = below / cyclicmemoryif ratio >= apercdb := testvaluebreakelsecontinueub = 0.0for steps = 0 to 100 by 1testvalue = lmax - mstep * stepsabove = 0for m = 0 to cyclicmemory - 1 by 1above := above + iff(crsi[m] >= testvalue, 1, 0)aboveratio = above / cyclicmemoryif ratio >= apercub := testvaluebreakelsecontinuelowband = plot(db, "LowBand", color.aqua)highband = plot(ub, "HighBand", color.aqua)fill(h1, h2, color=color.silver, transp=90)fill(lowband, highband, color=color.gray, transp=90)plot(crsi, "CRSI", color.fuchsia)11/19/2024 at 4:19 PM #240537Voici ce que vous avez :
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107//-------------------------------------////PRC_RSI Cyclic Smoothed//version = 0//19.11.2024//Iván González @ www.prorealcode.com//Sharing ProRealTime knowledge//-------------------------------------////Inputs//-------------------------------------//src=closedomcycle=20cyclelen=domcycle/2vibration=10leveling=10cyclicmemory=domcycle*2once crsi=0//-------------------------------------//// CRSI calculation//-------------------------------------//torque=2/(vibration+1)phasinglag=floor((vibration-1)/2)length = cyclelenalpha = 1/lengthsrcUp = max(src-src[1],0)if barindex = length thenup = average[length](srcUp)elseup = alpha*srcUp + (1-alpha)*up[1]endifsrcDw = -min(src-src[1],0)if barindex = length thendw = average[length](srcdw)elsedw = alpha*srcdw + (1-alpha)*dw[1]endifif dw=0 thenmyrsi=100elsif up=0 thenmyrsi=0elsemyrsi=100-100/(1+up/dw)endifif barindex>cyclicmemory thencrsi=torque*(2*myrsi-myrsi[phasinglag])+(1-torque)*crsi[1]endif//-------------------------------------//// LowBand and HighBand calculation//-------------------------------------//Period=cyclicMemorypercent = leveling/100periodMinusone = period-1maxima = -999999.0minima = 999999.0for i=0 to periodMinusone doif crsi[i] > maxima thenmaxima = crsi[i]elsif crsi[i] < minima thenminima = crsi[i]endifnextstepfactor = (maxima-minima)/100lowband = 0for steps=0 to 100 dotestvalue = minima+stepfactor*stepsbelow=0for m=0 to periodMinusone doif crsi[m]<testvalue thenbelow=below+1endifnextif below/period >= percent thenlowband = testvaluebreakendifnexthighband=0for steps=0 to 100 dotestvalue=maxima-stepfactor*stepsabove=0for m=0 to periodMinusone doif crsi[m]>=testvalue thenabove=above+1endifnextif above/Period >= percent thenhighband=testvaluebreakendifnextcolorbetween(highband,lowband,204,204,119,90)//-------------------------------------//// Plot//-------------------------------------//h1=30h2=70//-------------------------------------//return highband as "UpperBand"coloured("aqua"),lowband as "LowerBand"coloured("aqua"),crsi as "CRSI"coloured("fuchsia")style(line,2), h1 as "OB level"style(dottedline), h2 as "OS level"style(dottedline)11/19/2024 at 4:45 PM #240542Super merci bcp , c ‘est génial , Stp , serait-il envisageable d’y ajouter des divergences haussières et baissières (ligne verte et rouge) similaires à celles décrites dans cet indicateur RSI de votre forum : Lien vers l’indicateur PRT. ? merci
-
AuthorPosts
Find exclusive trading pro-tools on