The author of the idea: eugene-last.
The MQL5 code author: Vladimir Karputov.
The Expert Advisor determines price consolidation levels. Consolidations are visually displayed as horizontal lines on a chart, forming a kind of a channel. The two upper lines (green) indicate the corridor for BUY positions, and the two lower lines (red) mark a corridor for SELL positions:

The EA tries not to open more than two positions of each type (BUY and SELL). The following rule is used: if there is a position, then the next position of the same type can be opened no earlier than after Trade once in the "timeframe of checked elements" * number of seconds on the History: timeframe of checked elements timeframe.
Testing results on EURUSD, H1 with default parameters:

Traduit du russe par MetaQuotes Ltd.
Code original : https://www.mql5.com/ru/code/20461
sDotToLineDist
A script calculating the distance between a point and a line.
Poker_SHOW
An Expert Advisor based on a random number generator. Trend is determined using the iMA (Moving Average, MA) indicator.