# 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?
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Start a new thread and receive assistance from our community.
useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.
We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.
If you are new, or just looking for guidance, here are some helpful links to get you started.