OSCILLATEUR AFL WINNER/BAR CHART
- This topic has 2 replies, 2 voices, and was last updated 7 years ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
Forums › ProRealTime forum Français › Support ProBuilder › OSCILLATEUR AFL WINNER/BAR CHART
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
//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 |
Bonjour Nicolas,
Merci pour l’info…Alors j’ai tenté CODE 3, modification ligne 31 et 33, mais cela ne fonctionne pas!!!
1 2 3 4 5 6 7 8 9 10 |
//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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
//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…