CONVERSION INDICADOR TRADINGVIEW:”Estructura del mercado Trailing Stop “
Forums › ProRealTime foro Español › Soporte ProBuilder › CONVERSION INDICADOR TRADINGVIEW:”Estructura del mercado Trailing Stop “
- This topic has 1 reply, 2 voices, and was last updated 1 month ago by Iván.
-
-
09/03/2024 at 1:43 PM #237047
Solicito, si es posible, convertir el indicador adjunto:
El indicador de stop dinámico de estructura de mercado es una herramienta avanzada para identificar cambios en la estructura del mercado, barridos de liquidez y posibles reversiones de tendencia mediante un análisis de volumen integral. Este indicador combina el análisis de los pivotes de la estructura del mercado (CHoCH – Cambio de carácter) con una lógica sofisticada de stop dinámico basada en el volumen. Al evaluar el volumen delta en puntos estructurales clave, permite a los operadores identificar continuaciones o reversiones de tendencia de alta probabilidad y administrar sus operaciones de manera más efectiva.
https://es.tradingview.com/script/DFdFfl7t-Market-Structure-Trailing-Stop-BigBeluga/
A ver si Iván el moderador tiene un hueco libre y lo puede traducir.
Muchas gracias.09/24/2024 at 9:59 AM #237963Buenas!
Aquí tienes el indicador:123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174//------------------------------------////PRC_Market Structure Trailing Stop//version = 0//24.09.24//Iván González @ www.prorealcode.com//Sharing ProRealTime knowledge//------------------------------------////-----Inputs-------------------------////------------------------------------//leftbars=8rightbars=leftbarsuseTS=1trailLen=25 //Trailing stopvolumeThreshold=500useBos=1sweepX=1trendCol=1//------------------------------------//// Pivot Highs and Pivot Lows//------------------------------------//src1 = low//min(open,close)src2 = high//max(open,close)//Pivots Lowif src1 > src1[rightbars] and lowest[rightbars](src1) > src1[rightbars] and src1[rightbars] < lowest[leftbars](src1)[rightbars+1] then$ply[z+1] = src1[rightbars]$plx[z+1] = barindex[rightbars]checkdw=0drawpoint(barindex[rightbars],src1[rightbars],2)coloured("red",80)z = z + 1endif//Pivots Highif src2 < src2[rightbars] and highest[rightbars](src2)<src2[rightbars] and src2[rightbars]>highest[leftbars](src2)[rightbars+1] then$phy[t+1]=src2[rightbars]$phx[t+1]=barindex[rightbars]checkup=0drawpoint(barindex[rightbars],src2[rightbars],2)coloured("blue",80)t=t+1endif//------------------------------------////----------Pivot lines---------------////------------------------------------//if t>0 and z>0 then//---Market Structure Logic for Higher pivotsif high>$phy[t] and low<$phy[t] and checkup=0 thencheckup=1count1=count1+1count2=0n1=$phx[t]if count1=1 thenvolume1=0for i=0 to barindex-n1 doif close[i]>open[i] thenvolume1=volume1+volume[i]elsevolume1=volume1-volume[i]endifnextdrawsegment($phx[t],$phy[t],barindex,$phy[t])coloured("green")drawtext("CHoCh/#volume1#",(barindex+$phx[t])/2,$phy[t]+0.1*tr)endifif count1>1 and useBos thenmyindex=barindex-(barindex-n1)/2volume1=0for i=0 to barindex-n1 doif close[i]>open[i] thenvolume1=volume1+volume[i]elsevolume1=volume1-volume[i]endifnextdrawsegment($phx[t],$phy[t],barindex,$phy[t])coloured("green")if close<open and high>$phy[t] and open<$phy[t] and sweepX thendrawtext("X/#volume1#",(barindex+$phx[t])/2,$phy[t]+0.1*tr)elsedrawtext("BOS/#volume1#",(barindex+$phx[t])/2,$phy[t]+0.1*tr)endifendifendif//---Market Structure Logic for Lower pivotsif high > $ply[z] and low<$ply[z] and checkdw=0 thencheckdw=1count2=count2+1count1=0n2=$plx[z]if count2=1 thenvolume2=0for i=0 to barindex-n2 doif close[i]>open[i] thenvolume2=volume2+volume[i]elsevolume2=volume2-volume[i]endifnextdrawsegment($plx[z],$ply[z],barindex,$ply[z])coloured("red")drawtext("CHoCh/#volume2#",(barindex+$plx[z])/2,$ply[z]-0.1*tr)endifif count2>1 and useBos thenmyindex2=barindex-(barindex-n2)/2volume2=0for i=0 to barindex-n2 doif close[i]>open[i] thenvolume2=volume2+volume[i]elsevolume2=volume2-volume[i]endifnextdrawsegment($plx[z],$ply[z],barindex,$ply[z])coloured("red")if close<open and low<$ply[z] and close>$ply[z] and sweepX thendrawtext("X/#volume2#",(barindex+$plx[z])/2,$ply[z]-0.1*tr)elsedrawtext("BOS/#volume2#",(barindex+$plx[z])/2,$ply[z]-0.1*tr)endifendifendifendif//------------------------------------////-------Trend and Trail Stop---------////------------------------------------//if count1>0 thencountTrend2=0countTrend1=countTrend1+1elsif count2>0 thencountTrend2=countTrend2+1countTrend1=0endifhi=highest[trailLen](high)lo=lowest[trailLen](low)if countTrend1>0 and lo[1]<=lo and lo[2]<=lo[1] and lo[3]<=lo[2] and lo[4]<=lo[3] and lo[5]<=lo[4] and volume1>volumeThreshold and useTs thenband=loup=up+1dw=0red=0green=125elsif countTrend2>0 and hi[1]>=hi and hi[2]>=hi[1] and hi[3]>=hi[2] and hi[4]>=hi[3] and hi[5]>=hi[4] and volume2<-volumeThreshold and useTS thenband=hiup=0dw=dw+1red=255green=0elseband=undefineddw=0up=0endif//------------------------------------////-----------Plot Signals-------------////------------------------------------//if useTs thenif up=1 thendrawtext("▲",barindex,band-0.1*tr)coloured("green")endifif dw=1 thendrawtext("▼",barindex,band+0.1*tr)coloured("red")endifdrawpoint(barindex,band,1)coloured(red,green,0)endif//------------------------------------////-----------Color Candles------------////------------------------------------//if trendCol thenif countTrend1>0 thenr1=0g1=255elsif countTrend2>0 thenr1=255g1=0endifdrawcandle(open,high,low,close)coloured(r1,g1,0)endifreturn1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on