The algorithm is searching for situations, where the range of the last 8 bars is wider than 60 pips. Opens a long position if the close is above and a short positions if the close is below the range.
Unfortunately I only have backtest data since 11/2015 for the 5 minute chart. Maybe somebody can backtest with more data? Thanks!
// Timeframe M5
// EURUSD (IG - Markets)
// Spread 2 pips
DEFPARAM CumulateOrders = False
DEFPARAM FLATBEFORE = 080000
DEFPARAM FLATAFTER = 210000
IF (abs(close-open[8]) > 0.006) THEN
IF (close > open[8]) THEN
BUY 1 CONTRACTS AT MARKET
SET STOP pLOSS 50
SET TARGET pPROFIT 225
ENDIF
IF (close < open[8]) THEN
SELLSHORT 1 CONTRACTS AT MARKET
SET STOP pLOSS 50
SET TARGET pPROFIT 225
ENDIF
ENDIF