i need help solving a problem

 
so i have made an EA for a System i have been working on for a while.

the system consists of three different indicators, which you can see in the picture as three seperate lines of dot.

the way the system works is when you get a candle where all three indicators are the same colour (Red or Blue) and position is opened.

my problem is this:

the way i currently have my EA programmed is when it opens a position( the green line on the left side that says "buy" under it) and then hits the Take Profit(the red line with the star above it and "Takeprofit" below it) if at the time of the Take profit being hit all three indicators are still the same colour, a new position will be opened right away.

this would be at the same red line as the Takeprofit in the picture i posted.

what i want to happen is this:

when the TP is hit, i dont want anything to happen until one of these two things happens.

1) one or two of the indicators turns the opposite color which is red in the example, and then turns back to blue so that all three indicators are all blue. when all three are blue again a position is opened again. this happening is indicated in my picutre i posted by having the yellow box around it and it says "Reset area" underneath it.

or all three indicators turn the opposite colour of the first position.

 

i thought i had found the answer. but i am having trouble with the solution i have been given.


mabye someone would like to take a look at the EA?


it is pretty simple

Reason: