TOS Script for Fair Value Gap Indicator
I had ChatGPT write a ThinkorSwim script for a study that shows an arrow on the 3rd candle of a Fair Value Gap. I have it set for a minimum of 0.5 points but you can customize that. I find it useful so I thought I'd share. Here you go! (I also have the engulfing candle pattern turned on in TOS though none are showing in this screenshot.)
# ==== FVG Arrow — Confirmation Bar (Directional) ====
# Bullish FVG = arrow UP below the bar
# Bearish FVG = arrow DOWN above the bar
input minGapPoints = 0.50; # ES/MES = 2 ticks
input offsetTks = 10; # spacing in ticks
def t = TickSize();
def bn = BarNumber();
# FVG conditions (current vs bar[2])
def bullGap = low > high[2] and (low - high[2]) >= minGapPoints;
def bearGap = high < low[2] and (low[2] - high) >= minGapPoints;
def fvgNow = bn > 2 and (bullGap or bearGap);
# --- Bullish arrow (up, under candle) ---
plot BullArrow = if bullGap then low - offsetTks * t else Double.NaN;
BullArrow.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
BullArrow.SetDefaultColor(Color.ORANGE);
BullArrow.SetLineWeight(1);
# --- Bearish arrow (down, above candle) ---
plot BearArrow = if bearGap then high + offsetTks * t else Double.NaN;
BearArrow.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
BearArrow.SetDefaultColor(Color.ORANGE);
BearArrow.SetLineWeight(1);
1
0 comments
Esther Tester
3
TOS Script for Fair Value Gap Indicator
InvestCEO with Kyle Henris
skool.com/investceo-with-kyle-henris-4723
Day Trading helped me create my dream lifestyle. This group is dedicated to help you do the same by giving you the roadmap that helped get me here.
Leaderboard (30-day)
Powered by