The idea is the same of the previous version except that now it tries to maximize the gain when profitable and allows to play with trailing stop and profit in order to close profitable orders even when stalled in "protected" condition trying to exit.
A couple of examples (not optimized)
I wrote a new indicator to find the range bound period, then we can place order when the price break the range bound.ind_aMU.
The indicator specifies on trend and lateral movements of the price.
See http://forum.mql4.com/54660 for getting a connection between highs and a connection between lows. I made a zigzag this way.RSI Breakout
The Expert Advisor places buy trades when RSI crosses above 73 and sells when it drops below 27. A trailing stop based on ATR protects profits.