How It Works
The entry point lies at the intersection of two МАs and a concurrent intersection of the zero line by CCI. The exit lies at the reverse intersection of two МАs. The image below shows the entry into a sell position, the signal bar marked by a vertical line and the exit at the reverse intersection of two MAs.
Additionally, the Stop Loss is used at the value determined by the ATR indicator. The original version made use of ATR from the forming bar, whereas this Expert Advisor uses the first completed bar.
If the trades are losing, the volume of new positions can be reduced in proportion to the number of losing trades. The more consecutive losing trades, the smaller the lot. If the trades are winning, the Expert Advisor keeps trading the initial lot size. The Initial lot can be constant or proportional to the available funds.
Simple MAs are used on the closing price. CCI is calculated on the closing price. Only indicator periods can be changed in the window of properties.
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/1048