|cQ-Heiken Ashi Bands MT4 Indicator|
Nov 13, 2023
The cQ-Heiken Ashi Bands indicator is confirmation indicator which can also be used as an exit indicator. The idea is if price crosses up over the upper band it will draw a blue dot, if it crosses below the lower band then an orange dot is drawn. There are 5 reasons a red dot can be drawn.
The indicator is based on the Heiken Ashi Exit indicator except that the high and low data is drawn using moving averages instead of a vertical (candle) line. A moving average is then drawn on the chart where when price crosses above or below the upper or lower bands a possible entry point is drawn. The NNFX maximum ATR is then used to determine if price is too far away from the moving average. If it is then a red dot 1 is drawn. The open and close part of the Heiken Ashi Exit indicator are drawn and can be used as an exit indicator (when the colors change).
There are 40 moving average types that can be used by the Heiken Ashi. It also has an Adaptive Period for responding to price a little quicker.
The indicator has three different modes that determine when the dots will be drawn. The High Low Bands mode: uses just the high and low bands. The Heiken Ashi Histogram mode: uses the height of the open & close histogram to determine when to draw the dots. The histogram height needs to be above a certain amount before a dot is drawn. Eventhough the high and low bands are drawn they are not used in this mode. The Both Hi-Lo Bands & Heiken Ashi Histogram mode uses a combination of both the High Low Bands and the Heiken Ashi Histogram modes.
The Heiken Ashi Bands can be smoothed by any of the 40 moving average types. This only smoothes the bands and doesn't effect the actual Heiken Ashi process. This can help to reduce some of the false entry points that are triggered.
The Heiken Ashi Bands Minimum Distance ATR is used to increase the distance of the bands from each other when the distance falls below the specified ATR level. It can be used in all three modes. If the distance falls below then it adds the Heiken Ashi Bands Min Dis Move-By ATR amount to the upper band and subtracts it from the lower band. This helps to reduce the number of false entry points when price is going sideways.
The Heiken Ashi Bands Minimum Level ATR can be used to keep the bands above/below the moving average (baseline). If Bypassed then bands will not go past the moving average. This is good for removing low level noise.
The Heiken Ashi Histo Trend Change is used in all three modes. The Heiken Ashi Histo Trend Change Max Count is used to determine if a dot can be drawn. If the Heiken Ashi Histo has changed direction this sets the current candle count to '0'. If a dot is drawn and the current candle count is less than or equal to the Max Count then the blue or orange dot is drawn. If the current candle count is greater than the Max Count then a red dot 2 is drawn. The current candle count can also be reset if the Heiken Ashi Histogram (open-close) height gets above the ATR setting set by the Heiken Ashi Hist Trend Reset Count ATR.
The Heiken Ashi Histo Height ATR is available only when using the Heiken Ashi Histo and the Both HiLo Bands Heiken Ashi Histo modes . The ATR amount is added/subtracted from the Histogram height. This reduces the number of dots being drawn.
There are 46 Moving Average types to select from, including Half-Trend, Kijun-Sen, Level Stop Reverse, Simple-Trend, and Super-Trend. If the period is set to '1' then the Heiken Ashi period is used unless the Moving Average type is set to Half-Trend. The MA Trade Entry Measure From determines from what level, the moving average or the bands are used to determine the MA Trade Entry ATR value. If price crosses the bands the number of pips is calculated from either the moving average or the upper/lower bands to the candle close. If this value is greater than the MA Trade Entry ATR then a red dot 1 is drawn.
The MA Max Candle Height is used to determine if a candle's height is too large. Many times these candles casue price to be positioned too far from the moving average. You can use the high-low or fabs(open-close) to determine what if its over the ATR value. If it is a red dot 4 is drawn.
The MA Candle Must Agreement With Trend parameter will draw a red dot 3 if the direction of the candle does not agree with the trend.
The ATR Calculation effects all of the ATR values used by the indicator. You can change the moving average mode (SMA,EMA,SMMA,LWMA) as well as use high[i]-low[i] or the close[i]-close[i+1] (C2C). The C2C setting has a multiplier you can use to increase the lower ATR value produced in this mode.
The ATR Minimum looks at the longer term ATR level. When this setting is enabled it will draw a red dot 5 if the current ATR (14 period) is below it.
The above download (zip file) contains this indicator and a No-Parameters version. The parameters version will save the indicator's current settings to a file. This file is read by the No-Parameters version where the saved parameters used by the indicator. The No-Parameters version only has one parameter which is the preset filename. Here you would put the previously saved parameters created when using the Parameters version. This will allow you to use the No-Parameters version in an expert advisor without the need to pass all the parameters (see dialogbox image below). When used in an expert advisor the No-Parameters version parameters are loaded one time when the indicator is initalized. You only need to call the iCustom("cQ-Heiken Ashi Bands",Buffer#,Candle#) to retrive the indicator's output.
You can access the saved parameter files by opening the Open Data Folder and going to the cQ-Heiken Ashi Bands folder: MT4HASH# -> MQL4 -> Files -> cQ-Indicators -> cQ-Heiken Ashi Bands 1.0. Here you will find the saved parameter files. It is a good idea to save an MT4 Preset of settings just in case you over-write the cQ-Heiken Ashi Bands Parameters file.