Conversione funzione matematica Cube Root

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #106501 quote
    coscarcoscar
    Participant
    Senior

    Salve

    avrei bisogno di un aiuto, devo codificare un indicatore che utilizza la seguente formula:

    Cube root
    x, cubert
    y=x^(1/3)

     

    dove x = Close[1]

    Potreste aiutarmi a convertrla?

    grazie in anticipo.

    Buon lavoro-

    #106502 quote
    NicolasNicolas
    Keymaster
    Legend

    Il calcolo EXP non è disponibile come istruzione nella lingua. Ma potremmo usare questo tipo di formula invece:

    y = x^p = e^(p*LN(x))

    Questo potrebbe quindi essere codificato come:

     y = EXP (p * LOG (x)) 

    Funziona benissimo.

    coscar thanked this post
    #106509 quote
    coscarcoscar
    Participant
    Senior

    Grazie Nicolas

    potresti verificare se è giusto?

    Input1 = Close[1]
    Input2 = Open
    Input3 = Average [5](close)
    Input4 = Average [10] (close)
    Input5 = Average [20] (close)
    
    CloseCubert = EXP (1/3 * LOG (Input1))
    OpenCubert  = EXP (1/3 * LOG (Input2))
    Media5Cubert = EXP (1/3 * LOG (Input3))
    Media10Cubert = EXP (1/3 * LOG (Input4))
    Media20Cubert = EXP (1/3 * LOG (Input5))
    return CloseCubert,OpenCubert,Media5Cubert,Media10Cubert,Media20Cubert
    #106510 quote
    coscarcoscar
    Participant
    Senior

    Scusatemi ma non riesco a valorizzare il paramentro Y1 , potreste aiutarmi nella codifica?

    grazie

    Close-1 = X^(1/3) di Close[1]
    Media5g = X^(1/3) di Average [5](close) 
    Media10g = X^(1/3) di Average [10](close)
    Media20g = X^(1/3) di Average [20](close)
    Media50g = X^(1/3) di Average [50](close)
    
    N127 = -1.13611 - media20g*0.284623 + media20g*N244*0.348839 - media20g^2*0.083844 + N244*3.25716 - N244^2*1.11986
    N244 = 1.0421 - Media5g*(Close-1)*0.340898 + Media5g^2*0.338756 - (Close-1)*0.808886 + (Close-1)^2*0.785873
    N126 = -0.772251 - N239*N260*46.7862 + N239^2*23.6232 + N260*2.34161 + N260^2*22.581
    N260 = 1.04843 + Media5g*Media10g*1.20493 + Media5g^2*0.00866418 - Media10g*0.81701 - Media10g^2*0.427549
    N239 = 1.04261 - Media50g*0.0912637 + Media50g*(Close-1)*0.0915926 - (Close-1)*0.700646 + (Close-1)^2*0.677317
    
    Y1 = -0.121345 + N126*1.20688 - N126*N127*260.841 + N126^2*130.314 + N127^2*130.439
    #106550 quote
    NicolasNicolas
    Keymaster
    Legend

    Scusa ma non capisco di cosa hai bisogno? Potresti eventualmente pubblicare l’intero codice che desideri creare, in questo caso potrei avere un quadro perfetto di ciò che deve essere fatto ..

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Conversione funzione matematica Cube Root


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
coscar @coscar Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by NicolasNicolas
7 years ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 09/04/2019
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...