Simple Yet Effective Breakout Strategy – EA MetaTrader 5

Simple Yet Effective Breakout Strategy - expert for MetaTrader 5
This breakout strategy is the base for our QAlpha StockTrend product:  You can freely modify/add your own filters to create your own unique version of this strategy. The basic premise of the strategy: Buy/Cover as soon as the price breaks above n bars high Short/sell as soon as the price breaks below n bars low Backtested on

A Code block to detect A “New Candle/Bar” using bars history (very effective way) – EA MetaTrader 5

A Code block to detect A "New Candle/Bar" using bars history (very effective way) - expert for MetaTrader 5
In previous code I used the time to detect a new bar. This time let’s use the bars count to detect a new bar. it’s way lighter and faster than using the time method. Declare the variables in integer data type to store the bar counts.  Assign the bars count for the “BarsTotal_OnInt” at the