I do not know why this indicator is named after Gann. But if you look at the code, it can be easily understood:
It uses two moving averages with a short lookback period calculated from the lows and the highs. I have put them on a chart below. You will notice the SMA calculated from the highs (green) and the SMA calculated from the lows (red).
Consider the following areas
-> above SMA calculated from the highs (green): bullish
-> between the two SMAs : neutral
-> below SMA calculated from the lows (red) : bearish
Based on these two moving averages you can create a system which is always in the market (similar to the parabolic stop and reverse). These are the conditions
-> when price first closes below the red line: exit long and enter short
-> when price first closes above the green line: exit short and enter long
The width of the neutral zone can be regulated by the period and type of moving average that you use.
The original formula that I have seen does not specify that price should close above or below the bands, but I have found it more pertinent to use the close outside the channel to enter a position.
The width of the channel is about 1 average (true) range. In the chart below I have used a period of 12. You will get near-identical signals, if you use a SMA with a period of 12 and add/subtract half an ATR(12). Just to show how similar the results are, I have added a second chart below with the SuperTrend M1 (which comes close but uses a lagging range and a median, so that I needed to make a slight adjustment for the settings). Both indicators triggered 8 SAR signals during the last 2 hours of trading for ES on last Friday. Out of these
-> 6 signals were triggered on exactly the same bars
-> 1 signal saw the Gann HiLo leading by 2 bars
-> 1 signal saw the SuperTrend M1 leading by 2 bars
However, the SuperTrend allows to use a multiple of the average true range and not only one setting for the volatility as the Gann HiLow. So if you use the SuperTrend, you do not need this indicator.
The following 5 users say Thank You to Fat Tails for this post:
Thanks a lot for telling the function of the GANN hi/lo!!! I never thought it can be that easy to rebuild the signal with just SMAs. Now I understand, why it give similar signals as SMAs, but is closer to the chart.
Thank You! Thank You! Thank You!