umdParticipant
New
Hi,
I found Gann HiLo indicator on this forum via this link, https://www.prorealcode.com/prorealtime-indicators/gann-hilo-activator/
Does anyone has improved code for Gann HiLo activator, which shows all candles green/red depending on price is above/below the line?
If possible, please attach as .itf file, because I am not that expert in prorealtime.
Thanks
JSParticipant
Senior
//PRC_Gann HighLow Activator | indicator
//31.12.2016
//Nicolas @ 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
color = 1
else
gannHiLo = avgH
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 coloured(r,g,b,t) AS "GannHiLo Activator"
umdParticipant
New
Thanks a lot JS. This is exactly what I was looking for. You are awesome!