When opening a new bar, the EA analyzes the value of the previous four bars:
When we have an open position, then the "HalfLots" variable value is checked in the
trailing block. In other words, the system checks if it is possible to partially close a profitable position. If "HalfLots==true", the position is closed partially:
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/16787
The Exp_CenterOfGravityCandles Expert Advisor is based on signals of the CenterOfGravityCandles indicator.WPR_Histogram_Round_HTF
The WPR_Histogram_Round indicator with the timeframe selection option available in the input parameters.