Traduzione codice TW Liquidity swings
Forums › ProRealTime forum Italiano › Supporto ProBuilder › Traduzione codice TW Liquidity swings
Viewing 3 posts - 1 through 3 (of 3 total)
-
-
09/02/2025 at 8:25 AM #250260
Buongiorno,
chiedo cortese traduzione codice in oggetto che vorrei provare.
Grazie per il consueto aiuto.
https://it.tradingview.com/script/1S2VOnJP-Liquidity-Swings-LuxAlgo/
09/05/2025 at 9:11 AM #250374ecco:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125//-----------------------------------------////PRC_Liquidity Swings//version = 0//05.09.2025//Iván González @ www.prorealcode.com//Sharing ProRealTime knowledge//-----------------------------------------//defparam drawonlastbaronly=true//-----------------------------------------//// --- Parámetros de Configuración ---//-----------------------------------------//length = 14 // Pivot LookbackareaType = 1 // Swing Area: 1 = Wick Extremity, 2 = Full RangefilterValue = 2 // Mostrar solo zonas con un conteo/volumen mayor a este valor// --- Estilos ---showTop = 1topAreaAlpha = 30 //0 - 255showBtm = 1btmAreaAlpha = 30 //0 - 255//-----------------------------------------//// --- Inicialización de Arrays ---//-----------------------------------------//ONCE phCount = 0ONCE plCount = 0//-----------------------------------------//// --- FASE 1: Creacion de Arrays//-----------------------------------------//isPivotHigh = (high[length] = HIGHEST[2*length+1](high))isPivotLow = (low[length] = LOWEST[2*length+1](low))// Almacenar nuevo Pivote AltoIF isPivotHigh THEN$phTop[phCount] = high[length]IF areaType = 1 THEN$phBtm[phCount] = MAX(close[length], open[length])ELSE$phBtm[phCount] = low[length]ENDIF$phLeft[phCount] = barindex[length]$phRight[phCount] = barindex[length-1]$phCrossed[phCount] = 0$phTouchCount[phCount] = 0$phTouchVolume[phCount] = 0phCount = phCount + 1ENDIF// Almacenar nuevo Pivote BajoIF isPivotLow THEN$plBtm[plCount] = low[length]IF areaType = 1 THEN$plTop[plCount] = MIN(close[length], open[length])ELSE$plTop[plCount] = high[length]ENDIF$plLeft[plCount] = barindex[length]$plRight[plCount] = barindex[length-1]$plCrossed[plCount] = 0$plTouchCount[plCount] = 0$plTouchVolume[plCount] = 0plCount = plCount + 1ENDIF//-----------------------------------------//// --- FASE 2: Dibujo//-----------------------------------------//IF islastbarupdate THEN// Procesar Zonas de Resistenciaif showTop thenFOR i = 0 TO phCount-1 DOdist=barindex-$phLeft[i]// Localizar el punto de rupturafor j=dist downto 1 doif $phCrossed[i] = 0 and close[j] > $phTop[i] then$phCrossed[i] = 1$phRight[i] = barindex[j]breakelsif $phCrossed[i] = 0 and high[j] > $phBtm[i] and low[j]<$phTop[i] then$phTouchCount[i] = $phTouchCount[i]+1$phTouchVolume[i] = $phTouchVolume[i]+volume[j]endifnext//Dibujar el nivel de liquidezvol=$phTouchVolume[i]if $phCrossed[i]=1 and $phTouchCount[i]>filterValue thendrawsegment($phLeft[i],$phTop[i],$phRight[i],$phTop[i])style(dottedline)coloured("red")drawrectangle($phLeft[i],$phTop[i],$phRight[i],$phBtm[i])coloured("red",0)fillcolor("red",topAreaAlpha)drawtext("#vol#",$phLeft[i],$phTop[i]+range[1])coloured("darkred")elsif $phCrossed[i]=0 and $phTouchCount[i]>filterValue thendrawsegment($phLeft[i],$phTop[i],barindex,$phTop[i])style(line)coloured("red")drawrectangle($phLeft[i],$phTop[i],barindex,$phBtm[i])coloured("red",0)fillcolor("red",topAreaAlpha)drawtext("#vol#",$phLeft[i],$phTop[i]+range[1])coloured("darkred")endifNEXTendif//-----------------------------------------//// Procesar Zonas de Soporteif showBtm thenFOR i = 0 TO plCount - 1 DOdist2=barindex-$plLeft[i]// Localizar el punto de rupturafor j=dist2 downto 1 doif $plCrossed[i] = 0 and close[j] < $plBtm[i] then$plCrossed[i] = 1$plRight[i] = barindex[j]breakelsif $plCrossed[i] = 0 and low[j]<$plTop[i] and high[j]>$plBtm[i] then$plTouchCount[i] = $plTouchCount[i]+1$plTouchVolume[i] = $plTouchVolume[i]+volume[j]endifnext//Dibujar el nivel de liquidezvol2=$plTouchVolume[i]if $plCrossed[i]=1 and $plTouchCount[i]>filterValue thendrawsegment($plLeft[i],$plBtm[i],$plRight[i],$plBtm[i])style(dottedline)coloured("green")drawrectangle($plLeft[i],$plBtm[i],$plRight[i],$plTop[i])coloured("green",0)fillcolor("green",btmAreaAlpha)drawtext("#vol2#",$plLeft[i],$plTop[i]-range[1])coloured("darkgreen")elsif $plTouchCount[i]>filterValue thendrawsegment($plLeft[i],$plBtm[i],barindex,$plBtm[i])style(line)coloured("green")drawrectangle($plLeft[i],$plBtm[i],barindex,$plTop[i])coloured("green",0)fillcolor("green",btmAreaAlpha)drawtext("#vol2#",$plLeft[i],$plTop[i]-range[1])coloured("darkgreen")endifNEXTendifENDIF//-----------------------------------------//RETURN1 user thanked author for this post.
09/05/2025 at 9:45 AM #250377 -
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
Find exclusive trading pro-tools on
Similar topics: