Formaciones en Expansión
Forums › ProRealTime foro Español › Soporte ProBuilder › Formaciones en Expansión
- This topic has 3 replies, 2 voices, and was last updated 1 week ago by
Maricarmen.
-
-
01/30/2025 at 12:06 PM #243220
Iván
He visto este indicador de [QuantVue] recientemente y creo que estas formaciones en expansión que ofrece pueden ser interesantes en el Trading. Se podría hacer la conversión del mismo,
https://www.tradingview.com/script/PghpY09l-Broadening-Formations-QuantVue/
Gracias,
02/11/2025 at 11:39 AM #243722Buenas, aquí tienes:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117//--------------------------------------------------////PRC_Broadening Formations Lines//version = 0//11.02.2025//Iván González @ www.prorealcode.com//Sharing ProRealTime knowledge//--------------------------------------------------//// Inputs//--------------------------------------------------//period=9 // Pivot Lengthpivottype=1 // 1 means wicks // 0 means BodyMaxDist=40 // Max distance from line (%)showpivots=0 //Show Pivot points//--------------------------------------------------//// Pivots High and Low//--------------------------------------------------//leftbars=periodrightbars=period//max(1,floor(period/2))if pivottype thensrc1 = lowsrc2 = highelsesrc1 = min(open,close)src2 = max(open,close)endif//---Pivots Lowif src1 > src1[rightbars] and lowest[rightbars](src1) > src1[rightbars] and src1[rightbars] < lowest[leftbars](src1)[rightbars+1] thenif $Type[z]=-1 and src1[rightbars]<$Py[z] then$Py[z]=src1[rightbars]$Px[z]=barindex[rightbars]else$Py[z+1]=src1[rightbars]$Px[z+1]=barindex[rightbars]$Type[z+1]=-1z=z+1endif//y=(x-x1)*slope+y1if $Py[z]<$Py[max(0,z-2)] then$slope[z]=($Py[z]-$Py[max(0,z-2)])/($Px[z]-$Px[max(0,z-2)])endifendif//---Pivots Highif src2 < src2[rightbars] and highest[rightbars](src2)<src2[rightbars] and src2[rightbars]>highest[leftbars](src2)[rightbars+1] thenif $Type[z]=1 and src2[rightbars]>$Py[z] then$Py[z]=src2[rightbars]$Px[z]=barindex[rightbars]else$Py[z+1]=src2[rightbars]$Px[z+1]=barindex[rightbars]$Type[z+1]=1z=z+1endif//y=(x-x1)*slope+y1if $Py[z]>$Py[max(0,z-2)] then$slope[z]=($Py[z]-$Py[max(0,z-2)])/($Px[z]-$Px[max(0,z-2)])endifendifif islastbarupdate and showpivots thenfor i=z downto 3 dodrawpoint($Px[i],$Py[i],4)coloured("blue",50)nextendif//--------------------------------------------------//// Draw trendlines//--------------------------------------------------////Up Trendlineif islastbarupdate thencrossedline=0for i=z downto 4 doif $Type[i-1]=1 and $Type[i-3]=1 thenif $Py[i-1]>$Py[i-3] thenx1=$Px[i-3]y1=$Py[i-3]for j=$Px[i-1]+1 to barindex dox2=jy2=y1+(x2-x1)*$slope[i-1]if close[barindex-j]>y2 thendrawsegment(x1,y1,x2,y2)coloured("orange")style(dottedline2,2)crossedline=1breakendifnextif crossedline=0 and (y2/close-1)*100<MaxDist thendrawsegment(x1,y1,x2,y2)coloured("red")style(line,2)endifendifendifnextendif//Down Trendlineif islastbarupdate thencrossedline=0for i=z downto 4 doif $Type[i-1]=-1 and $Type[i-3]=-1 thenif $Py[i-1]<$Py[i-3] thenx1=$Px[i-3]y1=$Py[i-3]for j=$Px[i-1]+1 to barindex dox2=jy2=y1+(x2-x1)*$slope[i-1]if close[barindex-j]<y2 thendrawsegment(x1,y1,x2,y2)coloured("orange")style(dottedline2,2)crossedline=1breakendifnextif crossedline=0 and (close/y2-1)*100<MaxDist thendrawsegment(x1,y1,x2,y2)coloured("green")style(line,2)endifendifendifnextendifreturn02/12/2025 at 10:57 PM #243757Hola
Es una maravilla todo lo que realizas. y tengo que felicitarte continuamente, no obstante observo en algunos gráficos un exceso de señales, creo que si pongo la ultima señal solamente
para no cargar demasiado el gráfico tanto en la parte superior como en la inferior ganaría el gráfico. Cuidado es una apreciación por mi parte.
02/13/2025 at 6:13 PM #243796Hola
No hago mas que darte trabajo, se podría realizar un Screener de este indicador, indicando 1 ó 2 en suelos/techos.
Gracias,
-
AuthorPosts