Where are you seeing potential? Why?
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Really like your price/ date projections.. Are you manually annotating the chart ?View attachment 27412View attachment 27413Quick look at BABA:
Price has already broken out of a cup-with-handle. A retest of the breakout/handle zone is likely (early Monday or after the open). If that holds, continuation toward the projected targets is in play.
Above that sits a key confluence zones at the potential inverted H&S neckline and both targets above.
Pattern resistance (neckline)
Fibonacci levels line up with projected levels
Volume profile HVN also line up with projected levels
From here:
Break above neckline opens larger IH&S reversal
Both paths are mapped now it’s up to price…
assuming no surprise Trump tweets nuke the setup![]()
The core idea is to focus only on strong, institutionally driven uptrends (Stage 2) and avoid random scanning or early breakout chasing. Each day begins by filtering for stocks already trading above key moving averages, specifically the 20 EMA and 50 EMA, because this confirms that price is in a sustained uptrend rather than a weak or transitioning phase. From there, the focus shifts to strength, selecting stocks that are outperforming the broader market (SPY/QQQ) and showing strong recent performance (weekly/monthly gains), which indicates institutional participation.Thank you atcsam
I wish there was a way to just plug a few numbers into a study and have it generate full technical analysis with directional projections and estimated dates.That would save me a lot of time. I usually won’t spend this much time charting unless I think it has the potential to be a high-value trade. Anyhow, if you ever figure out how to do that with the ancient temple ThinkScript
, please let me know.
As for the analysis, this is just the most likely path I see if the pattern follows through. The existing price structure gives enough information to build directional projections, so my thought is: if there is enough structure to project direction and price targets, why not also add estimated dates to help with option selection?
I do think there is enough room in the channel for at least 75% of the projected move, giving MM plenty of room to do his thing on the way up. That said, I would actually like to see a healthy retest of the breakout area, somewhere around $130 or so, before the larger move continues. That would help confirm the breakout and give participants more confidence that the move is real.
There is still the neckline above to deal with, along with other resistance zones, so we’ll see what price does on Monday. As I’m sure you know, patterns can fail and will fail. Current market sentiment is still a little nervous, so anything can happen.
By the way, i wish more people would share their findings on good setups. Doesn't need to be a technical charting analysis, just a ticker and what's going on would be great.
# =========================
# STAGE 2 TREND + COMPRESSION SCAN
# =========================
# --- MOVING AVERAGES ---
def ema20 = ExpAverage(close, 20);
def ema50 = ExpAverage(close, 50);
# --- TREND (Stage 2) ---
def trendUp =
close > ema20 and
close > ema50 and
ema20 > ema50;
# --- STRENGTH (Relative Performance) ---
def strength =
close / close[20] > 1.05;
# --- VOLUME (Institutional Interest) ---
def volFilter =
volume > Average(volume, 50);
# --- COMPRESSION (Tight Range) ---
def range =
Highest(high, 10) - Lowest(low, 10);
def compression =
range / close < 0.05;
# =========================
# FINAL SCAN CONDITION
# =========================
plot scan =
trendUp and
strength and
volFilter and
compression;
# =========================
# WATCHLIST: TREND + SETUP STATE
# =========================
# --- MOVING AVERAGES ---
def ema20 = ExpAverage(close, 20);
def ema50 = ExpAverage(close, 50);
# --- TREND ---
def trendUp =
close > ema20 and
close > ema50 and
ema20 > ema50;
def trendDown =
close < ema20 and
close < ema50 and
ema20 < ema50;
# --- COMPRESSION ---
def range =
Highest(high, 10) - Lowest(low, 10);
def compression =
range / close < 0.05;
# --- BREAKOUT ---
def breakout =
close >= Highest(high, 10);
# --- EARLY BUILD (tight + trend) ---
def building =
trendUp and compression;
# --- READY (tight + slight expansion starting) ---
def ready =
building and close > close[1];
# =========================
# LABEL OUTPUT
# =========================
AddLabel(yes,
if breakout then "🔥 BREAKOUT"
else if ready then "⚡ READY"
else if building then "🟡 BUILDING"
else if trendUp then "🟢 TREND"
else if trendDown then "🔴 DOWN"
else "—",
if breakout then Color.CYAN
else if ready then Color.YELLOW
else if building then Color.ORANGE
else if trendUp then Color.GREEN
else if trendDown then Color.RED
else Color.GRAY
);
Perfect example of why Homework matters. I generally stay away from Chinese stocks — I knew they took a hit, but I never dug into the structural reasons behind it. Your note makes the whole decoupling move make a lot more sense. TA has its place, just not the full picture.If your trades are centered on stocks with high institutional liquidity, read on.
If you trade low float, meme, IPO, high volality type stocks with no institutional backing; you are already experienced trading stock like $BABA and don't need to read the following.
The Anatomy Of A Meme-ified Blue Chip
August 28, 2024: The Great Decoupling. To avoid US delisting risks, institutions began swapping their US ADRs for Hong Kong ordinary shares. This caused $BABA's US institutional ownership to crater to 13.47%
So who does that 10 million volume belong to? The 85% is made up of retail traders.
You are looking at the retail trading swarm in all its glory. A million little traders driving a big stock.
So what is the problem?
Institutional Bots are the math behind our technical indicators. We know they will trigger Long when the price crosses above the 200-day SMA or when the RSI climbs out of oversold territory at a key structural level. Swing and day trading were born from this—the ability to front-run the institutional algorithms.
But stocks without an institutional floor do not respect these indicators.
The Psychology of the BABA Swarm: Bag-Holders vs. High-Hopers
A perusal of the trading rooms (Subreddits, Stocktwits, and Discord groups) reveals a market divided.
» The Defiant Bag-Holders:They preach HODL at every dip. In actuality, they are looking for an exit. We saw this on Thursday—as soon as the price broke up $140, the HODLers became sellers, desperate to just break even. This created a massive supply overhead that suppressed the rally.» The High-Hopers:This group believes the confluence of the May 14th Trump-Xi Summit and the May 21st Earnings is prophetic. A guaranteed catalyst to drive the price to $190.
The Prediction Probability Collapse
A week ago, prediction markets like Polymarket and Kalshi were pricing an 89% probability that the Beijing summit would occur on schedule. As of tonight, that number has cratered to 70.5%.
The catalyst for this 18-point drop was a hawkish pivot from the US State Department:
Tonight's headline:22:30 News Bot: The US State Department has reportedly ordered a global warning over alleged AI IP theft involving DeepSeek and other Chinese firms.
There are those that trade BABA and make serious money. There are tens of thousands of retail traders that believe this stock will make them rich and nothing in this write-up says that they are wrong.
This write-up was soley for the purpose, of pointing out to newer traders; that it is a different kind of stock.
# Volumatic Fair Value Gaps - thinkScript Adaptation
# Original Pine Script: "Volumatic Fair Value Gaps [BigBeluga]"
# Original copyright (c) BigBeluga
# Licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0
# https://creativecommons.org/licenses/by-nc-sa/4.0/
# Adaptation and modifications: OpenAI, 2026-08-30. Same license.
#
# COMPLETE, STANDALONE UPPER STUDY. LABELS INSTEAD OF A TABLE.
#
# PRESERVED:
# - Original 3-candle bullish/bearish gap conditions.
# - Gap size > 10% of the largest diff in the 1000-bar filter window.
# - Strict far-edge mitigation: below bullish bottom / above bearish top.
# - Up to 10 active zones; oldest is replaced only when all slots are full.
#
# ADAPTATIONS / LIMITS:
# - TOS cannot request lower-timeframe volume arrays on a higher-timeframe chart.
# Volume is the MIDDLE CANDLE'S TOTAL chart volume, not the Pine intrabar sum.
# Bullish/bearish volume percentages are deliberately NOT fabricated.
# - Deterministic overlap rule: newest gap replaces older overlapping gaps.
# This differs from the Pine script's nested array-removal loop.
# - Clouds show zone lifecycles on real bars. Historical footprints remain
# after mitigation; only active zones count in the labels.
# - No box backdating, no 25-bar future projection, no future-price references.
# - LIVE by default, like the source. A developing candle can create/remove
# a provisional zone. completedBarsOnly=yes processes the prior closed bar.
# - Slot replacement includes a one-bar visual break to avoid diagonal clouds.
# - This is a gap-location study, NOT buy/sell orders or a win-rate model.
declare upper;
input mitigationSource = {default Close, HighLow};
input bullGaps = yes;
input bearGaps = yes;
input showZones = yes;
input showBorders = yes;
input showLabels = yes;
input showVolumeLabels = yes;
input completedBarsOnly = no;
input filterLookback = 1000;
input minimumRelativeGap = 10.0;
input removeOverlaps = yes;
DefineGlobalColor("BullFVG", CreateColor(26, 194, 216));
DefineGlobalColor("BearFVG", CreateColor(216, 118, 26));
Assert(filterLookback >= 1, "filterLookback must be at least 1.");
Assert(minimumRelativeGap >= 0, "minimumRelativeGap cannot be negative.");
def bn = BarNumber();
def realBar = !IsNaN(close);
# At the 100th percentile, nearest-rank percentile equals the maximum.
# Preserve the original diff branch based on the middle candle's direction.
def diff = if close[1] > open[1]
then (if low != 0 then (low - high[2]) / low * 100 else Double.NaN)
else (if high != 0 then (low[2] - high) / high * 100 else Double.NaN);
def largestDiff = Highest(diff, filterLookback);
def relativeGap = if !IsNaN(largestDiff) and largestDiff > 0
then diff / largestDiff * 100 else 0;
def filterPass = relativeGap > minimumRelativeGap;
def rawBull = high[2] < low and high[2] < high[1]
and low[2] < low and filterPass;
def rawBear = low[2] > high and low[2] > low[1]
and high[2] > high and filterPass;
# All event fields and mitigation prices share the selected processing bar.
def eventReady = realBar and
(if completedBarsOnly then bn > 102 else bn > 101);
def makeBull = eventReady and bullGaps and
(if completedBarsOnly then rawBull[1] else rawBull);
def makeBear = eventReady and bearGaps and
(if completedBarsOnly then rawBear[1] else rawBear);
def newGap = makeBull or makeBear;
def gapSide = if makeBull then 1 else -1;
def newTop = if makeBull
then (if completedBarsOnly then low[1] else low)
else (if completedBarsOnly then low[3] else low[2]);
def newBottom = if makeBull
then (if completedBarsOnly then high[3] else high[2])
else (if completedBarsOnly then high[1] else high);
def middleVolume = if completedBarsOnly then volume[2] else volume[1];
def newVolumeKnown = !IsNaN(middleVolume);
def newVolume = if newVolumeKnown then middleVolume else 0;
def processClose = if completedBarsOnly then close[1] else close;
def processLow = if completedBarsOnly then low[1] else low;
def processHigh = if completedBarsOnly then high[1] else high;
def bullMitigationPrice = if mitigationSource == mitigationSource.Close
then processClose else processLow;
def bearMitigationPrice = if mitigationSource == mitigationSource.Close
then processClose else processHigh;
# Declare slot state before the history-based allocation expressions.
def active1; def top1; def bottom1; def side1;
def born1; def vol1; def volumeKnown1;
def active2; def top2; def bottom2; def side2;
def born2; def vol2; def volumeKnown2;
def active3; def top3; def bottom3; def side3;
def born3; def vol3; def volumeKnown3;
def active4; def top4; def bottom4; def side4;
def born4; def vol4; def volumeKnown4;
def active5; def top5; def bottom5; def side5;
def born5; def vol5; def volumeKnown5;
def active6; def top6; def bottom6; def side6;
def born6; def vol6; def volumeKnown6;
def active7; def top7; def bottom7; def side7;
def born7; def vol7; def volumeKnown7;
def active8; def top8; def bottom8; def side8;
def born8; def vol8; def volumeKnown8;
def active9; def top9; def bottom9; def side9;
def born9; def vol9; def volumeKnown9;
def active10; def top10; def bottom10; def side10;
def born10; def vol10; def volumeKnown10;
# Retire mitigated zones first. On overlap, prefer the newly detected zone.
def keep1 = active1[1] == 1
and !(realBar and
((side1[1] == 1 and bullMitigationPrice < bottom1[1])
or (side1[1] == -1 and bearMitigationPrice > top1[1])))
and !(newGap and removeOverlaps
and newTop > bottom1[1] and newBottom < top1[1]);
def keep2 = active2[1] == 1
and !(realBar and
((side2[1] == 1 and bullMitigationPrice < bottom2[1])
or (side2[1] == -1 and bearMitigationPrice > top2[1])))
and !(newGap and removeOverlaps
and newTop > bottom2[1] and newBottom < top2[1]);
def keep3 = active3[1] == 1
and !(realBar and
((side3[1] == 1 and bullMitigationPrice < bottom3[1])
or (side3[1] == -1 and bearMitigationPrice > top3[1])))
and !(newGap and removeOverlaps
and newTop > bottom3[1] and newBottom < top3[1]);
def keep4 = active4[1] == 1
and !(realBar and
((side4[1] == 1 and bullMitigationPrice < bottom4[1])
or (side4[1] == -1 and bearMitigationPrice > top4[1])))
and !(newGap and removeOverlaps
and newTop > bottom4[1] and newBottom < top4[1]);
def keep5 = active5[1] == 1
and !(realBar and
((side5[1] == 1 and bullMitigationPrice < bottom5[1])
or (side5[1] == -1 and bearMitigationPrice > top5[1])))
and !(newGap and removeOverlaps
and newTop > bottom5[1] and newBottom < top5[1]);
def keep6 = active6[1] == 1
and !(realBar and
((side6[1] == 1 and bullMitigationPrice < bottom6[1])
or (side6[1] == -1 and bearMitigationPrice > top6[1])))
and !(newGap and removeOverlaps
and newTop > bottom6[1] and newBottom < top6[1]);
def keep7 = active7[1] == 1
and !(realBar and
((side7[1] == 1 and bullMitigationPrice < bottom7[1])
or (side7[1] == -1 and bearMitigationPrice > top7[1])))
and !(newGap and removeOverlaps
and newTop > bottom7[1] and newBottom < top7[1]);
def keep8 = active8[1] == 1
and !(realBar and
((side8[1] == 1 and bullMitigationPrice < bottom8[1])
or (side8[1] == -1 and bearMitigationPrice > top8[1])))
and !(newGap and removeOverlaps
and newTop > bottom8[1] and newBottom < top8[1]);
def keep9 = active9[1] == 1
and !(realBar and
((side9[1] == 1 and bullMitigationPrice < bottom9[1])
or (side9[1] == -1 and bearMitigationPrice > top9[1])))
and !(newGap and removeOverlaps
and newTop > bottom9[1] and newBottom < top9[1]);
def keep10 = active10[1] == 1
and !(realBar and
((side10[1] == 1 and bullMitigationPrice < bottom10[1])
or (side10[1] == -1 and bearMitigationPrice > top10[1])))
and !(newGap and removeOverlaps
and newTop > bottom10[1] and newBottom < top10[1]);
def oldestBorn = Min(born1[1], Min(born2[1], Min(born3[1], Min(born4[1], Min(born5[1], Min(born6[1], Min(born7[1], Min(born8[1], Min(born9[1], born10[1])))))))));
def place = if !newGap then 0
else if !keep1 then 1
else if !keep2 then 2
else if !keep3 then 3
else if !keep4 then 4
else if !keep5 then 5
else if !keep6 then 6
else if !keep7 then 7
else if !keep8 then 8
else if !keep9 then 9
else if !keep10 then 10
else if born1[1] == oldestBorn then 1
else if born2[1] == oldestBorn then 2
else if born3[1] == oldestBorn then 3
else if born4[1] == oldestBorn then 4
else if born5[1] == oldestBorn then 5
else if born6[1] == oldestBorn then 6
else if born7[1] == oldestBorn then 7
else if born8[1] == oldestBorn then 8
else if born9[1] == oldestBorn then 9
else 10;
# Fixed-size memory: inactive slots are reused before any live zone is evicted.
active1 = CompoundValue(1, if place == 1 then 1 else if keep1 then 1 else 0, 0);
top1 = CompoundValue(1, if place == 1 then newTop else top1[1], 0);
bottom1 = CompoundValue(1, if place == 1 then newBottom else bottom1[1], 0);
side1 = CompoundValue(1, if place == 1 then gapSide else side1[1], 0);
born1 = CompoundValue(1, if place == 1 then bn else born1[1], 0);
vol1 = CompoundValue(1, if place == 1 then newVolume else vol1[1], 0);
volumeKnown1 = CompoundValue(1,
if place == 1 then newVolumeKnown else volumeKnown1[1], 0);
active2 = CompoundValue(1, if place == 2 then 1 else if keep2 then 1 else 0, 0);
top2 = CompoundValue(1, if place == 2 then newTop else top2[1], 0);
bottom2 = CompoundValue(1, if place == 2 then newBottom else bottom2[1], 0);
side2 = CompoundValue(1, if place == 2 then gapSide else side2[1], 0);
born2 = CompoundValue(1, if place == 2 then bn else born2[1], 0);
vol2 = CompoundValue(1, if place == 2 then newVolume else vol2[1], 0);
volumeKnown2 = CompoundValue(1,
if place == 2 then newVolumeKnown else volumeKnown2[1], 0);
active3 = CompoundValue(1, if place == 3 then 1 else if keep3 then 1 else 0, 0);
top3 = CompoundValue(1, if place == 3 then newTop else top3[1], 0);
bottom3 = CompoundValue(1, if place == 3 then newBottom else bottom3[1], 0);
side3 = CompoundValue(1, if place == 3 then gapSide else side3[1], 0);
born3 = CompoundValue(1, if place == 3 then bn else born3[1], 0);
vol3 = CompoundValue(1, if place == 3 then newVolume else vol3[1], 0);
volumeKnown3 = CompoundValue(1,
if place == 3 then newVolumeKnown else volumeKnown3[1], 0);
active4 = CompoundValue(1, if place == 4 then 1 else if keep4 then 1 else 0, 0);
top4 = CompoundValue(1, if place == 4 then newTop else top4[1], 0);
bottom4 = CompoundValue(1, if place == 4 then newBottom else bottom4[1], 0);
side4 = CompoundValue(1, if place == 4 then gapSide else side4[1], 0);
born4 = CompoundValue(1, if place == 4 then bn else born4[1], 0);
vol4 = CompoundValue(1, if place == 4 then newVolume else vol4[1], 0);
volumeKnown4 = CompoundValue(1,
if place == 4 then newVolumeKnown else volumeKnown4[1], 0);
active5 = CompoundValue(1, if place == 5 then 1 else if keep5 then 1 else 0, 0);
top5 = CompoundValue(1, if place == 5 then newTop else top5[1], 0);
bottom5 = CompoundValue(1, if place == 5 then newBottom else bottom5[1], 0);
side5 = CompoundValue(1, if place == 5 then gapSide else side5[1], 0);
born5 = CompoundValue(1, if place == 5 then bn else born5[1], 0);
vol5 = CompoundValue(1, if place == 5 then newVolume else vol5[1], 0);
volumeKnown5 = CompoundValue(1,
if place == 5 then newVolumeKnown else volumeKnown5[1], 0);
active6 = CompoundValue(1, if place == 6 then 1 else if keep6 then 1 else 0, 0);
top6 = CompoundValue(1, if place == 6 then newTop else top6[1], 0);
bottom6 = CompoundValue(1, if place == 6 then newBottom else bottom6[1], 0);
side6 = CompoundValue(1, if place == 6 then gapSide else side6[1], 0);
born6 = CompoundValue(1, if place == 6 then bn else born6[1], 0);
vol6 = CompoundValue(1, if place == 6 then newVolume else vol6[1], 0);
volumeKnown6 = CompoundValue(1,
if place == 6 then newVolumeKnown else volumeKnown6[1], 0);
active7 = CompoundValue(1, if place == 7 then 1 else if keep7 then 1 else 0, 0);
top7 = CompoundValue(1, if place == 7 then newTop else top7[1], 0);
bottom7 = CompoundValue(1, if place == 7 then newBottom else bottom7[1], 0);
side7 = CompoundValue(1, if place == 7 then gapSide else side7[1], 0);
born7 = CompoundValue(1, if place == 7 then bn else born7[1], 0);
vol7 = CompoundValue(1, if place == 7 then newVolume else vol7[1], 0);
volumeKnown7 = CompoundValue(1,
if place == 7 then newVolumeKnown else volumeKnown7[1], 0);
active8 = CompoundValue(1, if place == 8 then 1 else if keep8 then 1 else 0, 0);
top8 = CompoundValue(1, if place == 8 then newTop else top8[1], 0);
bottom8 = CompoundValue(1, if place == 8 then newBottom else bottom8[1], 0);
side8 = CompoundValue(1, if place == 8 then gapSide else side8[1], 0);
born8 = CompoundValue(1, if place == 8 then bn else born8[1], 0);
vol8 = CompoundValue(1, if place == 8 then newVolume else vol8[1], 0);
volumeKnown8 = CompoundValue(1,
if place == 8 then newVolumeKnown else volumeKnown8[1], 0);
active9 = CompoundValue(1, if place == 9 then 1 else if keep9 then 1 else 0, 0);
top9 = CompoundValue(1, if place == 9 then newTop else top9[1], 0);
bottom9 = CompoundValue(1, if place == 9 then newBottom else bottom9[1], 0);
side9 = CompoundValue(1, if place == 9 then gapSide else side9[1], 0);
born9 = CompoundValue(1, if place == 9 then bn else born9[1], 0);
vol9 = CompoundValue(1, if place == 9 then newVolume else vol9[1], 0);
volumeKnown9 = CompoundValue(1,
if place == 9 then newVolumeKnown else volumeKnown9[1], 0);
active10 = CompoundValue(1, if place == 10 then 1 else if keep10 then 1 else 0, 0);
top10 = CompoundValue(1, if place == 10 then newTop else top10[1], 0);
bottom10 = CompoundValue(1, if place == 10 then newBottom else bottom10[1], 0);
side10 = CompoundValue(1, if place == 10 then gapSide else side10[1], 0);
born10 = CompoundValue(1, if place == 10 then bn else born10[1], 0);
vol10 = CompoundValue(1, if place == 10 then newVolume else vol10[1], 0);
volumeKnown10 = CompoundValue(1,
if place == 10 then newVolumeKnown else volumeKnown10[1], 0);
# Cloud input order supplies the direction color without dynamic color arguments.
# Plot wrappers keep recursive state out of direct AddCloud arguments.
# Boundaries are drawn only on real bars while each zone was active.
def draw1 = showZones and realBar and active1 == 1
and (active1[1] == 0 or born1 == born1[1]);
plot Zone1A = if draw1
then (if side1 == 1 then top1 else bottom1)
else Double.NaN;
plot Zone1B = if draw1
then (if side1 == 1 then bottom1 else top1)
else Double.NaN;
Zone1A.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Zone1B.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Zone1A.AssignValueColor(if side1 == 1 then GlobalColor("BullFVG") else GlobalColor("BearFVG"));
Zone1B.AssignValueColor(if side1 == 1 then GlobalColor("BullFVG") else GlobalColor("BearFVG"));
Zone1A.SetHiding(!showBorders);
Zone1B.SetHiding(!showBorders);
Zone1A.HideBubble(); Zone1B.HideBubble();
Zone1A.HideTitle(); Zone1B.HideTitle();
AddCloud(Zone1A, Zone1B, GlobalColor("BullFVG"), GlobalColor("BearFVG"));
def draw2 = showZones and realBar and active2 == 1
and (active2[1] == 0 or born2 == born2[1]);
plot Zone2A = if draw2
then (if side2 == 1 then top2 else bottom2)
else Double.NaN;
plot Zone2B = if draw2
then (if side2 == 1 then bottom2 else top2)
else Double.NaN;
Zone2A.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Zone2B.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Zone2A.AssignValueColor(if side2 == 1 then GlobalColor("BullFVG") else GlobalColor("BearFVG"));
Zone2B.AssignValueColor(if side2 == 1 then GlobalColor("BullFVG") else GlobalColor("BearFVG"));
Zone2A.SetHiding(!showBorders);
Zone2B.SetHiding(!showBorders);
Zone2A.HideBubble(); Zone2B.HideBubble();
Zone2A.HideTitle(); Zone2B.HideTitle();
AddCloud(Zone2A, Zone2B, GlobalColor("BullFVG"), GlobalColor("BearFVG"));
def draw3 = showZones and realBar and active3 == 1
and (active3[1] == 0 or born3 == born3[1]);
plot Zone3A = if draw3
then (if side3 == 1 then top3 else bottom3)
else Double.NaN;
plot Zone3B = if draw3
then (if side3 == 1 then bottom3 else top3)
else Double.NaN;
Zone3A.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Zone3B.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Zone3A.AssignValueColor(if side3 == 1 then GlobalColor("BullFVG") else GlobalColor("BearFVG"));
Zone3B.AssignValueColor(if side3 == 1 then GlobalColor("BullFVG") else GlobalColor("BearFVG"));
Zone3A.SetHiding(!showBorders);
Zone3B.SetHiding(!showBorders);
Zone3A.HideBubble(); Zone3B.HideBubble();
Zone3A.HideTitle(); Zone3B.HideTitle();
AddCloud(Zone3A, Zone3B, GlobalColor("BullFVG"), GlobalColor("BearFVG"));
def draw4 = showZones and realBar and active4 == 1
and (active4[1] == 0 or born4 == born4[1]);
plot Zone4A = if draw4
then (if side4 == 1 then top4 else bottom4)
else Double.NaN;
plot Zone4B = if draw4
then (if side4 == 1 then bottom4 else top4)
else Double.NaN;
Zone4A.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Zone4B.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Zone4A.AssignValueColor(if side4 == 1 then GlobalColor("BullFVG") else GlobalColor("BearFVG"));
Zone4B.AssignValueColor(if side4 == 1 then GlobalColor("BullFVG") else GlobalColor("BearFVG"));
Zone4A.SetHiding(!showBorders);
Zone4B.SetHiding(!showBorders);
Zone4A.HideBubble(); Zone4B.HideBubble();
Zone4A.HideTitle(); Zone4B.HideTitle();
AddCloud(Zone4A, Zone4B, GlobalColor("BullFVG"), GlobalColor("BearFVG"));
def draw5 = showZones and realBar and active5 == 1
and (active5[1] == 0 or born5 == born5[1]);
plot Zone5A = if draw5
then (if side5 == 1 then top5 else bottom5)
else Double.NaN;
plot Zone5B = if draw5
then (if side5 == 1 then bottom5 else top5)
else Double.NaN;
Zone5A.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Zone5B.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Zone5A.AssignValueColor(if side5 == 1 then GlobalColor("BullFVG") else GlobalColor("BearFVG"));
Zone5B.AssignValueColor(if side5 == 1 then GlobalColor("BullFVG") else GlobalColor("BearFVG"));
Zone5A.SetHiding(!showBorders);
Zone5B.SetHiding(!showBorders);
Zone5A.HideBubble(); Zone5B.HideBubble();
Zone5A.HideTitle(); Zone5B.HideTitle();
AddCloud(Zone5A, Zone5B, GlobalColor("BullFVG"), GlobalColor("BearFVG"));
def draw6 = showZones and realBar and active6 == 1
and (active6[1] == 0 or born6 == born6[1]);
plot Zone6A = if draw6
then (if side6 == 1 then top6 else bottom6)
else Double.NaN;
plot Zone6B = if draw6
then (if side6 == 1 then bottom6 else top6)
else Double.NaN;
Zone6A.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Zone6B.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Zone6A.AssignValueColor(if side6 == 1 then GlobalColor("BullFVG") else GlobalColor("BearFVG"));
Zone6B.AssignValueColor(if side6 == 1 then GlobalColor("BullFVG") else GlobalColor("BearFVG"));
Zone6A.SetHiding(!showBorders);
Zone6B.SetHiding(!showBorders);
Zone6A.HideBubble(); Zone6B.HideBubble();
Zone6A.HideTitle(); Zone6B.HideTitle();
AddCloud(Zone6A, Zone6B, GlobalColor("BullFVG"), GlobalColor("BearFVG"));
def draw7 = showZones and realBar and active7 == 1
and (active7[1] == 0 or born7 == born7[1]);
plot Zone7A = if draw7
then (if side7 == 1 then top7 else bottom7)
else Double.NaN;
plot Zone7B = if draw7
then (if side7 == 1 then bottom7 else top7)
else Double.NaN;
Zone7A.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Zone7B.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Zone7A.AssignValueColor(if side7 == 1 then GlobalColor("BullFVG") else GlobalColor("BearFVG"));
Zone7B.AssignValueColor(if side7 == 1 then GlobalColor("BullFVG") else GlobalColor("BearFVG"));
Zone7A.SetHiding(!showBorders);
Zone7B.SetHiding(!showBorders);
Zone7A.HideBubble(); Zone7B.HideBubble();
Zone7A.HideTitle(); Zone7B.HideTitle();
AddCloud(Zone7A, Zone7B, GlobalColor("BullFVG"), GlobalColor("BearFVG"));
def draw8 = showZones and realBar and active8 == 1
and (active8[1] == 0 or born8 == born8[1]);
plot Zone8A = if draw8
then (if side8 == 1 then top8 else bottom8)
else Double.NaN;
plot Zone8B = if draw8
then (if side8 == 1 then bottom8 else top8)
else Double.NaN;
Zone8A.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Zone8B.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Zone8A.AssignValueColor(if side8 == 1 then GlobalColor("BullFVG") else GlobalColor("BearFVG"));
Zone8B.AssignValueColor(if side8 == 1 then GlobalColor("BullFVG") else GlobalColor("BearFVG"));
Zone8A.SetHiding(!showBorders);
Zone8B.SetHiding(!showBorders);
Zone8A.HideBubble(); Zone8B.HideBubble();
Zone8A.HideTitle(); Zone8B.HideTitle();
AddCloud(Zone8A, Zone8B, GlobalColor("BullFVG"), GlobalColor("BearFVG"));
def draw9 = showZones and realBar and active9 == 1
and (active9[1] == 0 or born9 == born9[1]);
plot Zone9A = if draw9
then (if side9 == 1 then top9 else bottom9)
else Double.NaN;
plot Zone9B = if draw9
then (if side9 == 1 then bottom9 else top9)
else Double.NaN;
Zone9A.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Zone9B.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Zone9A.AssignValueColor(if side9 == 1 then GlobalColor("BullFVG") else GlobalColor("BearFVG"));
Zone9B.AssignValueColor(if side9 == 1 then GlobalColor("BullFVG") else GlobalColor("BearFVG"));
Zone9A.SetHiding(!showBorders);
Zone9B.SetHiding(!showBorders);
Zone9A.HideBubble(); Zone9B.HideBubble();
Zone9A.HideTitle(); Zone9B.HideTitle();
AddCloud(Zone9A, Zone9B, GlobalColor("BullFVG"), GlobalColor("BearFVG"));
def draw10 = showZones and realBar and active10 == 1
and (active10[1] == 0 or born10 == born10[1]);
plot Zone10A = if draw10
then (if side10 == 1 then top10 else bottom10)
else Double.NaN;
plot Zone10B = if draw10
then (if side10 == 1 then bottom10 else top10)
else Double.NaN;
Zone10A.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Zone10B.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Zone10A.AssignValueColor(if side10 == 1 then GlobalColor("BullFVG") else GlobalColor("BearFVG"));
Zone10B.AssignValueColor(if side10 == 1 then GlobalColor("BullFVG") else GlobalColor("BearFVG"));
Zone10A.SetHiding(!showBorders);
Zone10B.SetHiding(!showBorders);
Zone10A.HideBubble(); Zone10B.HideBubble();
Zone10A.HideTitle(); Zone10B.HideTitle();
AddCloud(Zone10A, Zone10B, GlobalColor("BullFVG"), GlobalColor("BearFVG"));
# LABELS: counts and summed middle-candle volume for ACTIVE zones only.
def bullCount = (if active1 == 1 and side1 == 1 then 1 else 0)
+ (if active2 == 1 and side2 == 1 then 1 else 0)
+ (if active3 == 1 and side3 == 1 then 1 else 0)
+ (if active4 == 1 and side4 == 1 then 1 else 0)
+ (if active5 == 1 and side5 == 1 then 1 else 0)
+ (if active6 == 1 and side6 == 1 then 1 else 0)
+ (if active7 == 1 and side7 == 1 then 1 else 0)
+ (if active8 == 1 and side8 == 1 then 1 else 0)
+ (if active9 == 1 and side9 == 1 then 1 else 0)
+ (if active10 == 1 and side10 == 1 then 1 else 0);
def bullVolume = (if active1 == 1 and side1 == 1 then vol1 else 0)
+ (if active2 == 1 and side2 == 1 then vol2 else 0)
+ (if active3 == 1 and side3 == 1 then vol3 else 0)
+ (if active4 == 1 and side4 == 1 then vol4 else 0)
+ (if active5 == 1 and side5 == 1 then vol5 else 0)
+ (if active6 == 1 and side6 == 1 then vol6 else 0)
+ (if active7 == 1 and side7 == 1 then vol7 else 0)
+ (if active8 == 1 and side8 == 1 then vol8 else 0)
+ (if active9 == 1 and side9 == 1 then vol9 else 0)
+ (if active10 == 1 and side10 == 1 then vol10 else 0);
def bullMissingVolume = (if active1 == 1 and side1 == 1 and !volumeKnown1 then 1 else 0)
+ (if active2 == 1 and side2 == 1 and !volumeKnown2 then 1 else 0)
+ (if active3 == 1 and side3 == 1 and !volumeKnown3 then 1 else 0)
+ (if active4 == 1 and side4 == 1 and !volumeKnown4 then 1 else 0)
+ (if active5 == 1 and side5 == 1 and !volumeKnown5 then 1 else 0)
+ (if active6 == 1 and side6 == 1 and !volumeKnown6 then 1 else 0)
+ (if active7 == 1 and side7 == 1 and !volumeKnown7 then 1 else 0)
+ (if active8 == 1 and side8 == 1 and !volumeKnown8 then 1 else 0)
+ (if active9 == 1 and side9 == 1 and !volumeKnown9 then 1 else 0)
+ (if active10 == 1 and side10 == 1 and !volumeKnown10 then 1 else 0);
def bearCount = (if active1 == 1 and side1 == -1 then 1 else 0)
+ (if active2 == 1 and side2 == -1 then 1 else 0)
+ (if active3 == 1 and side3 == -1 then 1 else 0)
+ (if active4 == 1 and side4 == -1 then 1 else 0)
+ (if active5 == 1 and side5 == -1 then 1 else 0)
+ (if active6 == 1 and side6 == -1 then 1 else 0)
+ (if active7 == 1 and side7 == -1 then 1 else 0)
+ (if active8 == 1 and side8 == -1 then 1 else 0)
+ (if active9 == 1 and side9 == -1 then 1 else 0)
+ (if active10 == 1 and side10 == -1 then 1 else 0);
def bearVolume = (if active1 == 1 and side1 == -1 then vol1 else 0)
+ (if active2 == 1 and side2 == -1 then vol2 else 0)
+ (if active3 == 1 and side3 == -1 then vol3 else 0)
+ (if active4 == 1 and side4 == -1 then vol4 else 0)
+ (if active5 == 1 and side5 == -1 then vol5 else 0)
+ (if active6 == 1 and side6 == -1 then vol6 else 0)
+ (if active7 == 1 and side7 == -1 then vol7 else 0)
+ (if active8 == 1 and side8 == -1 then vol8 else 0)
+ (if active9 == 1 and side9 == -1 then vol9 else 0)
+ (if active10 == 1 and side10 == -1 then vol10 else 0);
def bearMissingVolume = (if active1 == 1 and side1 == -1 and !volumeKnown1 then 1 else 0)
+ (if active2 == 1 and side2 == -1 and !volumeKnown2 then 1 else 0)
+ (if active3 == 1 and side3 == -1 and !volumeKnown3 then 1 else 0)
+ (if active4 == 1 and side4 == -1 and !volumeKnown4 then 1 else 0)
+ (if active5 == 1 and side5 == -1 and !volumeKnown5 then 1 else 0)
+ (if active6 == 1 and side6 == -1 and !volumeKnown6 then 1 else 0)
+ (if active7 == 1 and side7 == -1 and !volumeKnown7 then 1 else 0)
+ (if active8 == 1 and side8 == -1 and !volumeKnown8 then 1 else 0)
+ (if active9 == 1 and side9 == -1 and !volumeKnown9 then 1 else 0)
+ (if active10 == 1 and side10 == -1 and !volumeKnown10 then 1 else 0);
AddLabel(showLabels,
"BULL FVG: " + bullCount +
(if !showVolumeLabels then ""
else if bullMissingVolume > 0 then " | BAR VOL: N/A"
else if bullVolume >= 1000000000 then " | BAR VOL: " + Round(bullVolume / 1000000000, 2) + "B"
else if bullVolume >= 1000000 then " | BAR VOL: " + Round(bullVolume / 1000000, 2) + "M"
else if bullVolume >= 1000 then " | BAR VOL: " + Round(bullVolume / 1000, 1) + "K"
else " | BAR VOL: " + Round(bullVolume, 0)),
GlobalColor("BullFVG"));
AddLabel(showLabels,
"BEAR FVG: " + bearCount +
(if !showVolumeLabels then ""
else if bearMissingVolume > 0 then " | BAR VOL: N/A"
else if bearVolume >= 1000000000 then " | BAR VOL: " + Round(bearVolume / 1000000000, 2) + "B"
else if bearVolume >= 1000000 then " | BAR VOL: " + Round(bearVolume / 1000000, 2) + "M"
else if bearVolume >= 1000 then " | BAR VOL: " + Round(bearVolume / 1000, 1) + "K"
else " | BAR VOL: " + Round(bearVolume, 0)),
GlobalColor("BearFVG"));
AddLabel(showLabels and IsNaN(largestDiff),
"FVG FILTER: LOAD MORE CHART HISTORY", Color.GRAY);
| Thread starter | Similar threads | Forum | Replies | Date |
|---|---|---|---|---|
|
|
KarobeinOsc Scanner For ThinkOrSwim SWING TRADES | Strategies & Chart Setups | 0 | |
|
|
Long and Short SetUp Scanners Price Action Based For SWING TRADES ThinkOrSwim | Strategies & Chart Setups | 0 |
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.