Voici une methode simplifiée ,par rapport au code de Hk-lisse , mais avec une variable.
ci-dessous 2 graphes ,le premier avec variable =2 et, le second avec variable =5
Il me semble que ce code est plus facile d'utilisation .
Pour explication voir :
http://www.metaquotes.net/techanalysis/indicators/fractal
http://www.forexfactory.com/showthread.php?t=164704
/////////// FRACTALS DE BILL WILLIAMS
//Varible = cp - par défaut =2
if high[cp] >= highest[2*cp+1](high) then
LH = 1
else
LH=0
endif
if low[cp] <= lowest[2*cp+1](low) then
LL= -1
else
LL=0
endif
if LH=1 then
hil = high[cp]
endif
if LL = -1 then
LOL=low[cp]
endif
return lol coloured(255,0,0) as "bas",hil coloured(0,255,0) as"haut"
/////////////fin
POUR METATRADER : ci-dessous indicateur Takbir modifié, si vous mettez les
2 variables sur 2 vous avez l'indicateur FRACTALS de BILL WILLIAMS
-si les 2 variables sur 5 (left-right) le Takbir.
-si variables left = 2 et right =1 vous avez le Scalper version II de HK-lisse.
http://ultrashare.net/hosting/fl/9ff14a0342