The concept of this indicator is simple. We look for exhaustion in gap up and gap down. Look for potential trade ideas the following day.
Some examples:
Add the script above as an indicator, then switch over to the Scan tab and set up your scanner to something like this:
The timeframe of your scanner should be set to D (Daily).
Keep in mind that this indicator does not specify the value of the gap. You may find some edge or increase your probability if you look for notable gap ups or gap downs. Small gaps tend to decrease the chance of a follow-through day. I hope that helps.
- Stock gapped up but ended the day red. This indicates a potential bearish move.
- Stock gapped down but ended the day green. This indicates a potential bullish move.
Some examples:
thinkScript Code
Code:
# Exhaustion Gap Reversal
# Assembled by BenTen at UseThinkScript.com
input aggregationPeriod = AggregationPeriod.DAY;
def open = open(period = aggregationPeriod);
def close = close(period = aggregationPeriod);
def h1 = high(period = aggregationPeriod)[1];
def l1 = low(period = aggregationPeriod)[1];
def prev_close = close(period = aggregationPeriod)[1];
def o = open;
def c = prev_close;
def gu = o > c;
def gd = o < c;
def diff = o - c;
def av = (o + c) / 2;
def d = (diff / av) * 100;
def gapup = gu and d > 1;
def gapdown = gd and d < -1;
def IsUp = close > open;
def IsDown = close < open;
AssignPriceColor(if gapdown and isUp then color.green else if gapup and isdown then color.red else color.gray);
def condition = gapdown[1] and isUp[1] or gapup[1] and isdown[1];
plot preh = if condition then h1 else double.nan;
preh.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
plot prel = if condition then l1 else double.nan;
prel.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Scanner
Code:
# Exhaustion Gap Reversal
# Assembled by BenTen at UseThinkScript.com
input aggregationPeriod = AggregationPeriod.DAY;
def open = open(period = aggregationPeriod);
def close = close(period = aggregationPeriod);
def h1 = high(period = aggregationPeriod)[1];
def l1 = low(period = aggregationPeriod)[1];
def prev_close = close(period = aggregationPeriod)[1];
def o = open;
def c = prev_close;
def gu = o > c;
def gd = o < c;
def diff = o - c;
def av = (o + c) / 2;
def d = (diff / av) * 100;
def gapup = gu and d > 1;
def gapdown = gd and d < -1;
def IsUp = close > open;
def IsDown = close < open;
plot bullish = gapdown and isUp;
bullish.SetPaintingStrategy(PaintingStrategy.Boolean_arrow_Up);
plot bearish = gapup and isdown;
bearish.SetPaintingStrategy(PaintingStrategy.Boolean_arrow_DOWN);
Add the script above as an indicator, then switch over to the Scan tab and set up your scanner to something like this:
The timeframe of your scanner should be set to D (Daily).
Keep in mind that this indicator does not specify the value of the gap. You may find some edge or increase your probability if you look for notable gap ups or gap downs. Small gaps tend to decrease the chance of a follow-through day. I hope that helps.
Last edited: