Author of the idea — Volodymyr Neborachko, Author of the MQL5 code — barabashkakvn.Â
The Expert Advisor opens a deal in the breakout direction — the breakout level should be set manually. It is possible to configure the EA to trade only Buy or only Sell:
Â
Breakout is determined based on the Close prices of the first and second bar. Upward breakout condition:
//--- Buy   if(iClose(1)>AppPrice && iClose(2)<=AppPrice)
Downward breakout condition:
//--- Sell   if(iClose(1)<AppPrice && iClose(2)>=AppPrice)
The Expert Advisor calculates the lot value dynamically depending on the specified risk percent of free margin.
Â