A continuación una solicitud que ha sido enviada a ProRealtime:
Desearia si me pueden pasar este indicador “Fisher m11” con el codigo de programacion de ProRealTime. Este çodigo es de MT4.
Les envio copia del código.
Y una proposición de respuesta:
Fisher indicator
// Change line style to histogram and set colors as needed
// in the indicator settings panel
//
Once period = 10
Once priceSmoothing = 0.3
Once indexSmoothing = 0.3
lowestLow = Lowest[period](Low)
highestHigh = Highest[period](High)
periodRange = highestHigh - lowestLow
midPrice = (High + Low) / 2
priceLocation = 2.0 * ((midPrice - lowestLow) / periodRange) - 1.0
If smoothedLocation[1] then
smoothedLocation = priceSmoothing*smoothedLocation[1] + (1.0 - priceSmoothing)*priceLocation
Else
smoothedLocation = (1.0 - priceSmoothing)*priceLocation
Endif
If smoothedLocation > 0.99 then
smoothedLocation = 0.99
Elsif smoothedLocation < -0.99 then
smoothedLocation = -0.99
Endif
fishIndex = Log((1+smoothedLocation)/(1-smoothedLocation))
If smoothedFish[1] then
smoothedFish = indexSmoothing*smoothedFish[1] + (1.0 - indexSmoothing)*fishIndex
Else
smoothedFish = (1.0 - indexSmoothing)*fishIndex
Endif
Return smoothedFish as "Fisher Index"
Lo veo tarde, pero por si aún puede serte útil.
El código que has puesto no es un MT4, quizás por ello nadie te ha respondido. el código que has puesto es en Prorealtime.
De todas formas, yo le he hecho un pequeño cambio y quedaria así:
// Change line style to histogram and set colors as needed
// in the indicator settings panel
//
Once period = p
Once priceSmoothing = 0.3
Once indexSmoothing = 0.3
cero = 0
lowestLow = Lowest[period](Low)
highestHigh = Highest[period](High)
periodRange = highestHigh - lowestLow
midPrice = (High + Low) / 2
priceLocation = 2.0 * ((midPrice - lowestLow) / periodRange) - 1.0
If smoothedLocation[1] then
smoothedLocation = priceSmoothing*smoothedLocation[1] + (1.0 - priceSmoothing)*priceLocation
Else
smoothedLocation = (1.0 - priceSmoothing)*priceLocation
Endif
If smoothedLocation > 0.99 then
smoothedLocation = 0.99
Elsif smoothedLocation < -0.99 then
smoothedLocation = -0.99
Endif
fishIndex = Log((1+smoothedLocation)/(1-smoothedLocation))
If smoothedFish[1] then
smoothedFish = indexSmoothing*smoothedFish[1] + (1.0 - indexSmoothing)*fishIndex
Else
smoothedFish = (1.0 - indexSmoothing)*fishIndex
Endif
Return smoothedFish as "Fisher Index", cero coloured (0,0,0) as "0"
La variable p = 89 (el period del tuyo que era 10 es demasiado nervioso para mi gusto)
89 es un número de Fibonacci.
Luego con el indicador puesto, le cambias forma, lo pones en histograma y en color verde y rojo para positivo y negativo.
Tambien tienes este con 2 medias o puedes poner en invisible la MA1.
Es más alisado y con menos ruido, más claro a la vista y marca divergencias.
period = P
MA1period=9
MA2period=45
cero = 0
MaxH = highest[period](high)
MinL = lowest[period](low)
price = customclose
if(barindex>MA2period) then
Value = 0.3*2*((price-MinL)/(MaxH-MinL)-0.5) + 0.67*Value[1]
Fish = 0.3*LOG((1+Value)/(1-Value))+0.5*Fish[1]
MA1 = Average[MA1period](Fish)
MA2 = WeightedAverage[MA2period](MA1)
endif
IF fish THEN
SEMAFORO1 = 1
ELSE
SEMAFORO1 = 0
ENDIF
RETURN SEMAFORO1 as "Fish", Fish as "line-Fish", MA1 as "MA fast signal",MA2 as "MA slow signal", CERO COLOURED (0,0,0) as "0"
variable p = 10
LineFish en histograma verde y rojo en positivo y negativo
Muchas gracias corzaroja por señalar esto a nuestra atención.
¡Usted podría incluso fijar estos códigos agradables en la biblioteca para que todos se beneficien! Gracias 🙂
Hola Corsaroja
Tu indicador me parece muy bueno,si podemos tenerlo con las variaciones que van de 0 hasta 100 te agradeceria por el codigo; porque me gustaria mesclarlo
con otro que va de 0 hasta 100 tambien
gracias, un saludo.
// FISHER PRC V1 by Corsaroja
period = P
MA1period=9
MA2period=45
cero = 0
MaxH = highest[period](high)
MinL = lowest[period](low)
price = customclose
if(barindex>MA2period) then
Value = 0.3*2*((price-MinL)/(MaxH-MinL)-0.5) + 0.67*Value[1]
Fish = 0.3*LOG((1+Value)/(1-Value))+0.5*Fish[1]
MA1 = Average[MA1period](Fish)
MA2 = WeightedAverage[MA2period](MA1)
endif
IF fish THEN
SEMAFORO1 = 1
ELSE
SEMAFORO1 = 0
ENDIF
RETURN SEMAFORO1 as "Fish", Fish as "line-Fish", MA1 as "MA fast signal",MA2 as "MA slow signal", CERO COLOURED (0,0,0) as "0"
// Variable :
// p = 10
// Tambien tienes este con 2 medias o puedes poner en invisible la MA1. Es más alisado y con
// menos ruido, más claro a la vista y marca divergencias.
Nicolás, he subido, creo que 3 indicadores nuevos de Fisher, distintos claro, pero es que no los veo.
Si es tan amable de ver donde están.
Muchas gracias.
Pues no lo he hecho nunca Supertiti, no sabría hacerlo.
Sin embargo quizás Nicolás esté encantado de hacerlo y nos beneficiamos todos.
Quizás no pueda dar otra visión hecho de ese modo.
Un saludo
Hola Corzaroja
gracias por contestarme, a ver si Nicolas nos hecha una mano ?!
un saludo
Nicolás, ya lo he visto, muchas gracias.
De todas formas falta uno, que es el que va con colores y es el más interesante (que va con anexo también)
Lo veo en mi perfil, pero no lo veo en la lista de ProBuilder.
Un saludo
El Inverse Fisher transform RSI esta bien, lo utilizo hace años y funciona bastante bien.
Yo le he puesto una media movil para lisar los señales, ma parece mejor asi ?!
un saludo
// INVERSE FISHER TRANSFORM RSI PRC by Corzaroja
ind=RSI[N](close)
x=0.1*(ind-50)
y=(EXP(2*x)-1)/(EXP(2*x)+1)
ynorma=50*(y+1)
MAynorma = endpointaverage [13](ynorma)
RETURN ynorma AS "Fisher Invertido transforma RSI",0 as " 0 " , 20 AS "20",50 as " 50 " , 80 AS "80",100 as " 100 ", MAynorma as " MAIFISH "
// Variable
// N = Núm. de velas para calcular el RSI = 14
Todavía no se ha tenido tiempo para comprobar el otro post, me pongo tan pronto como sea posible! 😉
y Gracias!
Nicolás, han desaparecido los post del Fisher con 2 medias.
Antes tenia 4, con esos 2 pendientes, ahora solo hay 2.
Ha habido algún problema?