Canal de regression lineaire

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #5388 quote
    supertitisupertiti
    Participant
    Master
    Bonsoir à tous, J’ai repris le code du canal de régression linéaire que nous propose Nicolas en y ajout des doubles supports / résistances . J’ai un bug avec la version 10.3 et pas avec la 10.2 !? Avec la 10.3 l’écart à la moyenne n’est pas proportionnel , j’ai voulu mettre un graphe mais le système me jette!!  ( You don’t have permission to attach files to this post.) je joins le code, si quelqu’un à une idée du pourquoi ?
    // Canal Regression Linéaire  PRC
    
    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
    endif
    if flag=0 then
    reg=undefined
    upperchan=undefined
    lowerchan=undefined
    else
    j=j+1
    reg=a*j+b
    upperchan = reg + reg*percent
    lowerchan = reg - reg*percent
    endif
    ////////////////////////////////////////////
    if flag=0 then
    reg=undefined
    upperchan1=undefined
    lowerchan1=undefined
    else
    j=j+1
    reg=a*j+b
    upperchan1 = reg + reg*percent1
    lowerchan1 = reg - reg*percent1
    endif
    
    cc = customclose
    
    RETURN cc as " customclose " , reg as "channel center", upperchan as "upper channel", lowerchan as "lower channel", upperchan1 as "upper channel 1", lowerchan1 as "lower channel 1"
    //Parameters :
    // Len = 24
    // percent = 0.014
    // percent1 = 0.014
    
    #5390 quote
    NicolasNicolas
    Keymaster
    Legend
    Et en faisant ça? :
    // Canal Regression Linéaire  PRC
    
    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
    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 + reg*percent
    lowerchan = reg - reg*percent
    upperchan1 = reg + reg*percent1
    lowerchan1 = reg - reg*percent1
    endif
    
    
    cc = customclose
    
    RETURN cc as " customclose " , reg as "channel center", upperchan as "upper channel", lowerchan as "lower channel", upperchan1 as "upper channel 1", lowerchan1 as "lower channel 1"
    //Parameters :
    // Len = 24
    // percent = 0.014
    // percent1 = 0.014
    #5396 quote
    supertitisupertiti
    Participant
    Master
    C’est beaucoup mieux comme ça ! merci beaucoup
    #55849 quote
    HANTZHANTZ
    Participant
    New

    Bonsoir,

    Quelqu’un a-t-il déjà développé un code similaire: canal de régression polynomial d’ordre 2? Associé à celui sur la régression linéaire, il doit permettre de prédire les retournements!

     

    Merci d’avance.

     

    Cdlt,

     

    Renaud 

    #177845 quote
    BROURIBROURI
    Participant
    New
    Bonjour Quand je tente d’installer le canal de régression tel défini plus haut sur IG PRT, la machine me demande de définir les variables LEN , percent et pERCENT 1 Merci pour votre aide
    #177850 quote
    robeen12robeen12
    Participant
    Veteran
    Bonjour, Les paramètres sont indiqués en bas du code, il te suffit d’enlever les 2 // pour que ces paramètres soient effectifs
    #177858 quote
    BROURIBROURI
    Participant
    New
    Super, merci pour cette aide rapide !
    #177869 quote
    BROURIBROURI
    Participant
    New
    Re, Malgré la suppression des //, cela ne fonctionne toujours pas. Merci
    #177872 quote
    JC_BywanJC_Bywan
    Moderator
    Master
    Désolé si déjà fait et que le problème est ailleurs, mais au cas où un rappel sur l’usage des paramètres: si les 3 paramètres sont décommentés ( les // enlevés) ils ne doivent pas rester après la ligne “return” qui est obligatoirement la dernière ligne de code, ils doivent être déplacés au tout début du code.
    #177893 quote
    BROURIBROURI
    Participant
    New
    Bonjour Merci pour votre info, cela fonctionne en mettant les paramètres en début de code et en enlevant les trois //, mais le canal s’installe n’importe où dans le graphe des prix ??? Que faire ? Merci et bonne journée
    #177894 quote
    BROURIBROURI
    Participant
    New
    Voir capture d’écran joint.
    blob.jpg blob.jpg
Viewing 11 posts - 1 through 11 (of 11 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

Canal de regression lineaire


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
supertiti @supertiti Participant
Summary

This topic contains 10 replies,
has 3 voices, and was last updated by BROURIBROURI
5 years ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 04/14/2016
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...