Expert Advisor: Candlestick Pattern Scanner, Multi Timeframe and Multi Symbol
Product Page: click here
INPUT PARAMETERS:
- Load Symbols from: Select the source of the symbols to load into the panel, it can be market watch or comma separated symbol names from the next parameter.
- Symbol List: Comma separated list of symbol names to show in panel, ignore this parameter if you select market watch as source of symbols.
- Timefrme List: Input comma separated list of timeframes for showing in panel, like: M1,M15,H4,D1.
Enable/Disable Candlestick Patterns:
In this section, you can enable and disable different candlestick pattern types that scanner shows on the panel.
- <Doji> Max body height (points): If you set this parameter=0, then doji patterns must have equal open and close prices, but if you for example set the parameter=5 then open and close prices can be up to 5 points different.
Global Settings for Candlestick Patterns:
- Forex Mode: Some patterns need a gap between candles and this doesn't happen much in forex charts, enable this parameter to ignore the need for gaps in patterns. You can set this parameter to false if you want to use this scanner on markets other than forex.
- Use average body filter: If set to true, body (difference between close and open) of the first candle of the pattern must be bigger than average body of previous candles (check two following parameters).
- Average Body Factor: How much body of the first candle of the pattern must be bigger than average of previous candles. For example, if you set this parameter=1.2, then candle must be at least 1.2 times bigger than the average of previous candles. If this parameter=1 then this candle must be just bigger than the average of previous candles.
- Average Body Period: Number of previous candles that must be use for averaging.
- Use big candle filter: If set to true, body (difference between close and open) of the first candle of the pattern must be bigger than the body of all previous candles (check the two following parameters).
- Big Candle Factor: How many times first candle of the pattern must be bigger than previous candles.
- Big Candle Period: Number of previous candles that the first candle of the pattern must be bigger than them.
Shadow Settings for Hammer, Inverted hammer, Hanging man, Shooting star:
- Min. ratio of tail length to body length: How many times the main shadow (tail) of the candle must be bigger than the body of the candle. For example, if you set this parameter=1.2, then main shadow must be at least 1.2 times bigger than the body of candle. If this parameter=1 then main shadow must be just bigger than the body of the candle.
- Min. ratio of tail length to nose length: How many times the main shadow (tail) of the candle must be bigger than the small shadow (nose) of the candle. For example, if you set this parameter=1.2, then main shadow must be at least 1.2 times bigger than the small shadow of candle. If this parameter=1 then main shadow must be just bigger than the small shadow.
- Bullish body for hammer & inverted hammer: If set to true, body of the hammer & inverted hammer candles must be bullish.
- Bullish body for hanging man & shooting star: If set to true, body of the hanging man & shooting star candles must be bullish.
- Use average shadow filter: If set to true, tail of the candle of the pattern must be bigger than the average body size of the previous candles (check the two following parameters).
- Average shadow Factor: How much of the tail of the candle in the pattern must be bigger than the average body size of the previous candles.
- Average shadow Period: Number of previous candles that must be use for averaging.
- Use big shadow filter: If set to true, the tail of the pattern's candle must be bigger than body of all previous candles (check the two following parameters).
- Big shadow Factor: How many times the tail of pattern's candle must be bigger than previous candles?
- Big shadow Period: Number of previous candles that the tail of pattern's candle must be bigger than them.
Support and Resistance Settings:
Please check shved supply and demand indicator to see how zones change based on these parameters.
- Show S/R zones on panel: if set to true, scanner checks all timeframes of all symbols, and if symbols price or candlestick patterns are inside support or resistance zones then it changes the background color of the related cell based on the type of the zone. Also if you move the mouse cursor to the cell you can see the strength of the zone on the popup text.
- Alert only if pattern is inside S/R zones: If set to true, the alert only triggers if candlestick pattern is formed inside the support and resistance zones.
- Find Weak Zones: If set to false, weak zones won't show in panel and alert won't trigger for them.
- Find Untested Zones: If set to false, untested zones won't show in panel and alert won't trigger for them.
- Find Broken Zones: If set to false, broken zones won't show in panel and alert won't trigger for them.
- Extend Zones: if set to true, EA goes dipper in history bars to find support and resistance zones. The result will be more and sometimes wider zones.
- Ignore Near Weak & Wide Zones: If set to true, EA ignores the weak and broken zones that their distance to next stronger zone is less than their width.
- Zone ATR Factor: Changes zone height based on ATR indicator values, less value means thinner and more accurate zones, but less chance to trigger the alert.
Alert Settings:
- Show Alert: Show popup alert when the selected patterns appear in the selected timeframes of the selected symbols.
- Send Push Notification: Send push notification to mobile phone when panel alert triggers (you should set metatrader Notifications options).
- Send Email: Send email when panel alert triggers (you should set metatrader email options).
- Enable alert for symbols on startup: Enable alert for all symbols when attaching the EA to chart. You can also enable/disable alert for each symbol by clicking on its cell on the panel.
- Enable alert for timeframes on startup: Enable alerts for all timeframes when attaching the EA to the chart. You can also enable/disable alert for each timeframe by clicking on its cell on the panel.
- Color of symbols and TFs when alert is enable: Color for symbol and timeframe cells when alert is enabled.
- Color of symbols and TFs when alert is disable: Color for symbol and timeframe cells when alert is disabled.
- No alert when Algo Trading is disable: If true, then you can disable alerts by disabling "Algo trading" button on metatrader terminal.
Panel Settings:
- Header Color: Color of the header of the panel.
- Text Color: Color of symbol and timeframe text.
- Border Color: Color of borders of the panel and its cells.
- Color for Bullish patterns: Color for the text of bullish candlestick patterns.
- Color for Bearish patterns: Color for the text of bearish candlestick patterns.
- Color for Neutral patterns: Color for the text of neutral candlestick patterns (doji and double inside patterns).
- Resistance zone color: Color for cells that show resistance zones.
- Support zone color: Color for cells that show support zones.
- Height of Panel Rows: Height of the panel rows.
- Width of Symbols Column: Width of the first column of the panel that shows the symbol names.
- Width of Timeframe Columns: Width of other columns of the panel.
- Panel Distance from Left: Panel distance from left of the chart.
- Panel Distance from Top: Panel distance from top of the chart.
- Text Font Name: Font name of panel text.
- Font Size: Font size of panel text.
- Open chart by clicking on table cells: By enabling this parameter when you see a pattern on the panel, you can click on its cell to open the chart of that pattern. You can also save your desired chart template as "default.tpl" and it will apply on the newly opened chart.
How to use the Candlestick Pattern Scanner Bridge in expert advisors:
This bridge is a fast and lightweight version of Candlestick Pattern Scanner (a separate file from the main scanner) that you can use in the code of expert advisors and indicators to check different candlestick patterns and S/R zones for all metatrader timeframes.
Graphical objects are removed from the bridge but all necessary options are preserved so you can control the specs of patterns like the main scanner.
There are 2 buffers in the bridge that you can load them with iCustom function in your EA or indicator code to check if a candlestick pattern formed in the chart and if the pattern or chart price is inside a support or resistance zone. With these buffers you will have the type of the patterns and the type (support,resistance) and strength (weak,broken,untested,verified,proven) of the zones for all chart timeframes.
So in your EA you will have 2 buffers, 1 buffer for candlestick pattern type and 1 buffer to show S/R zone type and strength, each buffer has 9 value for 9 timeframe of MT4 (21 values for 21 timeframe of MT5), first value for M1 and the last value for MN1 timeframe. For example, you can name buffers such as:
- pattern_type[] // type of the candlstick pattern for all timeframes
- sr_zone[] // type and strength of support resistance zones for all timeframes
Each of the above buffers will have 9 (for MT4) or 21 (for MT5) values. For pattern_type buffer each value can be between 0 and 10 (representing S/R zone type and strength) and for sr_zone buffer each value can be between 0 and 31 (representing candlestick pattern type).
- If the value of the pattern_type buffer for a timeframe is 0 this means there is not any pattern in that timeframe.
- If the value of the pattern_type buffer for a timeframe is not 0 and the value for sr_zone buffer is not 0, this means candlestick pattern formed inside a S/R zone.
- If the value of the pattern_type buffer for a timeframe is 0 but the value for sr_zone buffer is not 0, this means chart's price is inside a S/R zone.
For MT4, the range of arrays will be from 0 to 8, 0 for the M1 timeframe and 8 for the MN1 timeframe. For example:
- pattern_type[0] is for the M1 timeframe and its value shows the pattern type (for example 4 means hammer pattern)
- sr_zone[5] is for H4 timeframe and its value shows the type and strength of S/R zone (for example 8 means untested resistance zone).
For MT5, the range of arrays will be from 0 to 20, 0 for the M1 timeframe and 20 for the MN1 timeframe. For example:
- pattern_type[0] is for M1 timeframe and its value shows the pattern type (for example 4 means hammer pattern)
- sr_zone[4] is for M5 timeframe and its value shows the type and strength of S/R zone (for example 4 means verified support).
- sr_zone[14] is for H4 timeframe and its value shows the type and strength of S/R zone (for example 8 means untested resistance zone).
You can see the meaning of all the values for buffers in the sample EA you received with the bridge.
To see how to implement the bridge in your code, please refer to the sample EA you received with the bridge.