The strategy is based on the iBands indicator.
When the price breaks through the channel, a position is opened in the direction opposite to the price movement. If the price breaks through the upper channel border upwards, a Sell position is opened. If lower border is broken downwards, a Buy position is opened.
Fig. 1. Trading results for 2016-2017.
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/17992
Trades based on the previous candlestick.ListPositions
A list of all positions. An example of working with CPositionInfo.