Regressione lineare indicatore

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #5249 quote
    volpiemanuele
    Participant
    Veteran

    Mi servirebbe un indicatore che calcoli la regressione lineare senza l’uso della funzione proprietaria di PRT. Mi potete aiutare? Grazie

    #5276 quote
    Nicolas
    Keymaster
    Master

    Ciao, qui è il codice di un diritto di regressione Lineair. Questo non è me, ma molto buon blogHK-LISSE”. Spero che soddisfa le vostre aspettative.

     

    ///////////// regression automatique v.02 /////////
    once j=0
    de48=DPO[k*2](close)
    if de48=de48[1] and de48[1]=de48[2] and de48[2]<>de48[3] then
     flag=1
    endif
    
    n=(k*2)-4
    p=(n/2)-1
    d100=DPO[n](close)
    moy100=close-d100
    co=(moy100-moy100[1]+(close[p])/n)*n
    if flag=1 and flag[1]=0 then
     test=linearregression[k](co)
     test1=linearregressionslope[k](co)
     a=test1
     b=test-test1*k
    endif
    
    if flag=0 then
     reg=undefined
    else
     j=j+1
     reg=a*j+b
    endif
    
    return reg
    
    #5302 quote
    volpiemanuele
    Participant
    Veteran

    Thanks, i will try to use it and I replay to you my opinion. Bye

    #5303 quote
    volpiemanuele
    Participant
    Veteran

    Hi, It don’t run because I have an error for the variable K that it’s not defined. Please, can you solve the problem ? Thanks

    #5304 quote
    gianpiero
    Participant
    Average

    devi darlo tu il valore alla variabile k.

    prova a sostituire k con un numero. ti consiglio di usare un periodo abbastanza lungo.

    fammi sapere se risolvi.

    Gianpiero

    #5315 quote
    volpiemanuele
    Participant
    Veteran

    Ho definito la variabile K e adesso funziona. Che periodo mi consiglieresti e che TF ad esempio su EURUSD mini CFD .o Italy 40 future (CFD) mini. Grazie

    #5321 quote
    Nicolas
    Keymaster
    Master
    #5337 quote
    gianpiero
    Participant
    Average

    devi scegliere il periodo in modo da identificare bene il trend, quindi dipende dai mercati. ad esempio sul daily ita 40, io mettere un valore di 250, che dovrebbe rappresentare bene il trend semestrale ribassista in atto.

    #5338 quote
    gianpiero
    Participant
    Average

    thanks a lot….;)

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

Regressione lineare indicatore


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
Summary

This topic contains 8 replies,
has 3 voices, and was last updated by gianpiero
9 years, 9 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 04/11/2016
Status: Active
Attachments: No files
Logo Logo
Loading...