Gann HiLo activator (with Green/Red candles)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #203710 quote
    umd
    Participant
    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

    #203721 quote
    JS
    Participant
    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"
    umd thanked this post
    #203733 quote
    umd
    Participant
    New

    Thanks a lot JS.  This is exactly what I was looking for.  You are awesome!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Gann HiLo activator (with Green/Red candles)


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
umd @umd Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by umd
3 years, 3 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 11/07/2022
Status: Active
Attachments: 2 files
Logo Logo
Loading...