Conversione dell'indicatore FISHER 9 da Tradingview – PINE

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #134759 quote
    Edisone
    Participant
    Average

    Salve, chiedo aiuto se possibile per la conversione dell’indicatore Fisher 9 scritto con Editor Pine, riporto il codice:

    ////////////////////////////////////////////////////////////
    // Market prices do not have a Gaussian probability density function
    // as many traders think. Their probability curve is not bell-shaped.
    // But trader can create a nearly Gaussian PDF for prices by normalizing
    // them or creating a normalized indicator such as the relative strength
    // index and applying the Fisher transform. Such a transformed output
    // creates the peak swings as relatively rare events.
    // Fisher transform formula is: y = 0.5 * ln ((1+x)/(1-x))
    // The sharp turning points of these peak swings clearly and unambiguously
    // identify price reversals in a timely manner.
    ////////////////////////////////////////////////////////////
    study(title=”Fisher Transform Indicator by Ehlers”, shorttitle=”Fisher Transform Indicator by Ehlers”)
    Length = input(9, minval=1)
    xHL2 = hl2
    xMaxH = highest(xHL2, Length)
    xMinL = lowest(xHL2,Length)
    nValue1 = 0.33 * 2 * ((xHL2 – xMinL) / (xMaxH – xMinL) – 0.5) + 0.67 * nz(nValue1[1])
    nValue2 = iff(nValue1 > .99, .999,
    iff(nValue1 < -.99, -.999, nValue1)) nFish = 0.5 * log((1 + nValue2) / (1 – nValue2)) + 0.5 * nz(nFish[1]) plot(nFish, color=green, title=”Fisher”) plot(nz(nFish[1]), color=red, title=”Trigger”)

    Fisher-Tradingview.txt
    #134972 quote
    Nicolas
    Keymaster
    Master
    #135052 quote
    Edisone
    Participant
    Average
    Len = Periodo // variabile=9
    IF BARINDEX < len THEN
    value1 = 0
    fish = 0
    ELSE
    MaxH = Highest[len](MEDIANPRICE)
    MinL = Lowest[len](MEDIANPRICE)
    Value1 = 0.33*2*((MEDIANPRICE - MinL)/(MaxH - MinL) - .5) + .67 * Value1
    
    If Value1 > .99 then
    Value1 = .999
    ENDIF
    If Value1 < -.99 then
    Value1 = -.999
    ENDIF
    
    Fish = 0.5*Log((1 + Value1)/(1 - Value1)) + .5 * Fish
    Trigger=fish[1]
    
    a=4 //disegna linea up
    c=0 //disegna linea centrale
    b=-4 //disegna linea down
    ENDIF
    RETURN Fish COLOURED(0,255,0) AS "Fisher",Trigger COLOURED(255,0,0) AS "Trigger",a COLOURED(128,128,128) AS "UP",c COLOURED(128,128,128) AS "Center",b COLOURED(128,128,128) AS "Down"
    Fisher-Transform-9.itf
    #135095 quote
    robertogozzi
    Moderator
    Master

    Per favore usa sempre il pulsante “Insert PRT code” quando inserisci il codice nei tuoi post per facilitare la lettura degli altri. Grazie 🙂

    Scusami, perché hai postato questo codice che già esiste nella libreria?

    #135140 quote
    Edisone
    Participant
    Average

    Ciao,

    “Per favore usa sempre il pulsante “Insert PRT code” quando inserisci il codice nei tuoi post per facilitare la lettura degli altri. Grazie”

    Ok grazie e scusami.

    “perché hai postato questo codice che già esiste nella libreria?”

    Il codice presente nella libreria aveva un errore nella formula, l’ho corretto e ho inserito dei dettagli grafici per meglio intepretare il segnale. La rappresentazione ed i valori sono uguali a quelli di Tradingview.

    robertogozzi thanked this post
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Conversione dell'indicatore FISHER 9 da Tradingview – PINE


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
Edisone @edisone Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by Edisone
5 years, 9 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 06/05/2020
Status: Active
Attachments: 2 files
Logo Logo
Loading...