This handy little screener allows you to easily detect “gaps“.
Very useful especially on the stocks market, so you can scan a number of markets very quickly.
You are free to do what you want, depending on your strategy approach : continuation gap , attempt of gap filling, etc.
Here is the code of the screener, to detect them .
Remember to select the desired market (eg “Euronext” ) and timeframe ( for example, ” Daily “).
REM gaps
c1= low - high[1] > 0.0001
c2= low[1] - high > 0.0001
c3 = volume > 100000
gap = (c1 or c2) and c3
screener[gap]
Here is the code for the indicator :
gap = 0
c1 = low - high[1] > 0.0001
IF c1 THEN
gap = 1
ENDIF
c2 = low[1] - high > 0.0001
IF c2 THEN
gap = -1
ENDIF
return gap as "GAP"
You can set the green or red color for the bullish or bearish gap (as shown on the picture)