Indicator with Moving average filter and candlestick pattern detection

MQL5 Indicators

Job finished

Execution time 3 days

Specification

I need an indicator that tries to detect reversal points and sends an alert when it detects a combination of a MA filter and a candlestick pattern. The screener takes into account the last 4 bars in the current timeframe. it is mostly used in 15 min or 30min chart, please test it there. All defined criterias must match so that an alert is sent out by screen alert/mobile app alert


(1 Filter)

The optional Moving Average filter (Active/inactive, EMA or SMA, slope and period can be set in settings, default is SMA 15) checks if we are in an uptrend or downtrend and how steep the up/downtrend is. The steepness tells if there is a stronger trend or if we are in a sideways phase. It calculates not only the difference between the SMA to see if we are up/down but also checks what percentage the difference is based on the second last bar to see if the rise is steep or rather parallel to the x-axis. For example the calculation of the SMA slope between the last and second last candle in percent in an uptrend would be (SMA(-1) - SMA(-2) / SMA(-2) * 100).
If you see a better way to avoid sideways phases, I am open.
Then the indicator sends
- SHORT alert only when the MA is rising (=we are in uptrend) and the configured slope is exceeded.
- LONG alert only when the MA is falling (=we are in downtrend) and the configured slope is exceeded.

(2 Candle pattern detection)
The indicator scans the last 4 closed candles for the following configurable sequence (red = close lower than open and green = close higher than open) and sends an alert on a positive:
- red/red/green/green (configurable) when MA filter is LONG
- green/green/red/red (configurable) when MA filter is SHORT

(3 Hammer/shooting star filter)
This is another filter (active/inactive in settings) that only sends an alert when a hammer or shooting star comes up as the 2nd or 3rd bar.
- A hammer is a candle that occurs in a downtrend and has a body with max 1/4 size (configurable) of the whole candle and a shadow only on the lower side. Its Low point is the lowest of all 4 candles.
- A shooting star is the inverse definition of a hammer (in a uptrend and a shadow only on the upper side). Its high point is the highest of all 4 candles.



The alert contains the following information:
------------

<symbol> / <timeframe>
<SMA or EMA> is <rising or falling>

Go <"SHORT" if MA rising and candlestick criteria is met or "LONG" if MA falling and candlestick criteria met>

Candle pattern 2/2 found <"with hammer/inverted hammer" if that condition is met as well>



Settings
---------
- Indicator is active / inactive (shown on screen)
- MA filter (on/off)
- MA type (SMA / EMA)
- MA period (5 min / 15 min / 30 min ...)
- MA minimum slope (%)
- Long candle 1 (red/green, default is red)
- Long candle 2 (red/green, default is red)
- Long candle 3 (red/green, default is green)
- Long candle 3 (red/green, default is green)
- Short candle 1 (red/green, default is green)
- Short candle 2 (red/green, default is green)
- Short candle 3 (red/green, default is red)
- Short candle 4 (red/green, default is red)
- Hammer/shooting star filter (on/off)
- Body size (default 1/4)
- Screen alert (on / off in settings)
- Mobile push (on / off in settings)
- Email (on / off in settings)
- Display text color (default: grey)
- Display text offset (default 250 px)



Settings Display
--------
The indicator should display all of its above settings with a grey text color in the chart windows upper left corner with a configurable offset toe the left border.

Responded

1
Developer 1
Rating
(1120)
Projects
1807
61%
Arbitration
14
64% / 7%
Overdue
84
5%
Free
2
Developer 2
Rating
(539)
Projects
620
33%
Arbitration
36
39% / 53%
Overdue
11
2%
Loaded

Project information

Budget
50 - 100 USD
Deadline
from 2 to 5 day(s)