Author of the idea: Vladimir Khlystov, mq5 code author: barabashkakvn.
We open a new position opposite to the previous one. Inputs only contain Stop loss, Take Profit and the minimum lot.
The Stop loss and Take Profit parameters should be optimized.
Example on EURUSD, H1: