OSCILLATEUR AFL WINNER/BAR CHART

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #69352 quote
    Alai-n
    Participant
    Veteran

    Bonjour,

    J’ai modifié le Code(1) “Oscillateur AFL Winner” ci-dessous, afin de pouvoir l’appliquer directement sur le graphique! (Image jointe – Code 2)…

    J’ai juste modifié les lignes 32 et 34 par  “DRAWBARCHART(Open,High,Low,Close)COLOURED (x,x,x)”

    Cependant au lieu de l’afficher sur toutes les bougies, je souhaiterai faire ressortir sur le graphique que celles dont la clôture sur l’indicateur se situent en dessous du seuil 5 et au dessus du seuil 95!

    Je ne sais pas rajouter ces seuils dans le code de l’indicateur!!!

    Merci pour votre aide.

    //PRC_AFL Winner | indicator
    //27.04.2017
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //Translated from MT4 version 
    
    //---Settings
    //PERIOD = 10
    //AVG = 5
    //---end of settings
    
    if barindex>period then  
     period=max(period,2)
     avg=max(avg,2)
    
     pa = (2*close+high+low)/4
    
     scost5=summation[avg](volume*pa)
     svolume5=summation[avg](volume)
    
     pa5=scost5/svolume5
    
     mmin=lowest[period](pa5)
     mmax=highest[period](pa5)
    
     rsv=((pa5-mmin)/max(mmax-mmin,pointsize))*100
    
     pak = average[avg,2](rsv)
     pad = average[avg,2](pak)
    
     if pak>pad then 
      drawcandle(pad,pak,pad,pak) coloured(30,144,255)
     else
      drawcandle(pak,pad,pak,pad) coloured(220,20,60)
     endif
    endif
    
    return
    Code-1-2.jpg Code-1-2.jpg
    #69388 quote
    Nicolas
    Keymaster
    Master

    Il suffirait d’intégrer des conditions basées sur >95 et <5 dans tes lignes 31 et 33 ? Ou alors je n’ai pas bien compris la question !

    #69610 quote
    Alai-n
    Participant
    Veteran

    Bonjour Nicolas,

    Merci pour l’info…Alors j’ai tenté CODE 3, modification ligne 31 et 33, mais cela ne fonctionne pas!!!

    //CODE 3
    
    if pak>0,95*pad then
    DRAWBARCHART(Open,High,Low,Close)COLOURED (0,128,0)
    elsif pak>0,05*pad 
    DRAWBARCHART(Open,High,Low,Close)COLOURED (255,0,0)
    endif
    endif
    
    return
    

    Du coup j’ai tenté une autre modification CODE 4, qui ne fonctionne qu’en partie! Ce code ne me retourne pas les valeurs sur l’indicateur de 0 et 100.

    Modification à partir de :

    if (pak>95 and pad>95) or (pad<5 and pak<5) then

    //CODE 4
    
    //---Settings
    PERIOD = 10
    AVG = 5
    //---end of settings
    
    if barindex>period then
    period=max(period,2)
    avg=max(avg,2)
    
    pa = (2*close+high+low)/4
    
    scost5=summation[avg](volume*pa)
    svolume5=summation[avg](volume)
    
    pa5=scost5/svolume5
    
    mmin=lowest[period](pa5)
    mmax=highest[period](pa5)
    
    rsv=((pa5-mmin)/max(mmax-mmin,pointsize))*100
    
    pak = average[avg,2](rsv)
    pad = average[avg,2](pak)
    
    if  (pak>95 and pad>95)  or (pad<5 and pak<5) then
    
    if pak>pad then
    DRAWBARCHART(Open,High,Low,Close)COLOURED (0,128,0)
    elsif pak<pad then
    DRAWBARCHART(Open,High,Low,Close)COLOURED (255,0,0)
    endif
    endif
    endif
    
    return
    

     

    Que dois-je faire?

    Merci pour ton aide…

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

OSCILLATEUR AFL WINNER/BAR CHART


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Alai-n @alai-n Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Alai-n
7 years, 10 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 04/28/2018
Status: Active
Attachments: 1 files
Logo Logo
Loading...