JSParticipant
Senior
Salut,
Il s’agit d’une version modifiée (couleurs) de l’indicateur de la bibliothèque…
//PRC_Gann HighLow Activator | indicator
//31.12.2016
//Nicolas @ http://www.prorealcode.com
//Sharing ProRealTime knowledge
//Converted from Metastock version
// — parameters
period = 3
// —
avgH = average[period](high)[1]
avgL = average[period](low)[1]
if close>avgH then
hilo = 1
elsif close<avgL then
hilo = 0
endif
if hilo then
gannHiLo = avgL
DrawPoint(BarIndex, avgL,2)Coloured(“Green”)
color = 1
else
gannHiLo = avgH
DrawPoint(BarIndex, avgH,2)Coloured(“Red”)
color = -1
endif
r = 0
g = 255
b = 0
t = 255
IF color = -1 THEN
r = 255
g = 0
t = 255
ENDIF
DrawCandle(Open,High,Low,Close) coloured(r,g,b,t)
RETURN //GannHiLo style(dottedline) coloured(r,g,b,t) AS “GannHiLo Activator”
bonjour,
desoslé mais sa ne corespond pas au code mq4 que j’ai fourni,
serait-il possible de traduire le code mq4 voir la photo fourni merci. cordialement
Par conséquent, vous voyez seulement le manque des lignes verticales :
Lb = 9
if close > Average[Lb](High)[1] then
trend = 1
gann = Average[ Lb ](low)[1]
r=0
g=125
b=0
elsif close < Average[Lb](Low)[1] then
trend = -1
gann = Average[Lb](high)[1]
r=255
g=0
b=125
else
trend = trend
endif
if trend <> trend[1] then
if trend = 1 then
drawvline(barindex)coloured(r,g,b)style(dottedline,1)
elsif trend = -1 then
drawvline(barindex)coloured(r,g,b)style(dottedline,1)
endif
endif
return gann as "Gann"coloured(r,g,b)style(line,2)