Supply and Demand indicator

23 February 2022, 08:29
Jan Flodin
0
691

The main purpose of this blog is to describe and explain the input parameters of my Supply Demand indicator (MT4 version / MT5 version).

Please also check out my other supply/demand/top/bottom and dashboard products for MT4:
Supply Demand dashboardDouble top/bottom scanner, Chart patterns scannerDivergence dashboardTrend dashboardTrend reversal dashboardMarket analysis dashboard

For MT5:
Supply Demand dashboardDouble top/bottom scannerChart patterns scannerDivergence dashboardTrend dashboardMarket analysis dashboard

This is an out-of-the-box product which will normally not be modified based on request from a single customer. Please therefore first read this blog to the end and/or test the indicator in the strategy tester in order to understand what it can and cannot do.

General information

The number visible at the right corner of each active zone represents the number of times the zone has been tested.

Input parameters

Parameters marked with an asterisk (*) in the beginning are only available in the MT5 version and parameters marked with two asterisks (**) in the beginning are only available in the MT4 version.

  • TOP/BOTTOM (EXTREMUM) SETTINGS
    • Min. amount of bars between extremums - Default is 8. The higher the value the stronger the setup. I recommend to set this value to 30 or higher. Fewer zones but better quality.
    • Amount of higher/lower candles (0=disabled) - Here you will set how many candles must be lower/higher prior to the first extremum candle (first top/bottom)
    • Neckline candle max offset % (0=disabled) - You can set how many percentage the neckline candle can deviate from the exact middle point of the 2 top/bottom candles (extremums). If there are for instance 20 candles between the 2 extremums then setting a value to 50 (percent) will mean that the neckline candle (candle number 10) cannot be more than 5 candles to the left or right of the middle which is 10. Using this option will make it a more clear U/V formation for those who desires that for their trading strategy.
    • Offset from first extremum (<5 = ATR, >=5 = points) - This value is only used if Enable supply/demand has been set to 'false'. It will control how much the second extremum (top/bottom) is allows to deviate from the first extremum. If set to a value lower than 5 then the ATR (period 14) will be used and multiplied with the value given here. * This value is also used for alerts when price is close to a zone.
    • Use offset only when above/below first extremum - 'true' or 'false'. If set to 'true' then the second extremum's candle high/low price must exceed the first extremum.
  • SUPPLY/DEMAND SETTINGS
    • Enable supply/demand (False=regular top/bottom) -  'true' or 'false'.
    • * Time frame for nested zone (TF_CURRENT=disabled) - Drop down menu for selection of time frame for showing nested zones.
    • Speed [0.5-4.9] - Default is 1.5. The higher the value the stronger the zone (price move from the base). Higher value = fewer zones.
    • * Depth [1-5] - Default is 3 The lower the value the stronger the zone (price move from the base). Higher value = more zones.
    • Show old zones - 'true' or 'false'.
    • Draw only untested zones - 'true' or 'false'. Only untested zones will be shown.
    • Cancel zone if tested before this amount of candles
    • Draw overlapping zones -  'true' or 'false'. An overlapping zone is a zone which is nested into another previous zone.
    • Ignore wicks for zone break'true' or 'false'. 
    • Volume average period (0=volume filter disabled) - If you will use this filter then recommended value is 20.
    • Volume over average (percent) - Default is 20. If the volume on the base candle is over the average by 20% or more then the signal is valid. The higher the value the more reliable the setup.
    • * Number of bars to wait for breakout
  • RSI/TREND FILTER SETTINGS
    • ** RSI filter method - Drop down menu where you can select if to apply the RSI filter on first, second or both peaks. When used then peak candle(s) must close over/under the RSI levels below. If used in Triple mode then First will check RSI on the 2 first extremums and Both will check all three extremums.
    • * Trend filter to use -  Listbox with the following selections:
      • RSI -  The indicator value will be measured on the first extremum (zone start).
      • Bollinger bands -  The indicator value will be measured on the first extremum (zone start). Upper bands for supply and lower bands for demand.
    • RSI overbought level
    • RSI oversold level
    • * Bollinger shift
    • * Bollinger deviation
    • RSI/Trend period
    • Price type
    DIVERGENCE SETTINGS
    • ** Enable divergence filter - 'true' or 'false'. If enabled, and also show old zones is enabled, then the old zones will only be drawn if there was a divergence on the candle which broke the zone.
    • * Divergence indicator - Listbox where you can select which oscillator/indicator you would like to use for the divergences. If enabled, and also show old zones is enabled, then the old zones will only be drawn if there was a divergence on the candle which broke the zone.
    • Include hidden divergences - 'true' or 'false'. If enabled then a hidden divergence is also valid.
    • Draw divergence lines on price (main) chart - 'true' or 'false'. * Divergence lines will not be drawn for the nested time frame.
    • Alert about divergence - 'true' or 'false'. If enabled then you will get alerted about divergences. You will get alerted also when they occur between zones.
    • ** Divergence indicator - Listbox where you can select which oscillator/indicator you would like to use for the divergences.
    • Max. bars to check (divergence depth) -  Recommended max. value is 80.
    • Min. bars to check (0=disabled) - 
    • Period for Stochastics K / RSI / CCI
    • Stochastics D
    • Stochastics Slowing
    • * MACD/OSMA fast/slow/signal MA
    • ** MACD/OSMA fast MA
    • ** MACD/OSMA slow MA
    • ** MACD/OSMA signal MA
    • MA method
    • Price type
    • Stochastics Price type
  • * HULL MOVING AVERAGE (HMA) BREAKOUT SETTINGS
    • Period - Moving average period.
    • Speed - Smoothening ratio.
    • Candle shift - Default is 1. Can be set to 0 to catch the color change one candle earlier (unconfirmed signal).
    • Price type
  • * CANDLE PATTERNS BREAKOUT SETTINGS
    • Enable pin bar filter - If set to 'true' the signal candle (second extremum) must be a pin bar.
    • Next candle most close above/below pin bar high/low (pin bar breakout)The close price of the next candle must be higher/lower than the high/low of the pinbar.
    • Enable engulfing filter - If set to 'true' the candle following the signal candle (second extremum) must engulf the signal candle.
    • Enable tweezer filter - If set to 'true' the candle following the signal candle (second extremum) must be a tweezer candle.
    • Enable morning/evening star filter - If set to 'true' the candle following the signal candle (second extremum) must be the last of 3 in the star formation.
    • * Enable Three line strikeIf set to 'true' the candle following the signal candle (second extremum) must engulf the previous 3 candles.
    • Minimum candle body size % (0 = any body size) - Default is 0. If you would like a larger body, you can set a higher value. The scanner will filter out Dojis by default.
    • Minimum percent for tail - If you would like a larger tail you can set it to for instance 75. It will give fewer signals but higher quality.
    • Only strict pin bars - 'true' or 'false'. A strict Pin bar means that the Pin bar must have another color then the previous bar and that the Pin bar's High must be higher than the previous bar's High and finally that the pin bar's body must be within the range of the previous bar. With this setting set to 'false' any Pin bar will give a signal.
    • Engulfing pattern to scan for - In this list you can select from 4 different engulfing patterns (only 1 can be selected):
    • Range candle B engulfs range candle A.
    • Body candle B engulfs range candle A.
    • Body candle B engulf body candle A.
    • Range candle B engulfs body candle A
      • Min. percent for engulfing body (0 = any body size) - A higher percentage (larger body) will give higher quality signals.
      • Min. points for engulfing/tweezer candle (0 = any size) - Only candles (second candle) larger or equal than this size will give an alert. Default is 0.
      • Max. points for engulfing/tweezer candle (0 = any size) - Only candles (second candle) smaller or equal than this size will give an alert. Default is 0.
        • OTHER SETTINGS
          • Max bars to search for first extremum - Default is 3000. Will search for the first extremum xx bars back in time. The higher the value the more system resources will be needed. For slower computers a value of 500-1000 is more suitable.
          • Scan for bullish and/or bearish -  Drop down menu where you can select if to scan for only supply or demand zones.
          • Update interval in seconds - This value controls how often the indicator will check for tested and broken zones.
          • Min. amount of candles between 2 zone tests - The amount of candles before a zone retest is considered.
          • Enable global variables (for EA) -  'true' or 'false'. If enabled then the indiator will write 6 global variables for the 2 nearest zones (can be checked by hitting the F3 button on the keyboard) which can be used by an Expert Advisor for auto trading. The format of the variables is "FSD-[symbol]-[time frame]-[zone type]-[O]", "FSD-[symbol]-[time frame]-[zone type]-[I]" and "FSD-[symbol]-[time frame]-[zone type]-[T]" . For example FSD-EURUSD-H4-D-O. D=demand, S=Supply. O=price of outer border, I=price of inner border, T=amount of zone tests. If you will use iCustom() calls then this parameter will not be used. Instead the first parameter in the call must have the value 'EACall'.
        • ALERTS
          • Enable zone alerts - Set to 'true' to allow for alerts to be sent.
          • Alert also if price near (approaching) a zone - Set to 'true' to allow for alerts to be sent when price is closing in on a zone. ATR or points can be used as offset. Please see the ' Offset from first extremum (<5 = ATR, >=5 = points)' input parameter under the TOP/BOTTOM (EXTREMUM) SETTINGS section.
          • * Enable Hull breakout alerts
          • * Enable candle patterns breakout alerts
          • * Enable divergence alerts
          • Custom alert text - The text you put here will be inserted (within brackets) at the end of the regular alert text.
          • On-screen (pop-up) alert - 
          • Custom sound alert (if True then no pop-up alert) - 
          • Custom sound file - 
          • Mail alert - 'true' or 'false'.
          • Push alert - 'true' or 'false'.
        • CHART OBJECTS SETTINGS
          • Demand/double bottom color
          • Tested demand color
          • Broken demand color
          • Supply/double top color
          • Tested supply color 
          • Broken supply color
          • Text color - Used for the text labels
          • Text font - Used for the text labels
          • Font size - Used for the text labels
          • * Clear breakout arrows on reini


        Share it with friends: