The author of the idea: Scriptor.
mq5 code author - barabashkakvn.
The EA uses the iMA indicator (Moving Average, MA) and analyzes the last six bars.
Inputs
Test for EURUSD H1:

Tradotto dal russo da MetaQuotes Ltd.
Codice originale /ru/code/21387
CloseProfit v2
Closing positions and removing pending orders when reaching a specified profit or loss.
SimplePivot
A simple Pivot. No stop loss and take profit are used.
DirectCandlesCounter
The indicator shows the moment of successive appearance of several unidirectional candles in a row activating alerts and sending email and push notifications
DirectCandlesCounter_Candle
DirectCandlesCounter indicator in the form of candles.