i have the below code to scan for tickers that show 3m candle breakout below pre market lows. for me, it doesnt return anything and wondering what could be wrong
Code:
# Advanced Premarket Low Breakdown Scan
input preMarketStart = 0900;
input marketOpen = 1430;
input volumeMultiplier = 1.5;
def isPremarket = SecondsFromTime(preMarketStart) >= 0 and SecondsTillTime(marketOpen) > 0;
def isRegular = SecondsFromTime(marketOpen) >= 0;
# Track Premarket Low
def pmLow = CompoundValue(1,
if isPremarket then
if IsNaN(pmLow[1]) then low
else Min(low, pmLow[1])
else pmLow[1],
low);
# Average volume
def avgVol = Average(volume, 20);
# Detect first cross below PM low
def breakDown = close crosses below pmLow;
# Volume confirmation
def highVol = volume > avgVol * volumeMultiplier;
# Final scan condition
plot scan = isRegular and breakDown and highVol;