Linear Regression Ch. double

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #62012 quote
    Conte Caimano
    Participant
    Master

    vorrei indicare il punto di partenza (il giorno da cui partire) nell’indicatore “Linear Regression Ch. double”.

    Così com’è adesso inizia con l’ultimo prezzo di chiusura (Close) e va indietro di un numero di barre (Len) che posso modificare. Quello che vorrei fare e cambiare il punto di partenza da l’ultimo (close) a N periodi precedenti (close[N]).

    ho fatto alcune prove senza successo, c’è qualcuno che può darmi una mano ?

    //Parameters :
    //Len = 100
    //NDevSt=1.28
    
    once j=0
    de48=DPO[Len*2](close)
    if de48=de48[1] and de48[1]=de48[2] and de48[2]<>de48[3] then
    flag=1
    endif
    
    n=(Len*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[Len](co)
    test1=linearregressionslope[Len](co)
    a=test1
    b=test-test1*Len
    c=STD[Len](co)
    endif
    
    if flag=0 then
    reg=undefined
    upperchan=undefined
    lowerchan=undefined
    upperchan1=undefined
    lowerchan1=undefined
    else
    j=j+1
    reg=a*j+b
    upperchan = reg + c*NDevSt
    lowerchan = reg - c*NDevSt
    upperchan1 = reg + c*NDevSt*0.625
    lowerchan1 = reg - c*NDevSt*.625
    endif
    
    RETURN reg as "channel center", upperchan as "upper channel", lowerchan as "lower channel", upperchan1 as "lower upper channel", lowerchan1 as "upper lower channel"
    
    
    #62030 quote
    Nicolas
    Keymaster
    Master

    Se capisco correttamente la tua domanda, vuoi impostare un punto di partenza fisso nel passato?

    #62059 quote
    Conte Caimano
    Participant
    Master

    SI, vorrei poter selezionare un punto di partenza nel passato.

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

Linear Regression Ch. double


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Conte Caimano
8 years, 1 month ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 02/08/2018
Status: Active
Attachments: No files
Logo Logo
Loading...