hola.
Aquí tienes el indicador
//----------------------------------------//
//PRC_Fibonacci Retracement
//version = 0
//13.03.25
//Iván González @ www.prorealcode.com
//Sharing ProRealTime knowledge
//----------------------------------------//
// Inputs
//----------------------------------------//
defparam drawonlastbaronly=true
fperiod=200
reverse=1
//----------------------------------------//
// Calculations
//----------------------------------------//
if islastbarupdate then
Fhigh=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 then
revfibs=FL>FH
else
revfibs=FL<FH
endif
if revfibs then
current=(close-Flow)/(Fhigh-Flow)
fib0=(Fhigh-Flow)*0+Flow
fib236=(Fhigh-Flow)*0.236+Flow
fib382=(Fhigh-Flow)*0.382+Flow
fib500=(Fhigh-Flow)*0.500+Flow
fib618=(Fhigh-Flow)*0.618+Flow
fib786=(Fhigh-Flow)*0.786+Flow
fib1000=(Fhigh-Flow)*1+Flow
r=255
g=0
b=0
else
current=(Fhigh-close)/(Fhigh-Flow)
fib0=Fhigh-(Fhigh-Flow)*0
fib236=Fhigh-(Fhigh-Flow)*0.236
fib382=Fhigh-(Fhigh-Flow)*0.382
fib500=Fhigh-(Fhigh-Flow)*0.500
fib618=Fhigh-(Fhigh-Flow)*0.618
fib786=Fhigh-(Fhigh-Flow)*0.786
fib1000=Fhigh-(Fhigh-Flow)*1
r=100
g=255
b=100
endif
//----------------------------------------//
//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
//----------------------------------------//
return