Help to EA carry through Hedge

 

I am testing this EA makes some time, is what it comes presenting some best results to some time. Always working with small lots in graphs of 1H.

What I am searching is a way to make with that it carries through Hedge thus that an opened position either, since that already does not have another position opened in the same parity, or either, if exists an open Sell wants that the system interprets that only the opening of a Buy would be possible, carrying through a position of each time.This would increase the agility and the profitability of the EA.

I am sending the EA. In case that I can help I am thankful to me.

Files:
Reason: