Retroceso Simple Fibonacci
Forums › ProRealTime foro Español › Soporte ProBuilder › Retroceso Simple Fibonacci
-
-
03/13/2025 at 12:01 AM #244893
Buenas:
Se podría traducir este indicador a esta plataforma, es bastante simple pero ofrece las dos lecturas Fibonacci según el ultimo segmento Ascendente/descendente en un mismo gráfico., es:
https://www.tradingview.com/script/mWmIRNVF-Simple-Fibonacci-Retracement/
Gracias,
03/13/2025 at 11:12 AM #244905hola.
Aquí tienes el indicador
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778//----------------------------------------////PRC_Fibonacci Retracement//version = 0//13.03.25//Iván González @ www.prorealcode.com//Sharing ProRealTime knowledge//----------------------------------------//// Inputs//----------------------------------------//defparam drawonlastbaronly=truefperiod=200reverse=1//----------------------------------------//// Calculations//----------------------------------------//if islastbarupdate thenFhigh=highest[fperiod](high)Flow=lowest[fperiod](low)FH=max(highestBars[fperiod](high),1)FL=max(lowestBars[fperiod](low),1)bb=min(barindex[FH],barindex[FL])if reverse=0 thenrevfibs=FL>FHelserevfibs=FL<FHendifif revfibs thencurrent=(close-Flow)/(Fhigh-Flow)fib0=(Fhigh-Flow)*0+Flowfib236=(Fhigh-Flow)*0.236+Flowfib382=(Fhigh-Flow)*0.382+Flowfib500=(Fhigh-Flow)*0.500+Flowfib618=(Fhigh-Flow)*0.618+Flowfib786=(Fhigh-Flow)*0.786+Flowfib1000=(Fhigh-Flow)*1+Flowr=255g=0b=0elsecurrent=(Fhigh-close)/(Fhigh-Flow)fib0=Fhigh-(Fhigh-Flow)*0fib236=Fhigh-(Fhigh-Flow)*0.236fib382=Fhigh-(Fhigh-Flow)*0.382fib500=Fhigh-(Fhigh-Flow)*0.500fib618=Fhigh-(Fhigh-Flow)*0.618fib786=Fhigh-(Fhigh-Flow)*0.786fib1000=Fhigh-(Fhigh-Flow)*1r=100g=255b=100endif//----------------------------------------////Draw Fibonacci Levels//----------------------------------------//drawsegment(bb,fib0,barindex+10,fib0)style(dottedline)drawsegment(bb,fib236,barindex+10,fib236)style(dottedline)coloured(r,g,b)drawsegment(bb,fib382,barindex+10,fib382)style(dottedline)coloured(r,g,b)drawsegment(bb,fib500,barindex+10,fib500)style(dottedline)coloured(r,g,b)drawsegment(bb,fib618,barindex+10,fib618)style(dottedline)coloured(r,g,b)drawsegment(bb,fib786,barindex+10,fib786)style(dottedline)coloured(r,g,b)drawsegment(bb,fib1000,barindex+10,fib1000)style(dottedline)//----------------------------------------////Drawtext Fibonacci Levels//----------------------------------------//drawtext("0 : (#fib0#)",barindex+20,fib0)drawtext("23.6% : (#fib236#)",barindex+20,fib236)drawtext("38.2% : (#fib382#)",barindex+20,fib382)drawtext("50.0% : (#fib500#)",barindex+20,fib500)drawtext("61.8% : (#fib618#)",barindex+20,fib618)drawtext("78.6% : (#fib786#)",barindex+20,fib786)drawtext("100 % : (#fib1000#)",barindex+20,fib1000)endif//----------------------------------------//return1 user thanked author for this post.
03/13/2025 at 11:03 PM #244918Ivan:
En minutajes altos no coge el ultimo segmento de ahí que traza avances Fibonacci, sin embargo, al ir bajando en minutos si coge el ultimo segmento y coge ya el retroceso Fibonacci
correcto. No permite la configuración del indicador para invertir djchos niveles como te comentaba.
No obstante si los cambia en configuración si cambio el eje y leo el precio al revés (O sea de arriba hacia abajo).
En todo lo demás funciona correctamente. Gracias,
1 user thanked author for this post.
03/14/2025 at 9:38 AM #244923Hola. No entiendo muy bien lo de minutajes altos. he chequeado en varios timeframes y con varios activos y funciona correcto.
Al final lo que hace, independientemente del timeframe es chequear 200 barras, nada más…
por otro lado, respecto a cambiar el eje, lo he programado para que así sea. Sólo tienes que cambiar la linea 12 reverse=1 por reverse=0.Y mejor aún, si creas las variables de fperiod (como entero) y reverse (como boleano) lo podrás coonfigurar directamente desde el cuadro de configuración.
-
AuthorPosts
Find exclusive trading pro-tools on