
An example implementing the logic of a counter-trend strategy for returning to the channel after its breakout. The example includes the addition of extra elements on the chart.
Logic

Logic: in case of a breakout of the Price Channel to the upside, followed by a return to the breakout level, open a short position. Exit after a specified time period as indicated in the settings.
The robot is called FakeOutExample
Included in the project:

In the logic, among other things, there is a call to draw visual elements.

Separately, a local maximum and a resistance line after the rebound are drawn, from which the short position will occur:

Good luck with your algorithms!