This EA has two main input parameters:
nPeriod1 and nPeriod2 which you can optimize for each and every time frame and currency pair.
After opening a first position the EA is looking after the trend and if the price goes in the opposite direction the Martingale system and Pyramid scheme are switch on with a coefficient (input parameter: coefLot) for the next position lot size. In case of many positions opened at the same time the EA will close all of them when sum of profit will be greater than the input parameter: dProfit.
The input parameter: RiskPercent is used as a defense mechanism from increasing a lot size to a dangerous value
Note: input parameters are optimized for EURUSD, H1
I insist to optimize all input parameters for each currency pair and TF.