This is a classic Range BreakOut system. Range is defined by min number of bars and max width in pips. User can adjust both.
This code can be used in both MetaTrader5 and MetaTrader4.Β Just change the file extension from .mq5 to .mq4Β and compile the file in MetaEditor.
This expert advisor is designed withΒ visual strategy builder –Β Mission Automate. Code is generated automatically. More info:Β
This EA is available as a template in a free demo version, so you can easily modify / customise it without programming.