Free EA with source code that will open trade the opposite direction if it is wrong on a trade

 

Does anyone know of any free EA with source code that will open trade the opposite direction if it is wrong on a trade. This condition is true if price moved against the original (buy or sell) order by 20 pips.

Also, while it open trade in opposite direction, it must pay attention to the averaging rule that is built into the EA. If price of all total trades exceed take profit input from user, then the EA take profit.

 I'm asking this because I want to look at the source code to study to improve on my mql4 programming language skill.

 

Please don't double post.

Does anyone have a template for Closing trade and opening trade in the opposite direction?
Does anyone have a template for Closing trade and opening trade in the opposite direction?
  • www.mql5.com
Let's say if an EA open a buy order, the market move in the wrong direction. - - Category: expert advisors and automated trading