OSCILLATEUR AFL WINNER/BAR CHART
Forums › ProRealTime forum Français › Support ProBuilder › OSCILLATEUR AFL WINNER/BAR CHART
- This topic has 2 replies, 2 voices, and was last updated 7 years ago by
Alai-n.
-
-
04/28/2018 at 5:56 PM #69352
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.
1234567891011121314151617181920212223242526272829303132333435363738//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 settingsif barindex>period thenperiod=max(period,2)avg=max(avg,2)pa = (2*close+high+low)/4scost5=summation[avg](volume*pa)svolume5=summation[avg](volume)pa5=scost5/svolume5mmin=lowest[period](pa5)mmax=highest[period](pa5)rsv=((pa5-mmin)/max(mmax-mmin,pointsize))*100pak = average[avg,2](rsv)pad = average[avg,2](pak)if pak>pad thendrawcandle(pad,pak,pad,pak) coloured(30,144,255)elsedrawcandle(pak,pad,pak,pad) coloured(220,20,60)endifendifreturn04/29/2018 at 7:18 PM #6938805/01/2018 at 7:36 PM #69610Bonjour Nicolas,
Merci pour l’info…Alors j’ai tenté CODE 3, modification ligne 31 et 33, mais cela ne fonctionne pas!!!
12345678910//CODE 3if pak>0,95*pad thenDRAWBARCHART(Open,High,Low,Close)COLOURED (0,128,0)elsif pak>0,05*padDRAWBARCHART(Open,High,Low,Close)COLOURED (255,0,0)endifendifreturnDu 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
12345678910111213141516171819202122232425262728293031323334353637//CODE 4//---SettingsPERIOD = 10AVG = 5//---end of settingsif barindex>period thenperiod=max(period,2)avg=max(avg,2)pa = (2*close+high+low)/4scost5=summation[avg](volume*pa)svolume5=summation[avg](volume)pa5=scost5/svolume5mmin=lowest[period](pa5)mmax=highest[period](pa5)rsv=((pa5-mmin)/max(mmax-mmin,pointsize))*100pak = average[avg,2](rsv)pad = average[avg,2](pak)if (pak>95 and pad>95) or (pad<5 and pak<5) thenif pak>pad thenDRAWBARCHART(Open,High,Low,Close)COLOURED (0,128,0)elsif pak<pad thenDRAWBARCHART(Open,High,Low,Close)COLOURED (255,0,0)endifendifendifreturnQue dois-je faire?
Merci pour ton aide…
-
AuthorPosts