AK27Participant
Junior
//PP Fractals v1.2
//PRT v11
//By Vonasi
//Date: 20201217
defparam drawonlastbaronly = true
//Settings
BarsBefore = 1
BarsAfter = 1
Support = 1
Resistance = 1
Points = 1
//Make sure all settings are valid ones
BarsBefore = max(BarsBefore,1)
BarsAfter = max(BarsAfter,1)
StartBack = max(0,startback)
if barindex >= barsbefore + barsafter then
//Look for a low fractal
BarLookBack = BarsAfter + 1
if low[BarsAfter] < lowest[BarsBefore](low)[BarLookBack] THEN
if low[BarsAfter] = lowest[BarLookBack](low) THEN
a = a + 1
$supportbar[a] = barindex[barsafter]
$supportvalue[a] = low[barsafter]
endif
endif
//Look for a high fractal
if high[BarsAfter] > highest[BarsBefore](high)[BarLookBack] THEN
if high[BarsAfter] = highest[BarLookBack](high) THEN
b = b + 1
$resistancebar[b] = barindex[barsafter]
$resistancevalue[b] = high[barsafter]
endif
endif
if islastbarupdate then
//support line
if a >= 2 then
if support then
flag = 0
zz = 0
for z = a-zz downto 1
for xx = 1 to a
if z-xx < 1 then
break
endif
if $supportvalue[z] > $supportvalue[z-xx] then
drawray($supportbar[z-xx],$supportvalue[z-xx],$supportbar[z],$supportvalue[z]) coloured(128,0,0)
if points then
drawpoint($supportbar[z],$supportvalue[z],2) coloured(128,0,0)
drawpoint($supportbar[z-xx],$supportvalue[z-xx],2) coloured(128,0,0)
endif
flag = 1
break
endif
zz = zz + 1
next
if flag = 1 then
break
endif
zz = 0
next
endif
endif
//resistance line
if b >= 2 then
if resistance then
flag = 0
zz = 0
for z = b-zz downto 1
for xx = 1 to b
if z-xx < 1 then
break
endif
if $resistancevalue[z] < $resistancevalue[z-xx] then
drawray($resistancebar[z-xx],$resistancevalue[z-xx],$resistancebar[z],$resistancevalue[z]) coloured(0,128,0)
if points then
drawpoint($resistancebar[z],$resistancevalue[z],2) coloured(0,128,0)
drawpoint($resistancebar[z-xx],$resistancevalue[z-xx],2) coloured(0,128,0)
endif
flag = 1
break
endif
zz = zz + 1
next
if flag = 1 then
break
endif
zz = 0
next
endif
endif
endif
endif
return
Bonjour à tous, j’ai découvert cet indicateur qui est super ici, je m’en sers bcp, je me demande si c’est possible de l’utiliser en screener et y ajouter une règle de vol mini et prix max/mini.
Merci et bravo à vous pour votre travail
Un screener basé sur quelle(s) condition(s) ? que faut il détecter ? Une image peut être ? Merci.
Cassure de fractals ou de trendlines basés sur les 2 points des fractals ?
AK27Participant
Junior
Bonne question, je pense cassure de fractal 🙂
Ma question, c’est de savoir si tu veux tester la cassure du niveau de prix où tu vois un point vert ou rouge sur ton image (un point fractal) ou le franchissement d’une ligne verte ou rouge (droite de tendance créé à l’aide de 2 points fractals) ?
AK27Participant
Junior
Ah du coup le franchissement d’une ligne verte ou rouge droite de tendance créé à l’aide de 2 points fractals.
ok, ce ne sera pas possible avec ce code car il utilise des variables en tableaux non compatible avec ProScreener, en revanche tu pourras trouver quelque chose de semblable dans cet autre sujet du forum : https://www.prorealcode.com/topic/trendline-une-approche-du-trading/