# Scan - Comment out (#) the one you don't want
Ichimoku()."Kijun" crosses above MAX(Ichimoku()."Span A", Ichimoku()."Span B")
# Ichimoku()."Kijun" crosses below Min(Ichimoku()."Span A", Ichimoku()."Span B")
Oops, that's not the whole code.No Problem, I look forward to seeing what you find!
input length = 14;
input calcLength = 5;
input smoothLength = 3;
def o = open;
def c = close;
def data = fold i = 0 to length
with s
do s + (if c > getValue(o, i)
then 1
else if c < getValue(o, i)
then - 1
else 0);
def EMA5 = ExpAverage(data, calcLength);
def Main = ExpAverage(EMA5, smoothLength);
def Signal = ExpAverage(Main, smoothLength);
plot isTrue = if Main > Signal then 1 else 0;
AssignBackgroundColor(if Main > Signal
then color.green
else color.red);
# Billy Bob's Better Gap Indicator for Column alert
# Cumulative Volume During An Active Period
# Mobius
# Chat Room Request 05.01.2018
declare lower;
def MACD_Calc = expAverage(close, 12)-expAverage(close, 26);
def SIGNAL = average(MACD_Calc, 9);
def OSMAc = MACD_Calc - SIGNAL;
def OSMAh = Highest(OSMAc,52);
def OSMAl = Lowest(OSMAc,52);
plot OSMA = (OSMAc-OSMAl)/(OSMAh-OSMAl)*100;
OSMA.AssignValueColor(Color.WHITE);
AssignBackgroundColor(if OSMA >= 50 then Color.UPTICK else Color.DOWNTICK);
# Premarket Gap-Up Scan
# Run Scan at premarket on one minute aggregation.
# Will not be accurate after hours or prior to midnight
# Mobius
def MarketClosePrice = if getTime() crosses RegularTradingEnd(getYYYYMMDD())
then close
else MarketClosePrice[1];
plot PreMarketScan = getTime() < RegularTradingStart(getYYYYMMDD()) and
close(priceType = "LAST") > MarketClosePrice * 1.01;
# End Scan Code
I used to use the bollinger/keltner channel squeeze but i realized it kicks in way behind price movement and more than likely you are missing the move. Then i started to use the laguerre with fractal energy to indicate whipsaw/sideways phases. The rule is as long as fe>0.6, then sideways move and as soon as fe<0.6 and going lower, the move is vertical either way until it cools off around fe<.3. That’s how i determine squeeze v. MoveWhat is the squeeZe scan you use?