Conversión Pivot Points
Forums › ProRealTime foro Español › Soporte ProBuilder › Conversión Pivot Points
- This topic has 2 replies, 2 voices, and was last updated 2 months ago by Maricarmen.
Viewing 3 posts - 1 through 3 (of 3 total)
-
-
10/09/2024 at 10:25 AM #238760
Buenas:
Se podría hacer la conversión de este indicador:
https://es.tradingview.com/script/OxJJqZiN-Pivot-Points-High-Low-Missed-Reversal-Levels-LuxAlgo
Gracias
10/09/2024 at 5:22 PM #238787Buenas!
Aquí tienes el código traducido:123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190//---------------------------------------------------////Pivot Points High Low and Missed Reversal Levels//version = 0//09.10.2024//Iván González @ www.prorealcode.com//Sharing ProRealTime knowledge//---------------------------------------------------//// INPUTS ////---------------------------------------------------//prd = 50showMiss=1showReg=1//---------------------------------------------------//// PIVOTS LOW ////---------------------------------------------------//src1 = lowif src1 > src1[prd] and lowest[prd](src1) > src1[prd] and src1[prd] < lowest[prd](src1)[prd+1] then$ply[z+1] = src1[prd]$plx[z+1] = barindex[prd]z = z + 1endif//---------------------------------------------------//// PIVOTS HIGH ////---------------------------------------------------//src2 = highif src2 < src2[prd] and highest[prd](src2)<src2[prd] and src2[prd]>highest[prd](src2)[prd+1] then$phy[t+1]=src2[prd]$phx[t+1]=barindex[prd]t=t+1endif//---------------------------------------------------////---------------------------------------------------//once ghostlevel=undefinedonce os=0once px1=0once py1=0once maxX1=0once minX1=0n=barindexmimax=max(high[prd],mimax)mimin=min(low[prd],mimin)followmax=max(high[prd],followmax)followmin=min(low[prd],followmin)if mimax > mimax[1] thenmaxX1=n-prdfollowmin=low[prd]endifif mimin < mimin[1] thenminX1=n-prdfollowmax=high[prd]endifif followmin<followmin[1] thenfollowminX1=n-prdendifif followmax>followmax[1] thenfollowmaxX1=n-prdendif//---------------------------------------------------////---------------------------------------------------//if t<>t[1] thenif showMiss thenif os[1]=1 thendrawtext("✖",minX1,mimin)coloured("green")drawsegment(px1,py1,minX1,mimin)style(dottedline)coloured("red")px1=minX1py1=mimin//GhostLeveldrawsegment(px1,py1,n-prd,py1)style(line,2)coloured("green")elsif $phy[t]<mimax thendrawtext("✖",maxX1,mimax)coloured("red")drawtext("✖",followminX1,followmin)coloured("green")drawsegment(px1,py1,maxX1,mimax)style(dottedline)coloured("green")px1=maxX1py1=mimax//GhostLeveldrawsegment(px1,py1,max(n-prd,px1+prd),py1)style(line,2)coloured("red")drawsegment(px1,py1,followminX1,followmin)style(dottedline)coloured("red")px1=followminX1py1=followmin//GhostLeveldrawsegment(px1,py1,max(n-prd,px1+prd),py1)style(line,2)coloured("green")endifendifif showReg thendrawtext("▼",$phx[t],$phy[t])coloured("red")if $phy[t]<mimax or os[1]=1 thendrawsegment(px1,py1,n-prd,$phy[t])style(dottedline)coloured("green")elsedrawsegment(px1,py1,n-prd,$phy[t])style(line)coloured("green")endifendifpy1=$phy[t]px1=n-prdos=1mimax=$phy[t]mimin=$phy[t]endif//---------------------------------------------------////---------------------------------------------------//if z<>z[1] thenif showMiss thenif os[1]=0 thendrawtext("✖",maxX1,mimax)coloured("red")drawsegment(px1,py1,maxX1,mimax)style(dottedline)coloured("green")px1=maxX1py1=mimax//GhostLeveldrawsegment(px1,py1,max(n-prd,px1+prd),py1)style(line,2)coloured("red")elsif $ply[z]>mimin thendrawtext("✖",followmaxX1,followmax)coloured("red")drawtext("✖",minX1,mimin)coloured("green")drawsegment(px1,py1,minX1,mimin)style(dottedline)coloured("red")px1=minX1py1=mimin//GhostLeveldrawsegment(px1,py1,max(n-prd,px1+prd),py1)style(line,2)coloured("green")drawsegment(px1,py1,followmaxX1,followmax)style(dottedline)coloured("green")px1=followmaxX1py1=followmax//GhostLeveldrawsegment(px1,py1,max(n-prd,px1+prd),py1)style(line,2)coloured("red")endifendifif showReg thendrawtext("▲",$plx[z],$ply[z])coloured("green")if $ply[z]>mimin or os[1]=0 thendrawsegment(px1,py1,n-prd,$ply[z])style(dottedline)coloured("red")elsedrawsegment(px1,py1,n-prd,$ply[z])style(line)coloured("red")endifendifpy1=$ply[z]px1=n-prdos=0mimax=$ply[z]mimin=$ply[z]endif//---------------------------------------------------////---------------------------------------------------//if islastbarupdate thenx=0y=0$prices[0]=0$pricesx[0]=0for i=0 to n-px1-1 doif os=1 then$prices[i]=low[i]$pricesx[i]=n-ielse$prices[i]=high[i]$pricesx[i]=n-iendifnextif os=1 theny=ArrayMin($prices)for j=0 to n-px1-1 doif low[j]=y thenx=n[j]breakendifnextif showmiss thendrawtext("✖",x,y)coloured("green")drawsegment(px1,py1,x,y)style(dottedline)coloured("red")endifdrawsegment(x,y,n,y)style(line,2)coloured("red")elsey=arraymax($prices)for j=0 to n-px1-1 doif high[j]=y thenx=n[j]breakendifnextif showmiss thendrawtext("✖",x,y)coloured("red")drawsegment(px1,py1,x,y)style(dottedline)coloured("green")endifdrawsegment(x,y,n,y)style(line,2)coloured("green")endifendif//---------------------------------------------------//return10/10/2024 at 11:22 AM #238810Buenas Ivan;
Muchísimas Gracias de nuevo, muy buen trabajo.
Se nota en el foro que hay una dinámica distinta desde tu incorporación.
-
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
Find exclusive trading pro-tools on
Similar topics: