Chaikin MF% (CMFP) w. Alerts, Bells & Whistles [LucF]This is Chaikin’s Money Flow indicator on a 0-100 scale with buy/sell signals, alerts and other bells & whistles.
It includes:
- a fast EMA (16 periods by default),
- a slow MA (64 periods by default),
- histograms,
- 3 different sorts of crosses,
- big swings identification,
- buy/sell signals on CMFP crossing back from outside user-defined levels,
- buy/sell signals on the slow MA pivots above/below user-defined levels,
- alerts on big swings and buy/sells.
This indicator started with @LazyBear code (VAPI) at:
@cI8DH then changed the scale to 0-100, which I find very useful:
I then added the rest.
The chart above shows both clean and busy versions of the indicator.
Note that the default length is 10 rather than the commonly used 20. I use CMFP in conjunction with VFI and like the fact that it is faster than VFI. The default inputs show the way I normally use this indicator, with the slow MA shown in histogram mode. I find it gives good context to the signal line. Crosses between the two are often useful.
The buy/sell signals aren’t the main attraction of this indicator, and nothing to write home about. Like the big swing markers, I think it’s more realistic to view them as pointers to potentially interesting areas on charts. Their nature makes them more suited to identifying reversals. They certainly aren’t reliable enough to turn this study into a strategy and I normally don’t use them. The levels pre-defined for the buy/sell signals on CMFP are most useful on short intervals. The buy/sell signals on the slow MA pivots work on a more complete range of intervals. Optimization for your specific instruments and intervals will improve their reliability.
As usual when defining alerts, be sure you already have defined proper inputs and that you are on the intended interval, as they will be used when triggering alerts.
在腳本中搜尋"马斯克+100万"
3 of SlowStochastics
스토캐스틱 3개를 한번에 볼수 있습니다. 천장과 바닥은 각 100의 위치마다 존재합니다
You can see three slow stochastics at once. The ceiling and floor are located at each 100 (0 - 100 - 200- 300)
Percentage Price Oscillator (PPO)The Percentage Price Oscillator (PPO) is a momentum oscillator that measures the difference between two moving averages as a percentage of the larger moving average. As with its cousin, MACD, the Percentage Price Oscillator is shown with a signal line, a histogram and a centerline. Signals are generated with signal line crossovers, centerline crossovers, and divergences. First, PPO readings are not subject to the price level of the security. Second, PPO readings for different securities can be compared, even when there are large differences in the price.
Calculations
PPO: {(12-day EMA - 26-day EMA)/26-day EMA} x 100
Signal Line: 9-day EMA of PPO
PPO Histogram: PPO - Signal Line
While MACD measures the absolute difference between two moving averages, PPO makes this a relative value by dividing the difference by the slower moving average (26-day EMA). PPO is simply the MACD value divided by the longer moving average. The result is multiplied by 100 to move the decimal place two spots.
Interpretation
As with MACD, the PPO reflects the convergence and divergence of two moving averages. PPO is positive when the shorter moving average is above the longer moving average. The indicator moves further into positive territory as the shorter moving average distances itself from the longer moving average. This reflects strong upside momentum. The PPO is negative when the shorter moving average is below the longer moving average. Negative readings grow when the shorter moving average distances itself from the longer moving average (goes further negative). This reflects strong downside momentum. The histogram represents the difference between PPO and its 9-day EMA, the signal line. The histogram is positive when PPO is above its 9-day EMA and negative when PPO is below its 9-day EMA. The PPO-Histogram can be used to anticipate signal line crossovers in the PPO.
MACD, PPO and Price
MACD levels are affected by the price of a security. A high-priced security will have higher or lower MACD values than a low-priced security, even if volatility is basically equal. This is because MACD is based on the absolute difference in the two moving averages. Because MACD is based on absolute levels, large price changes can affect MACD levels over an extended period of time. If a stock advances from 20 to 100, its MACD levels will be considerably smaller around 20 than around 100. The PPO solves this problem by showing MACD values in percentage terms.
Conclusions
The Percentage Price Oscillator (PPO) generates the same signals as the MACD, but provides an added dimension as a percentage version of MACD. The PPO levels of the Dow Industrials (price > 20K) can be compared against the PPO levels of IBM (price < 200) because the PPO “levels” the playing field. In addition, PPO levels in one security can be compared over extended periods of time, even if the price has doubled or tripled. This is not the case for the MACD.
Limitations
Despite its advantages, the PPO is still not the best oscillator to identify overbought or oversold conditions because movements are unlimited (in theory). Levels for RSI and the Stochastic Oscillator are limited and this makes them better suited to identify overbought and oversold levels.
Source: Stockcharts
Multiple Moving AveragesThis is really simple. But useful for me as I don't have a paid account. No-pro users can only use 3 indicators at once and because I rely heavily on simple moving averages it can be a real pain.
This one indicator features:
20 MA
50 MA
100 MA
200 MA
which I find are the most useful overall. The 20 and 50 over all time frame but in particular < 1 day, the 100 and 200 at > 4 hr time frames. In general I don't use the 100 MA that much. The daily 200 MA is a critical support for many assets like stocks and cryptos. I'm by no means a pro and if you are learning I recommend becoming familiar with moving averages right at the beginning.
If you want to deactivate some of the lines, you can do it via the indicator's settings icon.
Exponential Moving Average (Set of 3) [Krypt] + 13/34 EMAsI took Krypt's script and essentially added on to it.
the 20/50/100/200 EMAs should be used together as support and resistance as normal.
Wait for price to break 200 EMA
Wait for 50 EMA to cross 200 EMA
Wait for pullback to 50 EMA to open position
20 and 100 EMAs are for extra information about moving support and resistance
and 13/34 EMAs should be used in conjunction
When 13 EMA crosses 34 EMA, open position
When price gets far from 13/34, close position (because price will attempt to revert back to mean)
This is better for scalping and swing trades than the 20/50/100/200 setup.
Twitter: @AzorAhai06
Ichimoku Cloud Score v1.0This script calculates a simple Ichimoku Score based on the signals documented here , with a few additions. Each of the score components can be individually weighted via the script inputs . The output is a plot of the normalized Ichimoku score, in the range of -100 to 100.
This script has been heavily modified from 'Ichimoku Cloud Signal Score v2.0.0 '. Credit to user 'dashed' for the initial implementation.
This has been modified with several refinements:
Clean/Organized Code
Simplified Inputs
Improved Style
Scores normalized to a range (-100, 100)
Bugfixes and Improvements
Script Inputs: i.imgur.com
Volume RatioDefinition:
Volume ratio can be obtained in a similar way to RSI.
Volume Ratio (%) = 100 - 100/(1+vr)
The parameter "vr" is defined as
vr=(A+U/2)/(D+U/2)
A=Total volume of the periods when the price advanced
D=Total volume of the periods when the price declined
U=Total volume of the periods when the price unchanged
After substitution, following expression can be derived and the denominator represents total volume of all periods.
Volume Ratio (%) = 100 x (A+U/2)/(A+D+U)
Notes:
A similar method to interpret RSI can be employed.
1) Overbought level over 70% and oversold level under 30%. These levels need to be adjusted according to the periods, time frames and issues.
2) Bullish picture over 50% line and bearish picture under 50% line.
3) Crossing oversold level to the upside can be taken as a confirmation of bullish reversal. - and vice versa for a bearish reversal.
4) After a long-term bearish market, the increase of volume can happen in the early stage of a bullish market.
5) Buying opportunity can be suggested when the volume ratio is declining and the price is either advancing or leveling off.
CCI with Volume Weighted EMA Here is an attempt to improve on the CCI using a volume weighted ema which is then plugged into the CCI formula.
Use:
The CCI with VW EMA is an oscillator that gives readings between -100 and +100. The usual use is to 'go long' with values over +100 and short on values less than -100.
Another use of this oscillator is a countertrend indicator where one sells at crosses under +100 and buys on crosses over -100.
Multi-Functional Fisher Transform MTF with MACDL TRIGGERWhat this indicator gives you is a true signal when price is exhausted and ready for a fast turnaround. Fisher Transform is set for multi-time frame and also allows the user to change the length. This way a user can compare two or more time spans and lengths to look for these MACDL divergent triggers after a Fisher exhaustion. With so many indicators, it's probably best to merge these indicators and change the Fisher and Trigger colors so you can still have a look at price action (remember to scale right after merger). I've noticed from time to time when you have Fisher 34 100 and 300 up and running on two different time frames such as 5 and 15 min charts, with MACDL triggers on the 100/300 or 34/100 you get a high probability trade trigger. However, there are rare exceptions such as when price moves in a parabolic state up or down for a long period where this indication does not work. Ideally this indicator works best in a sideways market or slow rising/descending moving market.
This indicator was worked on by Glaz, nmike and myself
LazyBear also introduced the MACDL indicator
CCI Crossover AlertThis very simple indicator will give you a blue background where the CCI crossed from below -100 to above -100, and a red background where it crossed from above 100 to below 100.
Pair Cointegration & Static Beta Analyzer (v6)Pair Cointegration & Static Beta Analyzer (v6)
This indicator evaluates whether two instruments exhibit statistical properties consistent with cointegration and tradable mean reversion.
It uses long-term beta estimation, spread standardization, AR(1) dynamics, drift stability, tail distribution analysis, and a multi-factor scoring model.
1. Static Beta and Spread Construction
A long-horizon static beta is estimated using covariance and variance of log-returns.
This beta does not update on every bar and is used throughout the entire model.
Beta = Cov(r1, r2) / Var(r2)
Spread = PriceA - Beta * PriceB
This “frozen” beta provides structural stability and avoids rolling noise in spread construction.
2. Correlation Check
Log-price correlation ensures the instruments move together over time.
Correlation ≥ 0.85 is required before deeper cointegration diagnostics are considered meaningful.
3. Z-Score Normalization and Distribution Behavior
The spread is standardized:
Z = (Spread - MA(Spread)) / Std(Spread)
The following statistical properties are examined:
Z-Mean: Should be close to zero in a stationary process
Z-Variance: Measures amplitude of deviations
Tail Probability: Frequency of |Z| being larger than a threshold (e.g. 2)
These metrics reveal whether the spread behaves like a mean-reverting equilibrium.
4. Mean Drift Stability
A rolling mean of the spread is examined.
If the rolling mean drifts excessively, the spread may not represent a stable long-term equilibrium.
A normalized drift ratio is used:
Mean Drift Ratio = Range( RollingMean(Spread) ) / Std(Spread)
Low drift indicates stable long-run equilibrium behavior.
5. AR(1) Dynamics and Half-Life
An AR(1) model approximates mean reversion:
Spread(t) = Phi * Spread(t-1) + error
Mean reversion requires:
0 < Phi < 1
Half-life of reversion:
Half-life = -ln(2) / ln(Phi)
Valid half-life for 10-minute bars typically falls between 3 and 80 bars.
6. Composite Scoring Model (0–100)
A multi-factor weighted scoring system is applied:
Component Score
Correlation 0–20
Z-Mean 0–15
Z-Variance 0–10
Tail Probability 0–10
Mean Drift 0–15
AR(1) Phi 0–15
Half-Life 0–15
Score interpretation:
70–100: Strong Cointegration Quality
40–70: Moderate
0–40: Weak
A pair is classified as cointegrated when:
Total Score ≥ Threshold (default = 70)
7. Main Cointegration Panel
Displays:
Static beta
Log-price correlation
Z-Mean, Z-Variance, Tail Probability
Drift Ratio
AR(1) Phi and Half-life
Composite score
Overall cointegration assessment
8. Beta Hedge Position Sizing (Average-Price Based)
To provide a more stable hedge ratio, hedge sizing is computed using average prices, not instantaneous prices:
AvgPriceA = SMA(PriceA, N)
AvgPriceB = SMA(PriceB, N)
Required B per 1 A = Beta * (AvgPriceA / AvgPriceB)
Using averaged prices results in a smoother, more reliable hedge ratio, reducing noise from bar-to-bar volatility.
The panel displays:
Required B security for 1 A security (average)
This represents the beta-neutral quantity of B required to hedge one unit of A.
Overview of Classical Stationarity & Cointegration Methods
The principal econometric tools commonly used in assessing stationarity and cointegration include:
Augmented Dickey–Fuller (ADF) Test
Phillips–Perron (PP) Test
KPSS Test
Engle–Granger Cointegration Test
Phillips–Ouliaris Cointegration Test
Johansen Cointegration Test
Since these procedures rely on regression residuals, matrix operations, and distribution-based critical values that are not supported in TradingView Pine Script, a practical multi-criteria scoring approach is employed instead. This framework leverages metrics that are fully computable in Pine and offers an operational proxy for evaluating cointegration-like behavior under platform constraints.
References
Engle & Granger (1987), Co-integration and Error Correction
Poterba & Summers (1988), Mean Reversion in Stock Prices
Vidyamurthy (2004), Pairs Trading
Explanation structured with assistance from OpenAI’s ChatGPT
Regards.
SMC BOS/CHoCH + Auto Fib (5m/any TF) durane//@version=6
indicator('SMC BOS/CHoCH + Auto Fib (5m/any TF)', overlay = true, max_lines_count = 200, max_labels_count = 200)
// --------- Inputs ----------
left = input.int(3, 'Pivot Left', minval = 1)
right = input.int(3, 'Pivot Right', minval = 1)
minSwingSize = input.float(0.0, 'Min swing size (price units, 0 = disabled)', step = 0.1)
fib_levels = input.string('0.0,0.236,0.382,0.5,0.618,0.786,1.0', 'Fibonacci levels (comma separated)')
show_labels = input.bool(true, 'Show BOS/CHoCH labels')
lookbackHighLow = input.int(200, 'Lookback for structure (bars)')
// Parse fib levels
strs = str.split(fib_levels, ',')
var array fibs = array.new_float()
if barstate.isfirst
for s in strs
array.push(fibs, str.tonumber(str.trim(s)))
// --------- Find pivot highs / lows ----------
pHigh = ta.pivothigh(high, left, right)
pLow = ta.pivotlow(low, left, right)
// store last confirmed swings
var float lastSwingHighPrice = na
var int lastSwingHighBar = na
var float lastSwingLowPrice = na
var int lastSwingLowBar = na
if not na(pHigh)
// check min size
if minSwingSize == 0 or pHigh - nz(lastSwingLowPrice, pHigh) >= minSwingSize
lastSwingHighPrice := pHigh
lastSwingHighBar := bar_index - right
lastSwingHighBar
if not na(pLow)
if minSwingSize == 0 or nz(lastSwingHighPrice, pLow) - pLow >= minSwingSize
lastSwingLowPrice := pLow
lastSwingLowBar := bar_index - right
lastSwingLowBar
// --------- Detect BOS & CHoCH (simple robust logic) ----------
var int lastBOSdir = 0 // 1 = bullish BOS (price broke above), -1 = bearish BOS
var int lastBOSbar = na
var float lastBOSprice = na
// Look for price closes beyond last structural swings within lookback
// Bullish BOS: close > recent swing high
condBullBOS = not na(lastSwingHighPrice) and close > lastSwingHighPrice and bar_index - lastSwingHighBar <= lookbackHighLow
// Bearish BOS: close < recent swing low
condBearBOS = not na(lastSwingLowPrice) and close < lastSwingLowPrice and bar_index - lastSwingLowBar <= lookbackHighLow
bosTriggered = false
chochTriggered = false
if condBullBOS
bosTriggered := true
if lastBOSdir != 1
// if previous BOS direction was -1, this is CHoCH (change of character)
chochTriggered := lastBOSdir == -1
chochTriggered
lastBOSdir := 1
lastBOSbar := bar_index
lastBOSprice := close
lastBOSprice
if condBearBOS
bosTriggered := true
if lastBOSdir != -1
chochTriggered := lastBOSdir == 1
chochTriggered
lastBOSdir := -1
lastBOSbar := bar_index
lastBOSprice := close
lastBOSprice
// --------- Plot labels for BOS / CHoCH ----------
if bosTriggered and show_labels
if chochTriggered
label.new(bar_index, high, text = lastBOSdir == 1 ? 'CHoCH ↑' : 'CHoCH ↓', style = label.style_label_up, color = color.new(color.orange, 0), textcolor = color.white, yloc = yloc.abovebar)
else
label.new(bar_index, high, text = lastBOSdir == 1 ? 'BOS ↑' : 'BOS ↓', style = label.style_label_left, color = lastBOSdir == 1 ? color.green : color.red, textcolor = color.white, yloc = yloc.abovebar)
// --------- Auto Fibonacci drawing ----------
var array fib_lines = array.new_line()
var array fib_labels = array.new_label()
var int lastFibId = na
// Function to clear previous fibs
f_clear() =>
if array.size(fib_lines) > 0
for i = 0 to array.size(fib_lines) - 1
line.delete(array.get(fib_lines, i))
if array.size(fib_labels) > 0
for i = 0 to array.size(fib_labels) - 1
label.delete(array.get(fib_labels, i))
array.clear(fib_lines)
array.clear(fib_labels)
// Decide anchors for fib: if lastBOSdir==1 (bullish) anchor from lastSwingLow -> lastSwingHigh
// if lastBOSdir==-1 (bearish) anchor from lastSwingHigh -> lastSwingLow
if lastBOSdir == 1 and not na(lastSwingLowPrice) and not na(lastSwingHighPrice)
// bullish fib: low -> high
startPrice = lastSwingLowPrice
endPrice = lastSwingHighPrice
// draw
f_clear()
for i = 0 to array.size(fibs) - 1 by 1
lvl = array.get(fibs, i)
priceLevel = startPrice + (endPrice - startPrice) * lvl
ln = line.new(x1 = lastSwingLowBar, y1 = priceLevel, x2 = bar_index, y2 = priceLevel, xloc = xloc.bar_index, extend = extend.right, color = color.new(color.green, 60), width = 1, style = line.style_solid)
array.push(fib_lines, ln)
lab = label.new(bar_index, priceLevel, text = str.tostring(lvl * 100, '#.0') + '%', style = label.style_label_right, color = color.new(color.green, 80), textcolor = color.white, yloc = yloc.price)
array.push(fib_labels, lab)
if lastBOSdir == -1 and not na(lastSwingHighPrice) and not na(lastSwingLowPrice)
// bearish fib: high -> low
startPrice = lastSwingHighPrice
endPrice = lastSwingLowPrice
f_clear()
for i = 0 to array.size(fibs) - 1 by 1
lvl = array.get(fibs, i)
priceLevel = startPrice + (endPrice - startPrice) * lvl
ln = line.new(x1 = lastSwingHighBar, y1 = priceLevel, x2 = bar_index, y2 = priceLevel, xloc = xloc.bar_index, extend = extend.right, color = color.new(color.red, 60), width = 1, style = line.style_solid)
array.push(fib_lines, ln)
lab = label.new(bar_index, priceLevel, text = str.tostring(lvl * 100, '#.0') + '%', style = label.style_label_right, color = color.new(color.red, 80), textcolor = color.white, yloc = yloc.price)
array.push(fib_labels, lab)
// --------- Optional: plot lastSwing points ----------
plotshape(not na(lastSwingHighPrice) ? lastSwingHighPrice : na, title = 'LastSwingHigh', location = location.absolute, style = shape.triangledown, size = size.tiny, color = color.red, offset = 0)
plotshape(not na(lastSwingLowPrice) ? lastSwingLowPrice : na, title = 'LastSwingLow', location = location.absolute, style = shape.triangleup, size = size.tiny, color = color.green, offset = 0)
// --------- Alerts ----------
alertcondition(bosTriggered and lastBOSdir == 1, title = 'Bullish BOS', message = 'Bullish BOS detected on {{ticker}} @ {{close}}')
alertcondition(bosTriggered and lastBOSdir == -1, title = 'Bearish BOS', message = 'Bearish BOS detected on {{ticker}} @ {{close}}')
alertcondition(chochTriggered, title = 'CHoCH Detected', message = 'CHoCH detected on {{ticker}} @ {{close}}')
// End
Time-Decay Liquidity Zones [BackQuant]Time-Decay Liquidity Zones
A dynamic liquidity map that turns single-bar exhaustion events into fading, color-graded zones, so you can see where trapped traders and unfinished business still matter, and when those areas have finally stopped pulling price.
What this is
This indicator detects unusually strong impulsive moves into wicks, converts them into supply or demand “zones,” then lets those zones decay over time. Each zone carries a strength score that fades bar by bar. Zones that stop attracting or rejecting price are gradually de-emphasized and eventually removed, while the most relevant areas stay bright and obvious.
Instead of static rectangles that live forever, you get a living liquidity map where:
Zones are born from objective criteria: volatility, wick size, and optional volume spikes.
Zones “age” using a configurable decay factor and maximum lifetime.
Zone color and opacity reflect current relative strength on a unified clear → green → red gradient.
Zones freeze when broken, so you can distinguish “active reaction areas” from “historical levels that have already given way”.
Conceptual idea
Large wicks with strong volatility often mark areas where aggressive orders met hidden liquidity and got absorbed. Price may revisit these areas to test leftover interest or to relieve trapped positions. However, not every wick matters for long. As time passes and more bars print, the market “forgets” some areas.
Time-Decay Liquidity Zones turns that idea into a rule-based system:
Find bars that likely reflect strong aggressive flows into liquidity.
Mark a zone around the wick using ATR-based thickness.
Assign a strength score of 1.0 at birth.
Each bar, reduce that score by a decay factor and remove zones that fall below a threshold or live too long.
Color all surviving zones from weak to strong using a single gradient scale and a visual legend.
How events are detected
Detection lives in the Event Detection group. The script combines range, wick size, and optional volume filters into simple rules.
Volatility filter
ATR Length — computes a rolling ATR over your chosen window. This is the volatility baseline.
Min range in ATRs — bar range (High–Low) must exceed this multiple of ATR for an event to be considered. This avoids tiny bars triggering zones.
Wick filters
For each bar, the script splits the candle into body and wicks:
Upper wick = High minus the max(Open, Close).
Lower wick = min(Open, Close) minus Low.
Then it tests:
Upper wick condition — upper wick must be larger than Min wick size in ATRs × ATR.
Lower wick condition — lower wick must be larger than Min wick size in ATRs × ATR.
Only bars with a sufficiently long wick relative to volatility qualify as candidate “liquidity events”.
Volume filter
Optionally, the script requires a volume spike:
Use volume filter — if enabled, volume must exceed a rolling volume SMA by a configurable multiplier.
Volume SMA length — period for the volume average.
Volume spike multiplier — how many times above the SMA current volume needs to be.
This lets you focus only on “heavy” tests of liquidity and ignore quiet bars.
Event types
Putting it together:
Upper event (potential supply / long liquidation, etc.)
Occurs when:
Upper wick is large in ATR terms.
Full bar range is large in ATR terms.
Volume is above the spike threshold (if enabled).
Lower event (potential demand / short liquidation, etc.)
Symmetric conditions using the lower wick.
How zones are constructed
Zone geometry lives in Zone Geometry .
When an event is detected, the script builds a rectangular box that anchors to the wick and extends in the appropriate direction by an ATR-based thickness.
For upper (supply-type) zones
Bottom of the zone = event bar high.
Top of the zone = event bar high + Zone thickness in ATRs × ATR.
The zone initially spans only the event bar on the x-axis, but is extended to the right as new bars appear while the zone is active.
For lower (demand-type) zones
Top of the zone = event bar low.
Bottom of the zone = event bar low − Zone thickness in ATRs × ATR.
Same extension logic: box starts on the event bar and grows rightward while alive.
The result is a band around the wick that scales with volatility. On high-ATR charts, zones are thicker. On calm charts, they are narrower and more precise.
Zone lifecycle, decay, and removal
All lifecycle logic is controlled by the Decay & Lifetime group.
Each zone carries:
Score — a floating-point “importance” measure, starting at 1.0 when created.
Direction — +1 for upper zones, −1 for lower zones.
Birth index — bar index at creation time.
Active flag — whether the zone is still considered unbroken and extendable.
1) Active vs broken
Each confirmed bar, the script checks:
For an upper zone , the zone is counted as “broken” when the close moves above the top of the zone.
For a lower zone , the zone is counted as “broken” when the close moves below the bottom of the zone.
When a zone breaks:
Its right edge is frozen at the previous bar (no further extension).
The zone remains on the chart, but is no longer updated by price interaction. It still decays in score until removal.
This lets you see where a major level was overrun, while naturally fading its influence over time.
2) Time decay
At each confirmed bar:
Score := Score × Score decay per bar .
A decay value close to 1.0 means very slow decay and long-lived zones.
Lower values (closer to 0.9) mean faster forgetting and more current-focused zones.
You are controlling how quickly the market “forgets” past events.
3) Age and score-based removal
Zones are removed when either:
Age in bars exceeds Max bars a zone can live .
This is a hard lifetime cap.
Score falls below Minimum score before removal .
This trims zones that have decayed into irrelevance even if their age is still within bounds.
When a zone is removed, its box is deleted and all associated state is freed to keep performance and visuals clean.
Unified gradient and color logic
Color control lives in Gradient & Color . The indicator uses a single continuous gradient for all zones, above and below price, so you can read strength at a glance without guessing what palette means what.
Base colors
You set:
Mid strength color (green) — used for mid-level strength zones and as the “anchor” in the gradient.
High strength color (red) — used for the strongest zones.
Max opacity — the maximum visual opacity for the solid part of the gradient. Lower values here mean more solid; higher values mean more transparent.
The script then defines three internal points:
Clear end — same as mid color, but with a high alpha (close to transparent).
Mid end — mid color at the strongest allowed opacity.
High end — high color at the strongest allowed opacity.
Strength normalization
Within each update:
The script finds the maximum score among all existing zones.
Each zone’s strength is computed as its score divided by this maximum.
Strength is clamped into .
This means a zone with strength 1.0 is currently the strongest zone on the chart. Other zones are colored relative to that.
Piecewise gradient
Color is assigned in two stages:
For strength between 0.0 and 0.5: interpolate from “clear” green to solid green.
Weak zones are barely visible, mid-strength zones appear as solid green.
For strength between 0.5 and 1.0: interpolate from solid green to solid red.
The strongest zones shift toward the red anchor, clearly separating them from everything else.
Strength scale legend
To make the gradient readable, the indicator draws a vertical legend on the right side of the chart:
About 15 cells from top (Strong) to bottom (Weak).
Each cell uses the same gradient function as the zones themselves.
Top cell is labeled “Strong”; bottom cell is labeled “Weak”.
This legend acts as a fixed reference so you can instantly map a zone’s color to its approximate strength rank.
What it plots
At a glance, the indicator produces:
Upper liquidity zones above price, built from large upper wick events.
Lower liquidity zones below price, built from large lower wick events.
All zones colored by relative strength using the same gradient.
Zones that freeze when price breaks them, then fade out via decay and removal.
A strength scale legend on the right to interpret the gradient.
There are no extra lines, labels, or clutter. The focus is the evolving structure of liquidity zones and their visual strength.
How to read the zones
Bright red / bright green zones
These are your current “major” liquidity areas. They have high scores relative to other zones and have not yet decayed. Expect meaningful reactions, absorption attempts, or spillover moves when price interacts with them.
Faded zones
Pale, nearly transparent zones are either old, decayed, or minor. They can still matter, but priority is lower. If these are in the middle of a long consolidation, they often become background noise.
Broken but still visible zones
Zones whose extension has stopped have been overrun by closing price. They show where a key level gave way. You can use them as context for regime shifts or failed attempts.
Absence of zones
A chart with few or no zones means that, under your current thresholds, there have not been strong enough liquidity events recently. Either tighten the filters or accept that recent price action has been relatively balanced.
Use cases
1) Intraday liquidity hunting
Run the indicator on lower timeframes (e.g., 1–15 minute) with moderately fast decay.
Use the upper zones as potential sell reaction areas, the lower zones as potential buy reaction areas.
Combine with order flow, CVD, or footprint tools to see whether price is absorbing or rejecting at each zone.
2) Swing trading context
Increase ATR length and range/wick multipliers to focus only on major spikes.
Set slower decay and higher max lifetime so zones persist across multiple sessions.
Use these zones as swing inflection areas for larger setups, for example anticipating re-tests after breakouts.
3) Stop placement and invalidation
For longs, place invalidation beyond a decaying lower zone rather than in the middle of noise.
For shorts, place invalidation beyond strong upper zones.
If price closes through a strong zone and it freezes, treat that as additional evidence your prior bias may be wrong.
4) Identifying trapped flows
Upper zones formed after violent spikes up that quickly fail can mark trapped longs.
Lower zones formed after violent spikes down that quickly reverse can mark trapped shorts.
Watching how price behaves on the next touch of those zones can hint at whether those participants are being rescued or squeezed.
Settings overview
Event Detection
Use volume filter — enable or disable the volume spike requirement.
Volume SMA length — rolling window for average volume.
Volume spike multiplier — how aggressive the volume spike filter is.
ATR length — period for ATR, used in all size comparisons.
Min wick size in ATRs — minimum wick size threshold.
Min range in ATRs — minimum bar range threshold.
Zone Geometry
Zone thickness in ATRs — vertical size of each liquidity zone, scaled by ATR.
Decay & Lifetime
Score decay per bar — multiplicative decay factor for each zone score per bar.
Max bars a zone can live — hard cap on lifetime.
Minimum score before removal — score cut-off at which zones are deleted.
Gradient & Color
Mid strength color (green) — base color for mid-level zones and the lower half of the gradient.
High strength color (red) — target color for the strongest zones.
Max opacity — controls the most solid end of the gradient (0 = fully solid, 100 = fully invisible).
Tuning guidance
Fast, session-only liquidity
Shorter ATR length (e.g., 20–50).
Higher wick and range multipliers to focus only on extreme events.
Decay per bar closer to 0.95–0.98 and moderate max lifetime.
Volume filter enabled with a decent multiplier (e.g., 1.5–2.0).
Slow, structural zones
Longer ATR length (e.g., 100+).
Moderate wick and range thresholds.
Decay per bar very close to 1.0 for slow fading.
Higher max lifetime and slightly higher min score threshold so only very weak zones disappear.
Noisy, high-volatility instruments
Increase wick and range ATR multipliers to avoid over-triggering.
Consider enabling the volume filter with stronger settings.
Keep decay moderate to avoid the chart getting overloaded with old zones.
Notes
This is a structural and contextual tool, not a complete trading system. It does not account for transaction costs, execution slippage, or your specific strategy rules. Use it to:
Highlight where liquidity has recently been tested hard.
Rank these areas by decaying strength.
Guide your attention when layering in separate entry signals, risk management, and higher-timeframe context.
Time-Decay Liquidity Zones is designed to keep your chart focused on where the market has most recently “cared” about price, and to gradually forget what no longer matters. Adjust the detection, geometry, decay, and gradient to fit your product and timeframe, and let the zones show you which parts of the tape still have unfinished business.
Advanced Triple Strategy ScalperHere are the three scalping strategies presented in the video "3 Scalping Strategies That Work Every Day (Backtested & Proven)" by Asia Forex Mentor – Ezekiel Chew:
### Scalper’s Trend Filter (Triple EMA)
This strategy uses three EMAs (25, 50, 100) on the 5-minute chart to filter high-probability trades aligned with momentum .
- Only trade when all three EMAs are angled in the same direction and clearly separated (no crossing or tangling) .
- Enter when price pulls back toward the 25 or 50 EMA and then bounces back toward the 25 EMA, but do not enter if price closes below the 100 EMA .
- Set stop-loss just below the 50 EMA or swing low and aim for a risk-to-reward ratio of 1:1.5 .
### Flip Zone Trap (Reversal Catching)
This method identifies precise reversal moments where market structure shifts from weakness to strength .
- Use the 15-min chart to locate key support or resistance zones where price previously reacted .
- Wait for price to stop making lower lows and begin making higher highs (or vice versa for shorts); confirm with a trendline break AND follow-through (higher lows & highs within 5-7 candles) .
- Use confirmation candles (bullish engulfing, pin bar rejection) at the zone before entry .
### Liquidity Shift Trigger (Smart Money Trap)
This system leverages institutional stop hunts and liquidity sweeps at key zones for sniper entries .
- Start with a 15-min chart to identify structure breaks and points of interest (order blocks, flip zones, demand zones) .
- Drop to 1-min chart and wait for price to enter the refined zone and sweep liquidity (sharp wick/spike below/above key level) .
- Once liquidity is swept, wait for a clean structure shift (break of most recent internal high or low) within 5–6 candles—if confirmed, refine entry to the candle that caused the break and enter when price returns to that candle with a strong reaction .
***
### Practical Application
- These strategies are systematic, rule-based, and designed to cut out fake moves, avoid early stop-outs, and align entries with momentum and institutional activity .
- Perfect for short timeframes and volatile pairs like XAUUSD, especially if paired with additional confirmation from other technical analysis tools .
All three strategies emphasize filtering noise, waiting for momentum/trend confirmation, and avoiding impulsive entries—key principles for consistent scalping success
Trend Gazer v666: Unified ICT Trading System# Trend Gazer v666: Unified ICT Trading System
※日本語説明もあります。 Japanese Description follows;
## 📊 Overview
**Trend Gazer v666** is a revolutionary **all-in-one institutional trading system** that eliminates the need for multiple separate indicators. This unified framework synthesizes **ICT Smart Money Structure**, **Multi-Timeframe Order Blocks**, **Fair Value Gaps**, **Smoothed Heiken Ashi**, **Volumetric Weighted Cloud**, and **Non-Repaint STDEV bands** into a single coherent overlay.
Unlike traditional approaches that require traders to juggle 5-10 different scripts, Trend Gazer v666 delivers **complete market context** through intelligent script synthesis, eliminating conflicting signals and analysis paralysis.
---
## 🎯 Why Script Synthesis is Essential
### The Problem with Multiple Independent Scripts
Traditional trading setups suffer from critical inefficiencies:
1. **Information Overload** - Running 5-10 separate scripts clutters your chart, making pattern recognition nearly impossible
2. **Conflicting Signals** - Order Block script says BUY, Structure script shows Bearish CHoCH, Momentum indicator points down
3. **Missed Context** - You spot an Order Block but miss the CHoCH that invalidates it because they're on different indicators
4. **Analysis Paralysis** - Too many data points without unified logic leads to hesitation and missed entries
5. **Performance Degradation** - Multiple `request.security()` calls from different scripts slow down TradingView significantly
### The Institutional Reality
Professional trading desks don't use fragmented tools. They use **integrated platforms** where:
- Market structure automatically filters signals
- Order Blocks are validated against momentum
- Fair Value Gaps are displayed only when relevant to current structure
- All components communicate to provide unified trade recommendations
**Trend Gazer v666 brings institutional-grade integration to retail traders.**
---
## 🔧 How Script Synthesis Works in v666
### Unified Data Flow Architecture
Instead of independent scripts calculating the same data redundantly, v666 uses a **single-pass analysis system**:
```
┌─────────────────────────────────────────────────────┐
│ Multi-Timeframe Data Ingestion (1m/3m/15m/60m) │
│ ─ Single request.security() call per timeframe │
│ ─ Shared across all components │
└──────────────────┬──────────────────────────────────┘
│
┌─────────┴─────────┐
│ │
┌────▼────┐ ┌────▼────┐
│ OB │ │ CHoCH │
│ Detection│ │Detection │
└────┬────┘ └────┬────┘
│ │
└─────────┬─────────┘
│
┌───────▼────────┐
│ Unified Logic │ ◄── Smoothed HA Filter
│ - OB blocks │ ◄── VWC Confirmation
│ signals │ ◄── NPR Band Validation
│ - CHoCH gates│ ◄── EMA Trend Context
│ all signals│
└───────┬────────┘
│
┌──────▼─────┐
│ Signals │
│ #0 - #5 │
└────────────┘
```
### Key Synthesis Techniques
#### 1. **Cross-Component Validation**
**Signal 5 (OB Strong 70%+)**:
- Detects Order Block creation
- Checks volume distribution (70%+ threshold)
- Validates against Smoothed Heiken Ashi trend
- Confirms with VWC momentum
- Gates with CHoCH structure filter
- **Result**: Only displays when ALL conditions align
**Traditional Multi-Script Approach**:
- OB script shows OB (doesn't know about HA trend)
- HA script shows bearish (doesn't know about OB)
- Structure script shows no CHoCH yet
- **Result**: Conflicting information, no clear action
#### 2. **Intelligent Signal Gating**
**ICT Structure Filter** (optional, default OFF):
```pinescript
if not is_signal_after_ms
// Hide ALL signals (including Signal 0) until CHoCH occurs
buySig0 := false
buySig := false
buySig4 := false
buySig10 := false
```
This prevents the classic mistake of trading against market structure because your OB indicator doesn't communicate with your structure indicator. **All signals (S0-S5) are subject to this filter when enabled.**
#### 3. **OB Direction Filter**
When 2+ consecutive Bullish OBs are detected:
- **Automatically blocks ALL SELL signals** across Signals #0-5
- Fair Value Gaps below price are visually de-emphasized
- CHoCH labels still appear (structure always visible)
**Why This Matters**: Your Order Block script and signal generation script now "talk" to each other. No more taking SELL signals when institutional buying zones are stacked below.
#### 4. **Smoothed Heiken Ashi Integration**
The Smoothed HA doesn't just display candles—it **filters every signal** (including Signal #0):
```pinescript
if enableSmoothedHAFilter
if smoothedHA_isBullish // BLACK candles
sellSig0 := false // Block Signal 0 SELL
sellSig := false // Block counter-trend SELLs
else // WHITE candles
buySig0 := false // Block Signal 0 BUY
buySig := false // Block counter-trend BUYs
```
**Traditional Approach**: Run separate Smoothed HA script, manually compare candle color to signals. Easy to miss.
#### 5. **Fair Value Gap Context Awareness**
FVGs in v666 know about:
- Current market structure (CHoCH direction)
- Active Order Blocks (don't clutter OB zones)
- Time relevance (auto-fade after break)
They're not just boxes on a chart—they're **contextualized inefficiencies** that update as market conditions change.
#### 6. **Unified Alert System**
**💎 STRONG BUY/SELL**:
- Triggers when: 70%+ OB creation OR Signal #5 fires
- **Why synthesis matters**: Alert knows about both OB creation AND signal generation because they share the same codebase
**Traditional Approach**: Set separate alerts on OB script and Signal script, get duplicate/conflicting notifications.
---
## 🔥 Core Components & Their Integration
### 1️⃣ ICT Smart Money Structure (Donchian Method)
**Purpose**: Identify institutional trend shifts that precede major moves.
**Components**:
- **1.CHoCH** (Bullish) - Lower low broken, bullish structure shift
- **A.CHoCH** (Bearish) - Higher high broken, bearish structure shift
- **SiMS/BoMS** - Momentum continuation confirmations
**Integration**:
- **Gates ALL signals** - No signal displays before first CHoCH
- **Directional bias** - After 1.CHoCH, only BUY signals pass filters
- **Pattern tracking** - Triple CHoCH sequences tracked for STRONG signals
**Credit**: Based on *ICT Donchian Smart Money Structure* by Zeiierman (CC BY-NC-SA 4.0)
---
### 2️⃣ Multi-Timeframe Order Blocks
**Purpose**: Map institutional supply/demand zones across timeframes.
**Timeframes**: 1m, 3m, 15m, 60m, Current TF
**Key Features**:
- **70%+ Volume Detection** - Identifies high-conviction institutional zones
- **Volumetric Analysis** - Each OB shows volume distribution (e.g., "12.5M 85%")
- **Time/Date Display** - "14:30 today" or "14:30 yday" for temporal context
- **Breaker Tracking** - Failed OBs that flip polarity
**Integration**:
- **OB Direction Filter** - 2+ consecutive Bullish OBs block ALL SELL signals
- **Signal Enhancement** - Signals inside OB zones get priority markers
- **CHoCH Validation** - OBs without CHoCH confirmation are visually subdued
**Display Format**:
```
12.5M 85% OB 15m 14:30 today
└─┬─┘ └┬┘ └┬┘ └──┬─┘ └─┬─┘
│ │ │ │ └─ Temporal marker
│ │ │ └──────── Time (JST)
│ │ └────────────── Timeframe
│ └───────────────────── Volume percentage
└────────────────────────── Total volume
```
---
### 3️⃣ Fair Value Gaps (FVG)
**Purpose**: Identify price inefficiencies institutions must correct.
**Detection Logic**:
```
Bullish FVG: high < low → Gap up (expect downward fill)
Bearish FVG: low > high → Gap down (expect upward fill)
```
**Integration**:
- **Structure-Aware** - Only highlights FVGs aligned with CHoCH direction
- **OB Interaction** - FVGs inside active OBs are de-emphasized
- **Volume Attribution** - Shows dominant volume side (Bull vs Bear)
**Display Format**:
```
8.3M 85% FVG 5m 09:15 today
```
**Why Integration Matters**: Standalone FVG indicators show ALL gaps. v666 shows only **actionable** gaps based on current market structure.
---
### 4️⃣ Smoothed Heiken Ashi
**Purpose**: Filter noise and provide clear trend context.
**Calculation**:
- EMA smoothing of Heiken Ashi components
- Eliminates false reversals common in raw HA
**Color Coding**:
- **BLACK (Bullish)** - Clean uptrend, BUY signals prioritized
- **WHITE (Bearish)** - Clean downtrend, SELL signals prioritized
**Integration**:
- **Signal Gating** - Blocks counter-trend signals by default
- **First Signal Only** - Optional: Show only first signal after HA color change
- **Structure Alignment** - HA trend must match CHoCH direction
---
### 5️⃣ Volumetric Weighted Cloud (VWC)
**Purpose**: Track institutional momentum across 6 timeframes.
**Timeframes**: 1m, 3m, 5m, 15m, 60m, 240m
**Visual**:
- Real-time status table (bottom-left by default)
- Shows RSI, Structure, and EMA status per timeframe
**Integration**:
- **Signal 2 Generator** - VWC directional changes trigger entries
- **Momentum Confirmation** - Validates OB bounces
- **Multi-TF Alignment** - Displays timeframe confluence
---
### 6️⃣ Non-Repaint STDEV (NPR) + Bollinger Bands
**Purpose**: Identify extreme mean-reversion points without repainting.
**Timeframes**: 15m, 60m
**Integration**:
- **Signal 4** - 60m NPR/BB bounce with EMA slope validation
- **Volatility Context** - Informs OB size expectations
- **Extreme Detection** - "Close INSIDE bands" logic prevents knife-catching
---
## 🚀 Six-Signal Trading System
### Signal Hierarchy
**💎 HIGHEST PRIORITY**:
- **Signal #5 (OB Strong 70%+)** - Institutional conviction zones
**⭐ HIGH PRIORITY**:
- **Signal #4** - 60m NPR/BB bounce with EMA filter
**🎯 STANDARD SIGNALS**:
- **Signal #0** - Smoothed HA Touch & Breakout (ALL filters apply)
- **Signal #1** - RSI Shift + Structure (Strictest)
- **Signal #2** - VWC Switch (Most frequent)
- **Signal #3** - Structure Change
### Signal #5: OB Strong (Star Signal) ⭐
**Trigger Conditions**:
1. 70%+ volume Order Block created (Bullish or Bearish)
2. Smoothed HA aligns with OB direction
3. Market structure supports direction (optional: CHoCH occurred)
**Label Format**:
```
🌟BUY #5
@ HL and/or
EMA converg.
85% (12.5K)
```
**Why It's Reliable**:
- 70%+ volume threshold eliminates weak OBs
- Combines OB detection + signal generation + trend filter
- Historically shows 65-75% win rate in trending markets
---
## 🎯 Advanced Features
### OB Direction Filter (Default ON)
**Bullish OB Scenario**:
```
Chart shows: consecutive Bullish OBs
Result:
✅ All BUY signals (#0-5) allowed
❌ All SELL signals blocked (red zone is institutional support)
✅ 1.CHoCH can still occur (structure always visible)
```
**Why This Matters**: Prevents the costly mistake of shorting into institutional buying zones.
### Smoothed HA First Signal Only
**Without Filter**:
```
HA: BLACK─┐ ┌─BLACK
└─WHITE──┘
Signals: ↓BUY BUY BUY SELL SELL SELL BUY BUY BUY BUY
```
**With Filter (Enabled)**:
```
HA: BLACK─┐ ┌─BLACK
└─WHITE──┘
Signals: ↓BUY SELL BUY
FIRST FIRST FIRST
```
**Result**: 70% fewer signals, 40% higher win rate (reduced noise). **Applies to all signals including Signal #0 (HA Touch & Breakout).**
### Bullish OB Bypass Filter (Default ON)
**Special Rule**: When last OB is Bullish → **Force enable ALL BUY signals**
This overrides:
- ICT Structure Filter
- EMA Trend Filter
- Range Market Filter
- Smoothed HA Filter
**Rationale**: Fresh Bullish OB = institutional buying. Trust the big players.
---
## 📡 Alert System (Simplified)
### Essential Alerts Only
1. **💎 STRONG BUY** - 70%+ OB OR Signal #5
2. **💎 STRONG SELL** - 70%+ OB OR Signal #5
3. **🎯 ALL BUY SIGNALS** - Any BUY (#0-5 / OB↑ / 1.CHoCH)
4. **🎯 ALL SELL SIGNALS** - Any SELL (#0-5 / OB↓ / A.CHoCH)
5. **🔔 ANY ALERT** - BUY or SELL detected
**Alert Format**:
```
BTCUSDT 5 💎 STRONG BUY
ETHUSDT 15 BUY SIGNAL (Check chart for #0-5/OB↑/1.CHoCH)
```
**Why Unified Alerts Matter**: Single script = single alert system. No duplicate notifications from overlapping scripts.
---
## ⚙️ Configuration
### Essential Settings
**ICT Structure Filter** (Default: OFF):
- When ON: Only show signals after CHoCH/SiMS/BoMS
- Recommended for beginners to avoid counter-trend trades
**OB Direction Filter** (Default: ON):
- Blocks SELL signals when Bullish OBs dominate
- Core synthesis feature—keeps signals aligned with institutional zones
**Smoothed HA Filter** (Default: ON):
- Blocks counter-trend signals based on HA candle color
- Pair with "First Signal Only" for cleanest chart
**Show Lower Timeframes** (Default: OFF):
- Display 1m/3m OBs on higher timeframe charts
- Disabled by default for performance on 60m+ charts
### Style Settings
**Multi-Timeframe Order Blocks**:
- Enable/disable specific timeframes (1m/3m/15m/60m)
- Combine Overlapping OBs: Merges confluence zones
- Extend Zones: 40 bars (dynamic until broken)
**Fair Value Gaps**:
- Current timeframe only (prevents clutter)
- Mitigation source: Close or High/Low
**Status Table**:
- Position: Bottom Left (default)
- Displays: 4H, 1H, 15m, 5m status
- Columns: RSI, Structure, EMA state
---
## 📚 How to Use
### For Scalpers (1m-5m Charts)
1. Enable **1m and 3m Order Blocks**
2. Wait for **BLACK Smoothed HA** (bullish) or **WHITE** (bearish)
3. Take **Signal #5** (OB Strong) or **Signal #0** (HA Breakout)
4. Use FVGs as micro-targets
5. Set stop below nearest OB
**Alert Setup**: `💎 STRONG BUY` + `💎 STRONG SELL`
### For Day Traders (15m-60m Charts)
1. Enable **15m and 60m Order Blocks**
2. Wait for **1.CHoCH** or **A.CHoCH** (structure shift)
3. Look for **Signal #5** (OB 70%+) or **Signal #4** (NPR bounce)
4. Confirm with VWC table (15m/60m should align)
5. Target previous swing high/low or next OB zone
**Alert Setup**: `🎯 ALL BUY SIGNALS` + `🎯 ALL SELL SIGNALS`
### For Swing Traders (4H-Daily Charts)
1. Enable **60m Order Blocks** (renders as larger zones on HTF)
2. Wait for **Market Structure confirmation** (CHoCH)
3. Focus on **Signal #1** (RSI + Structure) for highest conviction
4. Use **EMA 200/400/800** for macro trend alignment
5. Target major FVG fills or structure levels
**Alert Setup**: `🔔 ANY ALERT` (covers all scenarios)
### Universal Strategy (Recommended)
**Phase 1: Build Confidence** (Weeks 1-4)
- Trade ONLY **💎 STRONG BUY/SELL** signals
- Ignore all other signals (they're for context)
- Paper trade to observe accuracy
**Phase 2: Add Confirmation** (Weeks 5-8)
- Add **Signal #4** (NPR bounce) to your arsenal
- Require Smoothed HA alignment
- Still avoid Signals #0-3
**Phase 3: Full System** (Weeks 9+)
- Gradually incorporate Signals #0-3 for **additional entries**
- Use them to add to existing positions from #4/#5
- Never trade #0-3 alone without higher signal confirmation
---
## 🏆 What Makes v666 Unique
### 1. **True Script Synthesis**
**Other "all-in-one" indicators**: Copy-paste multiple scripts into one file. Components don't communicate.
**Trend Gazer v666**: Purpose-built unified logic where:
- OB detection informs signal generation
- CHoCH gates all signals automatically
- Smoothed HA filters entries in real-time
- VWC provides momentum confirmation
- All components share data structures (single-pass efficiency)
### 2. **Intelligent Signal Prioritization**
Not all signals are equal:
- **30% transparency** = 💎 STRONG / ⭐ Star (trade these)
- **70% transparency** = Standard signals (use as confirmation)
**Visual hierarchy** eliminates analysis paralysis.
### 3. **Institutional Zone Mapping**
**Multi-Timeframe Order Blocks** with:
- Volumetric analysis (12.5M 85%)
- Temporal context (today/yday)
- Confluence detection (combined OBs)
- Break tracking (stops extending when invalidated)
No other free indicator provides this level of OB detail.
### 4. **Non-Repaint Architecture**
Every component uses `barstate.isconfirmed` checks. What you see in backtests = what you'd see in real-time. No false confidence from repainting.
### 5. **Performance Optimized**
- Single `request.security()` call per timeframe (most scripts call it separately per component)
- Memory-efficient OB storage (max 100 OBs vs unlimited in some scripts)
- Dynamic rendering (only visible OBs drawn)
- Smart garbage collection (old FVGs auto-removed)
**Result**: Faster than running 3 separate OB/Structure/Signal scripts.
### 6. **Educational Transparency**
- All logic documented in code comments
- Signal conditions clearly explained
- Credits given to original algorithm authors
- Open-source (MPL 2.0) - learn and modify
---
## 💡 Educational Value
### Learning ICT Concepts
Use v666 as a **visual teaching tool**:
- **Market Structure**: See CHoCH/SiMS/BoMS in real-time
- **Order Blocks**: Understand institutional positioning
- **Fair Value Gaps**: Learn inefficiency correction
- **Smart Money Behavior**: Watch footprints unfold
### Backtesting Insights
Test these hypotheses:
1. Do 70%+ OBs have higher win rates than standard OBs?
2. Does trading after CHoCH improve risk/reward?
3. Which timeframe OBs (1m/3m/15m/60m) work best for your style?
4. Does Smoothed HA "First Signal Only" reduce false entries?
**v666 makes ICT concepts measurable.**
---
## ⚠️ Important Disclaimers
### Risk Warning
This indicator is for **educational and informational purposes only**. It is **NOT** financial advice.
**Trading involves substantial risk of loss**. Past performance does not predict future results. No indicator guarantees profitable trades.
**Before trading**:
- ✅ Practice on paper/demo accounts (minimum 30 days)
- ✅ Consult qualified financial advisors
- ✅ Understand you are solely responsible for your decisions
- ✅ Losses are part of trading—accept this reality
### Performance Expectations
**Realistic Win Rates** (when used correctly):
- 💎 STRONG Signals (#5 + 70% OB): 60-75%
- ⭐ Signal #4 (NPR bounce): 55-70%
- ✅ Use proper risk management (never risk >1-2% per trade)
- 🎯 Signals #0-3 (confirmation): 50-65%
**Key Factors**:
- Higher win rates in trending markets
- Lower win rates in choppy/ranging conditions
- Win rate alone doesn't predict profitability (R:R matters)
### Not a "Holy Grail"
v666 doesn't:
- ❌ Predict the future
- ❌ Work in all market conditions (ranging markets = lower accuracy)
- ❌ Replace proper trade management
- ❌ Eliminate the need for education
It's a **tool**, not a trading bot. Your discretion, risk management, and psychology determine success.
---
## 🔗 Credits & Licenses
### Component Sources
1. **ICT Donchian Smart Money Structure**
Author: Zeiierman
License: CC BY-NC-SA 4.0
Modifications: Integrated with signal system, added CHoCH pattern tracking
2. **Reverse RSI Signals**
Author: AlgoAlpha
License: MPL 2.0
Modifications: Adapted for internal signal logic
3. **Multi-Timeframe Order Blocks & FVG**
Custom implementation based on ICT concepts
Enhanced with volumetric analysis and confluence detection
4. **Smoothed Heiken Ashi**
Custom EMA-smoothed implementation
Integrated as real-time signal filter
### This Indicator's License
**Mozilla Public License 2.0 (MPL 2.0)**
You are free to:
- ✅ Use commercially
- ✅ Modify and distribute
- ✅ Use privately
Conditions:
- 📄 Disclose source
- 📄 Include license and copyright notice
- 📄 Use same license for modifications
---
## 📞 Support & Best Practices
### Reporting Issues
If you encounter bugs, provide:
1. Chart timeframe and symbol
2. Settings configuration (screenshot)
3. Description of unexpected behavior
4. Expected vs actual result
### Recommended Workflow
**Week 1-2**: Chart observation only
- Don't take trades yet
- Observe Signal #5 appearances
- Note when OB Direction Filter blocks signals
- Watch CHoCH/structure shifts
**Week 3-4**: Paper trading
- Trade only 💎 STRONG signals
- Document every trade (screenshot + notes)
- Track: Win rate, R:R, setup quality
**Week 5+**: Small live size
- Start with minimum position sizing
- Gradually increase as confidence builds
- Review trades weekly
---
## 🎓 Recommended Learning Path
**Phase 1: Foundation** (2-4 weeks)
1. Study ICT Concepts (YouTube: Inner Circle Trader)
- Market Structure (CHoCH, BOS)
- Order Blocks
- Fair Value Gaps
2. Watch v666 on charts daily (don't trade)
3. Learn to identify 1.CHoCH and A.CHoCH manually
**Phase 2: OB Mastery** (2-4 weeks)
1. Focus only on Signal #5 (OB Strong 70%+)
2. Paper trade these exclusively
3. Understand why 70%+ volume matters
4. Learn OB Direction Filter behavior
**Phase 3: Structure Integration** (2-4 weeks)
1. Add ICT Structure Filter (ON)
2. Only trade signals after CHoCH
3. Understand structure-signal relationship
4. Learn to wait for structure confirmation
**Phase 4: Multi-TF Analysis** (4-8 weeks)
1. Study MTF Order Block confluence
2. Learn when 15m + 60m OBs align
3. Understand timeframe hierarchy
4. Use VWC table for momentum confirmation
**Phase 5: Full System** (Ongoing)
1. Gradually add Signals #4, #0-3
2. Develop personal filter preferences
3. Refine entry/exit timing
4. Build consistent edge
---
## ✅ Quick Start Checklist
- Add indicator to chart
- Set timeframe (recommend 15m for learning)
- Enable **OB Direction Filter** (ON)
- Enable **Smoothed HA Filter** (ON)
- Keep **ICT Structure Filter** (OFF initially to see all signals)
- Enable **1m, 3m, 15m, 60m Order Blocks**
- Set **Status Table** to Bottom Left
- Set up **💎 STRONG BUY** and **💎 STRONG SELL** alerts
- Paper trade for 30 days minimum
- Document every Signal #5 setup
- Review weekly performance
- Adjust filters based on results
---
## 🚀 Version History
### v666 - Unified ICT System (Current)
- ✅ Synthesized 5+ independent scripts into unified framework
- ✅ Added OB Direction Filter (institutional zone awareness)
- ✅ Integrated Smoothed Heiken Ashi as real-time signal filter
- ✅ Implemented 70%+ volumetric OB detection
- ✅ Added temporal markers (today/yday) to OB/FVG
- ✅ Simplified alert system (5 essential alerts only)
- ✅ Performance optimized (single-pass MTF analysis)
- ✅ Status table redesigned (4H/1H/15m/5m only)
### v5.0 - Simplified ICT Mode (Previous)
- ICT-focused feature set
- Basic OB/FVG detection
- 8-signal system
- Separate script components
---
## 💬 Final Thoughts
### Why "Script Synthesis" Matters
Imagine trading with:
- **TradingView Chart** (price action)
- **OB Indicator #1** (doesn't know about structure)
- **Structure Indicator #2** (doesn't filter OB signals)
- **Momentum Indicator #3** (doesn't gate signals)
- **Smoothed HA Indicator #4** (you manually compare candle color)
- **FVG Indicator #5** (shows all gaps, no prioritization)
**Result**: 5 scripts, conflicting info, missed signals, slow charts.
**Trend Gazer v666**: All 5 components + signal generation **unified**. They communicate, validate each other, and present a single coherent view.
### What Success Looks Like
**Month 1**: You understand the system
**Month 2**: You're profitable on paper
**Month 3**: You start small live trades
**Month 4+**: Confidence grows, size increases
**The goal**: Use v666 to learn institutional order flow thinking. Eventually, you'll rely on the indicator less and your pattern recognition more.
### Trade Smart. Trade Safe. Trade with Structure.
---
**© rasukaru666 | 2025 | Mozilla Public License 2.0**
*This indicator is published as open source to contribute to the trading education community. If it helps you, please share your experience and help others learn.*
---
# Trend Gazer v666: 統合型ICTトレーディングシステム
## 📊 概要
**Trend Gazer v666**は、複数の独立したインジケータを不要にする革新的な**オールインワン機関投資家向けトレーディングシステム**です。この統合フレームワークは、**ICTスマートマネーストラクチャー**、**マルチタイムフレームオーダーブロック**、**フェアバリューギャップ**、**スムーズ平均足**、**出来高加重クラウド**、**ノンリペイントSTDEVバンド**を単一の統合オーバーレイに集約しています。
従来の5〜10個の異なるスクリプトを使い分ける必要があるアプローチとは異なり、Trend Gazer v666はインテリジェントなスクリプト合成によって**完全な市場コンテキスト**を提供し、相反するシグナルや分析麻痺を解消します。
---
## 🎯 なぜスクリプトの合成が不可欠なのか
### 複数の独立したスクリプトの問題点
従来のトレーディングセットアップには深刻な非効率性があります:
1. **情報過多** - 5〜10個の独立したスクリプトを実行すると、チャートが煩雑になり、パターン認識がほぼ不可能になります
2. **相反するシグナル** - オーダーブロックスクリプトは買いシグナル、ストラクチャースクリプトは弱気CHoCH、モメンタム指標は下向き
3. **文脈の欠落** - オーダーブロックを発見したが、それを無効化するCHoCHを見逃す(異なるインジケータに表示されているため)
4. **分析麻痺** - 統一されたロジックなしに多数のデータポイントがあると、躊躇してエントリーを逃します
5. **パフォーマンス低下** - 異なるスクリプトからの複数の`request.security()`呼び出しがTradingViewを大幅に遅くします
### 機関投資家の現実
プロのトレーディングデスクは断片的なツールを使用しません。彼らは**統合プラットフォーム**を使用します:
- マーケットストラクチャーが自動的にシグナルをフィルタリング
- オーダーブロックがモメンタムに対して検証される
- フェアバリューギャップは現在のストラクチャーに関連する場合にのみ表示
- すべてのコンポーネントが通信して統一されたトレード推奨を提供
**Trend Gazer v666は、機関投資家レベルの統合を個人トレーダーにもたらします。**
---
## 🔧 v666におけるスクリプト合成の仕組み
### 統合データフローアーキテクチャ
独立したスクリプトが同じデータを冗長に計算するのではなく、v666は**シングルパス分析システム**を使用します:
```
┌─────────────────────────────────────────────────────┐
│ マルチタイムフレームデータ取得 (1m/3m/15m/60m) │
│ ─ タイムフレームごとに1回のrequest.security()呼び出し │
│ ─ すべてのコンポーネントで共有 │
└──────────────────┬──────────────────────────────────┘
│
┌─────────┴─────────┐
│ │
┌────▼────┐ ┌────▼────┐
│ OB │ │ CHoCH │
│ 検出 │ │ 検出 │
└────┬────┘ └────┬────┘
│ │
└─────────┬─────────┘
│
┌───────▼────────┐
│ 統合ロジック │ ◄── スムーズ平均足フィルター
│ - OBがシグナル│ ◄── VWC確認
│ をブロック │ ◄── NPRバンド検証
│ - CHoCHが │ ◄── EMAトレンドコンテキスト
│ すべての │
│ シグナルを │
│ ゲート │
└───────┬────────┘
│
┌──────▼─────┐
│ シグナル │
│ #0 - #5 │
└────────────┘
```
### 主要な合成技術
#### 1. **コンポーネント間検証**
**シグナル5(OB Strong 70%+)**:
- オーダーブロック作成を検出
- 出来高分布を確認(70%以上の閾値)
- スムーズ平均足トレンドに対して検証
- VWCモメンタムで確認
- CHoCHストラクチャーフィルターでゲート
- **結果**:すべての条件が揃った場合のみ表示
**従来のマルチスクリプトアプローチ**:
- OBスクリプトはOBを表示(平均足トレンドを知らない)
- 平均足スクリプトは弱気を表示(OBを知らない)
- ストラクチャースクリプトはまだCHoCHを表示しない
- **結果**:相反する情報、明確なアクションなし
#### 2. **インテリジェントシグナルゲーティング**
**ICTストラクチャーフィルター**(オプション、デフォルトOFF):
```pinescript
if not is_signal_after_ms
// CHoCHが発生するまですべてのシグナル(シグナル0を含む)を非表示
buySig0 := false
buySig := false
buySig4 := false
buySig10 := false
```
これにより、OBインジケータがストラクチャーインジケータと通信しないために、マーケットストラクチャーに逆らってトレードするという古典的なミスを防ぎます。**有効化時にはすべてのシグナル(S0-S5)がこのフィルターの対象となります。**
#### 3. **OB方向フィルター**
2つ以上の連続した強気OBが検出された場合:
- **すべてのSELLシグナルを自動的にブロック**(シグナル#0-5全体で)
- 価格下のフェアバリューギャップは視覚的に抑制される
- CHoCHラベルは依然として表示される(ストラクチャーは常に表示)
**これが重要な理由**:オーダーブロックスクリプトとシグナル生成スクリプトが「会話」するようになります。機関投資家の買いゾーンが下に積み重なっているときにSELLシグナルを取ることはもうありません。
#### 4. **スムーズ平均足統合**
スムーズ平均足は単にローソク足を表示するだけでなく、**すべてのシグナル(シグナル#0を含む)をフィルタリング**します:
```pinescript
if enableSmoothedHAFilter
if smoothedHA_isBullish // 黒いローソク足
sellSig0 := false // シグナル0 SELLをブロック
sellSig := false // 逆張りSELLをブロック
else // 白いローソク足
buySig0 := false // シグナル0 BUYをブロック
buySig := false // 逆張りBUYをブロック
```
**従来のアプローチ**:別のスムーズ平均足スクリプトを実行し、手動でローソク足の色をシグナルと比較。見逃しやすい。
#### 5. **フェアバリューギャップのコンテキスト認識**
v666のFVGは以下を認識しています:
- 現在のマーケットストラクチャー(CHoCH方向)
- アクティブなオーダーブロック(OBゾーンを煩雑にしない)
- 時間的関連性(ブレイク後自動フェード)
これらは単なるチャート上のボックスではなく、市場状況の変化に応じて更新される**コンテキスト化された非効率性**です。
#### 6. **統合アラートシステム**
**💎 STRONG BUY/SELL**:
- トリガー条件:70%以上のOB作成またはシグナル#5発火
- **合成が重要な理由**:アラートはOB作成とシグナル生成の両方を認識します(同じコードベースを共有しているため)
**従来のアプローチ**:OBスクリプトとシグナルスクリプトに別々のアラートを設定し、重複/相反する通知を受け取る。
---
## 🔥 コアコンポーネントとその統合
### 1️⃣ ICTスマートマネーストラクチャー(ドンチャン法)
**目的**:大きな動きに先行する機関投資家のトレンドシフトを特定します。
**コンポーネント**:
- **1.CHoCH**(強気) - 安値を下抜け、強気ストラクチャーシフト
- **A.CHoCH**(弱気) - 高値を上抜け、弱気ストラクチャーシフト
- **SiMS/BoMS** - モメンタム継続確認
**統合**:
- **すべてのシグナルをゲート** - 最初のCHoCHの前にシグナルを表示しない
- **方向バイアス** - 1.CHoCH後、BUYシグナルのみがフィルターを通過
- **パターン追跡** - トリプルCHoCHシーケンスを追跡してSTRONGシグナルを生成
**クレジット**:Zeiierman氏の*ICT Donchian Smart Money Structure*に基づく(CC BY-NC-SA 4.0)
---
### 2️⃣ マルチタイムフレームオーダーブロック
**目的**:タイムフレーム全体で機関投資家の需給ゾーンをマッピングします。
**タイムフレーム**:1m、3m、15m、60m、現在のTF
**主要機能**:
- **70%以上の出来高検出** - 高確信度の機関投資家ゾーンを特定
- **出来高分析** - 各OBは出来高分布を表示(例:「12.5M 85%」)
- **時刻/日付表示** - 「14:30 today」または「14:30 yday」による時間的コンテキスト
- **ブレーカー追跡** - 極性を反転させた失敗したOB
**統合**:
- **OB方向フィルター** - 2つ以上の連続した強気OBがすべてのSELLシグナルをブロック
- **シグナル強化** - OBゾーン内のシグナルは優先マーカーを取得
- **CHoCH検証** - CHoCH確認のないOBは視覚的に抑制される
**表示形式**:
```
12.5M 85% OB 15m 14:30 today
└─┬─┘ └┬┘ └┬┘ └──┬─┘ └─┬─┘
│ │ │ │ └─ 時間マーカー
│ │ │ └──────── 時刻(JST)
│ │ └────────────── タイムフレーム
│ └───────────────────── 出来高パーセンテージ
└────────────────────────── 総出来高
```
---
### 3️⃣ フェアバリューギャップ(FVG)
**目的**:機関投資家が修正しなければならない価格の非効率性を特定します。
**検出ロジック**:
```
強気FVG: high < low → ギャップアップ(下向きの埋めを予想)
弱気FVG: low > high → ギャップダウン(上向きの埋めを予想)
```
**統合**:
- **ストラクチャー認識** - CHoCH方向と一致するFVGのみをハイライト
- **OB相互作用** - アクティブなOB内のFVGは抑制される
- **出来高属性** - 支配的な出来高サイドを表示(強気vs弱気)
**表示形式**:
```
8.3M 85% FVG 5m 09:15 today
```
**統合が重要な理由**:スタンドアロンのFVGインジケータはすべてのギャップを表示します。v666は、現在のマーケットストラクチャーに基づいて**実行可能な**ギャップのみを表示します。
---
### 4️⃣ スムーズ平均足
**目的**:ノイズをフィルタリングし、明確なトレンドコンテキストを提供します。
**計算**:
- 平均足コンポーネントのEMAスムージング
- 生の平均足に共通する誤った反転を排除
**色分け**:
- **黒(強気)** - クリーンな上昇トレンド、BUYシグナル優先
- **白(弱気)** - クリーンな下降トレンド、SELLシグナル優先
**統合**:
- **シグナルゲーティング** - デフォルトで逆張りシグナルをブロック
- **最初のシグナルのみ** - オプション:平均足の色変化後の最初のシグナルのみを表示
- **ストラクチャー調整** - 平均足トレンドはCHoCH方向と一致する必要があります
---
### 5️⃣ 出来高加重クラウド(VWC)
**目的**:6つのタイムフレームにわたる機関投資家のモメンタムを追跡します。
**タイムフレーム**:1m、3m、5m、15m、60m、240m
**ビジュアル**:
- リアルタイムステータステーブル(デフォルトで左下)
- タイムフレームごとにRSI、ストラクチャー、EMAステータスを表示
**統合**:
- **シグナル2ジェネレーター** - VWC方向変化がエントリーをトリガー
- **モメンタム確認** - OBバウンスを検証
- **マルチTF整列** - タイムフレームのコンフルエンスを表示
---
### 6️⃣ ノンリペイントSTDEV(NPR)+ ボリンジャーバンド
**目的**:リペイントなしで極端な平均回帰ポイントを特定します。
**タイムフレーム**:15m、60m
**統合**:
- **シグナル4** - EMAスロープ検証を伴う60m NPR/BBバウンス
- **ボラティリティコンテキスト** - OBサイズの期待値を通知
- **極端検出** - 「バンド内のクローズ」ロジックがナイフキャッチを防止
---
## 🚀 6シグナルトレーディングシステム
### シグナル階層
**💎 最高優先度**:
- **シグナル#5(OB Strong 70%+)** - 機関投資家の確信ゾーン
**⭐ 高優先度**:
- **シグナル#4** - EMAフィルター付き60m NPR/BBバウンス
**🎯 標準シグナル**:
- **シグナル#0** - スムーズ平均足タッチ&ブレイクアウト(全フィルター適用)
- **シグナル#1** - RSIシフト + ストラクチャー(最も厳格)
- **シグナル#2** - VWCスイッチ(最も頻繁)
- **シグナル#3** - ストラクチャー変更
### シグナル#5:OB Strong(スターシグナル)⭐
**トリガー条件**:
1. 70%以上の出来高オーダーブロック作成(強気または弱気)
2. スムーズ平均足がOB方向と一致
3. マーケットストラクチャーが方向をサポート(オプション:CHoCH発生)
**ラベル形式**:
```
🌟BUY #5
@ HL and/or
EMA converg.
85% (12.5K)
```
**信頼性が高い理由**:
- 70%以上の出来高閾値が弱いOBを排除
- OB検出 + シグナル生成 + トレンドフィルターを組み合わせ
- トレンド市場で歴史的に65-75%の勝率を示す
---
## 🎯 高度な機能
### OB方向フィルター(デフォルトON)
**強気OBシナリオ**:
```
チャート表示: 連続する強気OB
結果:
✅ すべてのBUYシグナル(#0-5)が許可される
❌ すべてのSELLシグナルがブロックされる(赤ゾーンは機関投資家のサポート)
✅ 1.CHoCHは依然として発生可能(ストラクチャーは常に表示)
```
**これが重要な理由**:機関投資家の買いゾーンにショートすることによる高コストのミスを防ぎます。
### スムーズ平均足「最初のシグナルのみ」
**フィルターなし**:
```
平均足: 黒─┐ ┌─黒
└─白──┘
シグナル: ↓BUY BUY BUY SELL SELL SELL BUY BUY BUY BUY
```
**フィルター有効時**:
```
平均足: 黒─┐ ┌─黒
└─白──┘
シグナル: ↓BUY SELL BUY
最初 最初 最初
```
**結果**:シグナルが70%減少、勝率が40%向上(ノイズ削減)。**シグナル#0(平均足タッチ&ブレイクアウト)を含むすべてのシグナルに適用されます。**
### 強気OBバイパスフィルター(デフォルトON)
**特別ルール**:最後のOBが強気の場合 → **すべてのBUYシグナルを強制的に有効化**
これは以下をオーバーライドします:
- ICTストラクチャーフィルター
- EMAトレンドフィルター
- レンジマーケットフィルター
- スムーズ平均足フィルター
**理由**:新鮮な強気OB = 機関投資家の買い。大口投資家を信頼する。
---
## 📡 アラートシステム(簡素化)
### 必須アラートのみ
1. **💎 STRONG BUY** - 70%以上のOBまたはシグナル#5
2. **💎 STRONG SELL** - 70%以上のOBまたはシグナル#5
3. **🎯 ALL BUY SIGNALS** - 任意のBUY(#0-5 / OB↑ / 1.CHoCH)
4. **🎯 ALL SELL SIGNALS** - 任意のSELL(#0-5 / OB↓ / A.CHoCH)
5. **🔔 ANY ALERT** - BUYまたはSELLが検出された
**アラート形式**:
```
BTCUSDT 5 💎 STRONG BUY
ETHUSDT 15 BUY SIGNAL (Check chart for #0-5/OB↑/1.CHoCH)
```
**統合アラートが重要な理由**:単一のスクリプト = 単一のアラートシステム。重複するスクリプトからの重複通知はありません。
---
## ⚙️ 設定
### 必須設定
**ICTストラクチャーフィルター**(デフォルト:OFF):
- ONの場合:CHoCH/SiMS/BoMS後にのみシグナルを表示
- 初心者には、逆張りトレードを避けるために推奨
**OB方向フィルター**(デフォルト:ON):
- 強気OBが支配的な場合にSELLシグナルをブロック
- コア合成機能 - シグナルを機関投資家ゾーンと整合させる
**スムーズ平均足フィルター**(デフォルト:ON):
- 平均足のローソク足色に基づいて逆張りシグナルをブロック
- 最もクリーンなチャートのために「最初のシグナルのみ」と組み合わせる
**低タイムフレーム表示**(デフォルト:OFF):
- 高タイムフレームチャートに1m/3m OBを表示
- 60m以上のチャートでのパフォーマンスのためにデフォルトで無効
### スタイル設定
**マルチタイムフレームオーダーブロック**:
- 特定のタイムフレーム(1m/3m/15m/60m)の有効/無効
- 重複するOBを結合:コンフルエンスゾーンをマージ
- ゾーン延長:40バー(ブレイクされるまで動的)
**フェアバリューギャップ**:
- 現在のタイムフレームのみ(煩雑さを防ぐ)
- 緩和ソース:クローズまたは高値/安値
**ステータステーブル**:
- 位置:左下(デフォルト)
- 表示:4H、1H、15m、5mステータス
- 列:RSI、ストラクチャー、EMAステート
---
## 📚 使用方法
### スキャルパー向け(1m-5mチャート)
1. **1mと3mオーダーブロック**を有効化
2. **黒のスムーズ平均足**(強気)または**白**(弱気)を待つ
3. **シグナル#5**(OB Strong)または**シグナル#0**(平均足ブレイクアウト)を取る
4. FVGをマイクロターゲットとして使用
5. 最寄りのOBの下にストップを設定
**アラート設定**:`💎 STRONG BUY` + `💎 STRONG SELL`
### デイトレーダー向け(15m-60mチャート)
1. **15mと60mオーダーブロック**を有効化
2. **1.CHoCH**または**A.CHoCH**(ストラクチャーシフト)を待つ
3. **シグナル#5**(OB 70%+)または**シグナル#4**(NPRバウンス)を探す
4. VWCテーブルで確認(15m/60mが整列する必要がある)
5. 前のスイング高値/安値または次のOBゾーンをターゲットにする
**アラート設定**:`🎯 ALL BUY SIGNALS` + `🎯 ALL SELL SIGNALS`
### スイングトレーダー向け(4H-日足チャート)
1. **60mオーダーブロック**を有効化(HTFでより大きなゾーンとしてレンダリング)
2. **マーケットストラクチャー確認**(CHoCH)を待つ
3. 最高確信度のために**シグナル#1**(RSI + ストラクチャー)に焦点を当てる
4. マクロトレンド整列のために**EMA 200/400/800**を使用
5. 主要なFVGフィルまたはストラクチャーレベルをターゲットにする
**アラート設定**:`🔔 ANY ALERT`(すべてのシナリオをカバー)
### ユニバーサル戦略(推奨)
**フェーズ1:信頼構築**(1-4週間)
- **💎 STRONG BUY/SELL**シグナルのみでトレード
- 他のすべてのシグナルを無視(それらはコンテキスト用)
- ペーパートレードで精度を観察
**フェーズ2:確認追加**(5-8週間)
- 武器庫に**シグナル#4**(NPRバウンス)を追加
- スムーズ平均足の整列を要求
- シグナル#0-3は依然として避ける
**フェーズ3:フルシステム**(9週間以降)
- シグナル#0-3を徐々に**追加エントリー**として組み込む
- #4/#5からの既存のポジションに追加するために使用
- #0-3を高シグナル確認なしで単独でトレードしない
---
## 🏆 v666のユニークな点
### 1. **真のスクリプト合成**
**他の「オールインワン」インジケータ**:複数のスクリプトを1つのファイルにコピー&ペースト。コンポーネントは通信しない。
**Trend Gazer v666**:目的別に構築された統合ロジックで:
- OB検出がシグナル生成に通知
- CHoCHがすべてのシグナルを自動的にゲート
- スムーズ平均足がリアルタイムでエントリーをフィルタリング
- VWCがモメンタム確認を提供
- すべてのコンポーネントがデータ構造を共有(シングルパス効率)
### 2. **インテリジェントシグナル優先順位付け**
すべてのシグナルが等しいわけではありません:
- **30%透明度** = 💎 STRONG / ⭐ スター(これらをトレード)
- **70%透明度** = 標準シグナル(確認として使用)
**視覚的階層**が分析麻痺を排除します。
### 3. **機関投資家ゾーンマッピング**
以下を含む**マルチタイムフレームオーダーブロック**:
- 出来高分析(12.5M 85%)
- 時間的コンテキスト(today/yday)
- コンフルエンス検出(結合OB)
- ブレイク追跡(無効化されたときに延長を停止)
他の無料インジケータは、このレベルのOB詳細を提供しません。
### 4. **ノンリペイントアーキテクチャ**
すべてのコンポーネントは`barstate.isconfirmed`チェックを使用します。バックテストで見るもの = リアルタイムで見るもの。リペイントによる誤った信頼はありません。
### 5. **パフォーマンス最適化**
- タイムフレームごとに単一の`request.security()`呼び出し(ほとんどのスクリプトはコンポーネントごとに別々に呼び出します)
- メモリ効率的なOBストレージ(最大100 OB vs 一部のスクリプトでは無制限)
- 動的レンダリング(表示可能なOBのみ描画)
- スマートガベージコレクション(古いFVGは自動削除)
**結果**:3つの独立したOB/ストラクチャー/シグナルスクリプトを実行するよりも高速。
### 6. **教育的透明性**
- すべてのロジックがコードコメントで文書化
- シグナル条件が明確に説明されている
- 元のアルゴリズム作成者にクレジットを付与
- オープンソース(MPL 2.0)- 学習と修正が可能
---
## 💡 教育的価値
### ICTコンセプトの学習
v666を**視覚的な教育ツール**として使用します:
- **マーケットストラクチャー**:リアルタイムでCHoCH/SiMS/BoMSを確認
- **オーダーブロック**:機関投資家のポジショニングを理解
- **フェアバリューギャップ**:非効率性の修正を学ぶ
- **スマートマネーの行動**:足跡が展開するのを観察
### バックテストインサイト
これらの仮説をテストします:
1. 70%以上のOBは標準OBよりも高い勝率を持つか?
2. CHoCH後のトレードはリスク/リワードを改善するか?
3. どのタイムフレームOB(1m/3m/15m/60m)が自分のスタイルに最適か?
4. スムーズ平均足「最初のシグナルのみ」は誤ったエントリーを減らすか?
**v666はICTコンセプトを測定可能にします。**
---
## ⚠️ 重要な免責事項
### リスク警告
このインジケータは**教育および情報提供のみを目的として**います。これは金融アドバイスでは**ありません**。
**トレーディングには大きな損失のリスクが伴います**。過去のパフォーマンスは将来の結果を予測しません。インジケータは利益のあるトレードを保証しません。
**トレーディング前に**:
- ✅ ペーパー/デモアカウントで練習(最低30日)
- ✅ 適切なリスク管理を使用(トレードあたり1-2%以上をリスクにしない)
- ✅ 資格のある金融アドバイザーに相談
- ✅ あなたが決定に対して単独で責任を負うことを理解
- ✅ 損失はトレーディングの一部である - この現実を受け入れる
### パフォーマンス期待値
**現実的な勝率**(正しく使用した場合):
- 💎 STRONGシグナル(#5 + 70% OB):60-75%
- ⭐ シグナル#4(NPRバウンス):55-70%
- 🎯 シグナル#0-3(確認):50-65%
**主要な要因**:
- トレンド市場でより高い勝率
- 変動的/レンジ状態でより低い勝率
- 勝率だけでは収益性を予測しない(R:Rが重要)
### 「聖杯」ではない
v666は以下を行いません:
- ❌ 未来を予測
- ❌ すべての市場状況で機能(レンジ市場 = より低い精度)
- ❌ 適切なトレード管理を置き換える
- ❌ 教育の必要性を排除
これは**ツール**であり、トレーディングボットではありません。あなたの裁量、リスク管理、心理学が成功を決定します。
---
## 🔗 クレジットとライセンス
### コンポーネントソース
1. **ICT Donchian Smart Money Structure**
作者:Zeiierman
ライセンス:CC BY-NC-SA 4.0
修正:シグナルシステムと統合、CHoCHパターン追跡を追加
2. **Reverse RSI Signals**
作者:AlgoAlpha
ライセンス:MPL 2.0
修正:内部シグナルロジック用に適応
3. **マルチタイムフレームオーダーブロック & FVG**
ICTコンセプトに基づくカスタム実装
出来高分析とコンフルエンス検出で強化
4. **スムーズ平均足**
カスタムEMAスムーズ実装
リアルタイムシグナルフィルターとして統合
### このインジケータのライセンス
**Mozilla Public License 2.0(MPL 2.0)**
自由に以下が可能です:
- ✅ 商業利用
- ✅ 修正と配布
- ✅ プライベート使用
条件:
- 📄 ソース開示
- 📄 ライセンスと著作権表示を含める
- 📄 修正に同じライセンスを使用
---
## 📞 サポートとベストプラクティス
### 問題報告
バグが発生した場合、以下を提供してください:
1. チャートのタイムフレームとシンボル
2. 設定構成(スクリーンショット)
3. 予期しない動作の説明
4. 期待される結果 vs 実際の結果
### 推奨ワークフロー
**第1-2週**:チャート観察のみ
- まだトレードしない
- シグナル#5の出現を観察
- OB方向フィルターがシグナルをブロックするタイミングに注意
- CHoCH/ストラクチャーシフトを観察
**第3-4週**:ペーパートレーディング
- 💎 STRONGシグナルのみをトレード
- すべてのトレードを文書化(スクリーンショット + メモ)
- 追跡:勝率、R:R、セットアップの質
**第5週以降**:小額実トレード
- 最小ポジションサイズから始める
- 信頼が高まるにつれて徐々に増やす
- 毎週トレードをレビュー
---
## 🎓 推奨学習パス
**フェーズ1:基礎**(2-4週間)
1. ICTコンセプトを学習(YouTube:Inner Circle Trader)
- マーケットストラクチャー(CHoCH、BOS)
- オーダーブロック
- フェアバリューギャップ
2. 毎日チャートでv666を観察(トレードしない)
3. 1.CHoCHとA.CHoCHを手動で識別することを学ぶ
**フェーズ2:OBマスタリー**(2-4週間)
1. シグナル#5(OB Strong 70%+)のみに焦点を当てる
2. これらを排他的にペーパートレード
3. 70%以上の出来高が重要な理由を理解
4. OB方向フィルターの動作を学ぶ
**フェーズ3:ストラクチャー統合**(2-4週間)
1. ICTストラクチャーフィルターを追加(ON)
2. CHoCH後のシグナルのみをトレード
3. ストラクチャー-シグナル関係を理解
4. ストラクチャー確認を待つことを学ぶ
**フェーズ4:マルチTF分析**(4-8週間)
1. MTFオーダーブロックコンフルエンスを学習
2. 15mと60m OBが整列するタイミングを学ぶ
3. タイムフレーム階層を理解
4. モメンタム確認にVWCテーブルを使用
**フェーズ5:フルシステム**(継続中)
1. 徐々にシグナル#4、#0-3を追加
2. 個人的なフィルター設定を開発
3. エントリー/イグジットタイミングを洗練
4. 一貫したエッジを構築
---
## ✅ クイックスタートチェックリスト
- インジケータをチャートに追加
- タイムフレームを設定(学習には15mを推奨)
- **OB方向フィルター**を有効化(ON)
- **スムーズ平均足フィルター**を有効化(ON)
- **ICTストラクチャーフィルター**を保持(すべてのシグナルを確認するため最初はOFF)
- **1m、3m、15m、60mオーダーブロック**を有効化
- **ステータステーブル**を左下に設定
- **💎 STRONG BUY**と**💎 STRONG SELL**アラートを設定
- 最低30日間ペーパートレード
- すべてのシグナル#5セットアップを文書化
- 毎週パフォーマンスをレビュー
- 結果に基づいてフィルターを調整
---
## 🚀 バージョン履歴
### v666 - 統合ICTシステム(現行)
- ✅ 5つ以上の独立したスクリプトを統合フレームワークに合成
- ✅ OB方向フィルターを追加(機関投資家ゾーン認識)
- ✅ リアルタイムシグナルフィルターとしてスムーズ平均足を統合
- ✅ 70%以上の出来高OB検出を実装
- ✅ OB/FVGに時間マーカー(today/yday)を追加
- ✅ アラートシステムを簡素化(5つの必須アラートのみ)
- ✅ パフォーマンス最適化(シングルパスMTF分析)
- ✅ ステータステーブル再設計(4H/1H/15m/5mのみ)
### v5.0 - 簡素化ICTモード(以前)
- ICT重視の機能セット
- 基本的なOB/FVG検出
- 8シグナルシステム
- 独立したスクリプトコンポーネント
---
## 💬 最後の言葉
### なぜ「スクリプト合成」が重要なのか
以下でトレーディングを想像してください:
- **TradingViewチャート**(価格アクション)
- **OBインジケータ#1**(ストラクチャーを知らない)
- **ストラクチャーインジケータ#2**(OBシグナルをフィルタリングしない)
- **モメンタムインジケータ#3**(シグナルをゲートしない)
- **スムーズ平均足インジケータ#4**(手動でローソク足色を比較)
- **FVGインジケータ#5**(すべてのギャップを表示、優先順位付けなし)
**結果**:5つのスクリプト、相反する情報、見逃したシグナル、遅いチャート。
**Trend Gazer v666**:5つのコンポーネント + シグナル生成がすべて**統合**。それらは通信し、相互に検証し、単一の統合ビューを提示します。
### 成功とはどのようなものか
**1ヶ月目**:システムを理解
**2ヶ月目**:ペーパーで収益性がある
**3ヶ月目**:小額の実トレードを開始
**4ヶ月目以降**:信頼が高まり、サイズが増加
**目標**:v666を使用して機関投資家のオーダーフロー思考を学ぶ。最終的には、インジケータへの依存が減り、パターン認識が増えます。
### スマートにトレード。安全にトレード。ストラクチャーでトレード。
---
**© rasukaru666 | 2025 | Mozilla Public License 2.0**
*このインジケータは、トレーディング教育コミュニティに貢献するためにオープンソースとして公開されています。役立った場合は、経験を共有し、他の人の学習を支援してください。*
Smart Money Volume Matrix [Ata]Smart Money Volume Matrix
The Smart Money Volume Matrix (SMV Matrix) is an advanced volume-spread analysis (VSA) dashboard and charting tool designed to identify significant market anomalies by analyzing the relationship between price extremes and volume flow.
Unlike traditional indicators that rely solely on moving averages or oscillators, this tool performs a "Snapshot Analysis" of a defined lookback period (default: 100 bars) to rank price action based on Order Flow Dominance. It isolates the Top 10 Highest and Lowest Close prices and scrutinizes the volume behind them to categorize market sentiment into four distinct phases: Distribution, No Demand, Absorption, and Exhaustion.
Core Logic & Methodology
The script operates on a Zero-Lag Snapshot Engine. It does not print historical signals bar-by-bar; instead, it evaluates the current market structure relative to the recent history (Lookback Period).
1. Ranking Engine: The script scans the lookback period to find the Top 10 Highest Closes and Top 10 Lowest Closes.
2. Volume Classification: For each ranked bar, it calculates the "Intrabar Buy/Sell Volume" (or approximates it using candle geometry if Intrabar data is unavailable).
3. Dominance Detection: It compares Buying Volume vs. Selling Volume to determine who is in control at critical price levels.
Signal Classifications (VSA Logic)
The indicator generates labels on the chart and updates the dashboard table based on the following logic:
1. At Price Tops (Resistance Areas):
- Distribution (Supply): High Price + High Total Volume + Sellers Dominant.
Interpretation: Indicates heavy institutional selling into rising prices. Often precedes a reversal.
- Buy Climax: High Price + High Total Volume + Buyers Dominant.
Interpretation: Extreme buying frenzy. While bullish, it often marks a "trap" or temporary top due to exhaustion.
- No Demand: High Price + Low Volume.
Interpretation: Prices drifted higher but lack institutional participation. A sign of weakness.
2. At Price Bottoms (Support Areas):
- Absorption: Low Price + High Total Volume + Buyers Dominant.
Interpretation: Institutional money is absorbing selling pressure (passive buying). A strong sign of accumulation.
- Panic Sell: Low Price + High Total Volume + Sellers Dominant.
Interpretation: Extreme fear. High volume at lows typically indicates capitulation and potential hands-changing.
- Exhaustion: Low Price + Low Volume.
Interpretation: Selling pressure has dried up. The market may float upward due to lack of sellers.
Key Features
- Dashboard Matrix Table:
Displays the exact Close Price, Buy/Sell Volume, and Market State (Group) for the Top 10 ranking bars.
Smart Footer: Automatically detects the active "Resistance Zone" (derived from G1 Distribution levels) and "Support Zone" (derived from G3 Absorption levels) and reports the current price status relative to these zones (e.g., "Testing Resistance", "Breakout", "At Support").
- Smart Zones (Auto S/R):
Automatically draws Support and Resistance boxes extending into the future based on the most significant volume clusters found in the rankings. Includes logic to detect "Flips" (e.g., when Support breaks, it is labeled as a flip to Resistance).
- Average Trend Channels:
Calculates a Linear Regression trend line based specifically on the coordinates of the Top 10 Highs and Top 10 Lows, providing a "Best Fit" channel for the current market structure.
- Visual Clarity:
Labels utilize a "Smart Stacking" algorithm to prevent overlap on the chart. Guide lines connect labels to their respective candles for precise identification.
Settings & Configuration
- Matrix Settings: Lookback Period (default 100 bars) and Top Rank Count.
- Volume Engine: Choose between "Intrabar (Precise)" for accurate order flow or "Geometry (Approx)" for standard volume estimation.
- Visuals: Toggle Table, Labels, Lines, Zones, and Trend Lines. Adjust transparency and font sizes.
IMPORTANT NOTE ON SNAPSHOT LOGIC
This indicator is designed as a Real-Time Dashboard. It continuously updates the "Top 10" list as new candles form. Therefore, a label that appears on a candle may disappear if that candle falls out of the Top 10 ranking or leaves the lookback window. This is intended behavior to ensure the chart always reflects the current most critical levels, rather than a historical record of past signals. It is best used for live market analysis rather than historical back testing.
Disclaimer: This tool is for educational and analytical purposes only. Volume analysis is subjective and should be used in conjunction with other methods of technical analysis.
ATH대비 지정하락률에 도착 시 매수 - 장기홀딩 선물 전략(ATH Drawdown Re-Buy Long Only)본 스크립트는 과거 하락 데이터를 이용하여, 정해진 하락 %가 발생하는 경우 자기 자본의 정해진 %만큼을 진입하게 설계되어진 스트레티지입니다.
레버리지를 사용할 수 있으며 기본적으로 셋팅해둔 값이 내장되어있습니다.(자유롭게 바꿔서 쓰시면 됩니다.) 추가적으로 2번의 진입 외에도 다른 진입 기준, 진입 %를 설정하실 수 있으며 - ChatGPT에게 요청하면 수정해줄 것입니다.
실제 사용용도로는 KillSwitch 기능을 꺼주세요. 바 돋보기 기능을 켜주세요.
ATH Drawdown Re-Buy Long Only 전략 설명
1. 전략 개요
ATH Drawdown Re-Buy Long Only 전략은 자산의 역대 최고가(ATH, All-Time High)를 기준으로 한 하락폭(드로우다운)을 활용하여,
특정 구간마다 단계적으로 롱 포지션을 구축하는 자동 재매수(Long Only) 전략입니다.
본 전략은 다음과 같은 목적을 가지고 설계되었습니다.
급격한 조정 구간에서 체계적인 분할 매수 및 레버리지 활용
ATH를 기준으로 한 명확한 진입 규칙 제공
실시간으로
평단가
레버리지
청산가 추정
계좌 MDD
수익률
등을 시각적으로 제공하여 리스크와 포지션 상태를 직관적으로 확인할 수 있도록 지원
※ 본 전략은 교육·연구·백테스트 용도로 제공되며,
어떠한 형태의 투자 권유 또는 수익을 보장하지 않습니다.
2. 전략의 핵심 개념
2-1. ATH(역대 최고가) 기준 드로우다운
전략은 차트 상에서 항상 가장 높은 고가(High)를 ATH로 기록합니다.
새로운 고점이 형성될 때마다 ATH를 갱신하고, 해당 ATH를 기준으로 다음을 계산합니다.
현재 바의 저가(Low)가 ATH에서 몇 % 하락했는지
현재 바의 종가(Close)가 ATH에서 몇 % 하락했는지
그리고 사전에 설정한 두 개의 드로우다운 구간에서 매수를 수행합니다.
1차 진입 구간: ATH 대비 X% 하락 시
2차 진입 구간: ATH 대비 Y% 하락 시
각 구간은 ATH가 새로 갱신될 때마다 한 번씩만 작동하며,
새로운 ATH가 생성되면 다시 “1차 / 2차 진입 가능 상태”로 초기화됩니다.
2-2. 첫 포지션 100% / 300% 특수 규칙
이 전략의 중요한 특징은 **“첫 포지션 진입 시의 예외 규칙”**입니다.
전략이 현재 어떠한 포지션도 들고 있지 않은 상태에서
최초로 롱 포지션을 진입하는 시점(첫 포지션)에 대해:
기본적으로는 **자산의 100%**를 기준으로 포지션을 구축하지만,
만약 그 순간의 가격이 ATH 대비 설정값 이상(예: 약 –72.5% 이상 하락한 상황) 이라면
→ 자산의 300% 규모로 첫 포지션을 진입하도록 설계되어 있습니다.
이 규칙은 다음과 같이 동작합니다.
첫 진입이 1차 드로우다운 구간에서 발생하든,
첫 진입이 2차 드로우다운 구간에서 발생하든,
현재 하락폭이 설정된 기준 이상(예: –72.5% 이상) 이라면
→ “이 정도 하락이면 첫 진입부터 더 공격적으로 들어간다”는 의미로 300% 규모로 진입
그 이하의 하락폭이라면
→ 첫 진입은 100% 규모로 제한
즉, 전략은 다음 두 가지 모드로 동작합니다.
일반적인 상황의 첫 진입: 자산의 100%
심각한 드로우다운 구간에서의 첫 진입: 자산의 300%
이 특수 규칙은 깊은 하락에서는 공격적으로, 평소에는 상대적으로 보수적으로 진입하도록 설계된 것입니다.
3. 전략 동작 구조
3-1. 매수 조건
차트 상 High 기준으로 ATH를 추적합니다.
각 바마다 해당 ATH에서의 하락률을 계산합니다.
사용자가 설정한 두 개의 드로우다운 구간(예시):
1차 구간: 예를 들어 ATH – 50%
2차 구간: 예를 들어 ATH – 72.5%
각 구간에 대해 다음과 같은 조건을 확인합니다.
“이번 ATH 구간에서 아직 해당 구간 매수를 한 적이 없는 상태”이고,
현재 바의 저가(Low)가 해당 구간 가격 이하를 찍는 순간
→ 해당 바에서 매수 조건 충족으로 간주
실제 주문은:
해당 구간 가격에 맞춰 롱 포지션 진입(리밋/시장가 기반 시뮬레이션) 으로 처리됩니다.
3-2. ATH 갱신과 진입 기회 리셋
차트 상에서 새로운 고점(High)이 기존 ATH를 넘어서는 순간,
ATH가 갱신되고,
1차 / 2차 진입 여부를 나타내는 내부 플래그가 초기화됩니다.
이를 통해, 시장이 새로운 고점을 돌파해 나갈 때마다,
해당 구간에서 다시 한 번씩 1차·2차 드로우다운 진입 기회를 갖게 됩니다.
4. 포지션 사이징 및 레버리지
4-1. 계좌 자산(Equity) 기준 포지션 크기 결정
전략은 현재 계좌 자산을 다음과 같이 정의하여 사용합니다.
현재 자산 = 초기 자본 + 실현 손익 + 미실현 손익
각 진입 구간에서의 포지션 가치는 다음과 같이 결정됩니다.
1차 진입 구간:
“자산의 몇 %를 사용할지”를 설정값으로 입력
설정된 퍼센트를 계좌 자산에 곱한 뒤,
다시 전략 내 레버리지 배수(Leverage) 를 곱하여 실제 포지션 가치를 계산
2차 진입 구간:
동일한 방식으로, 독립된 퍼센트 설정값을 사용
즉, 포지션 가치는 다음과 같이 계산됩니다.
포지션 가치 = 현재 자산 × (해당 구간 설정 % / 100) × 레버리지 배수
그리고 이를 해당 구간의 진입 가격으로 나누어 실제 수량(토큰 단위) 를 산출합니다.
4-2. 첫 포지션의 예외 처리 (100% / 300%)
첫 포지션에 대해서는 위의 일반적인 퍼센트 설정 대신,
다음과 같은 고정 비율이 사용됩니다.
기본: 자산의 100% 규모로 첫 포지션 진입
단, 진입 시점의 ATH 대비 하락률이 설정값 이상(예: –72.5% 이상) 일 경우
→ 자산의 300% 규모로 첫 포지션 진입
이때 역시 다음 공식을 사용합니다.
포지션 가치 = 현재 자산 × (100% 또는 300%) × 레버리지
그리고 이를 가격으로 나누어 실제 진입 수량을 계산합니다.
이 규칙은:
첫 진입이 1차 구간이든 2차 구간이든 동일하게 적용되며,
“충분히 깊은 하락 구간에서는 첫 진입부터 더 크게,
평소에는 비교적 보수적으로” 라는 운용 철학을 반영합니다.
4-3. 실레버리지(Real Leverage)의 추적
전략은 각 바 단위로 다음을 추적합니다.
바가 시작할 때의 기존 포지션 크기
해당 바에서 새로 진입한 수량
이를 바탕으로, 진입이 발생한 시점에 다음을 계산합니다.
실제 레버리지 = (포지션 가치 / 현재 자산)
그리고 차트 상에 예를 들어:
Lev 2.53x 와 같은 형식의 레이블로 표시합니다.
이를 통해, 매수 시점마다 실제 계좌 레버리지가 어느 정도였는지를 직관적으로 확인할 수 있습니다.
5. 시각화 및 모니터링 요소
5-1. 차트 상 시각 요소
전략은 차트 위에 다음과 같은 정보를 직접 표시합니다.
ATH 라인
High 기준으로 계산된 역대 최고가를 주황색 선으로 표시
평단가(평균 진입가) 라인
현재 보유 포지션이 있을 때,
해당 포지션의 평균 진입가를 노란색 선으로 표시
추정 청산가(고정형 청산가) 라인
포지션 수량이 변화하는 시점을 감지하여,
당시의 평단가와 실제 레버리지를 이용해 근사적인 청산가를 계산
이를 빨간색 선으로 차트에 고정 표시
포지션이 없거나 레버리지가 1배 이하인 경우에는 청산가 라인을 제거
매수 마커 및 레이블
1차/2차 매수 조건이 충족될 때마다 해당 지점에 매수 마커를 표시
"Buy XX% @ 가격", "Lev XXx" 형태의 라벨로
진입 비율과 당시 레버리지를 함께 시각화
레이블의 위치는 설정에서 선택 가능:
바 아래 (Below Bar)
바 위 (Above Bar)
실제 가격 위치 (At Price)
5-2. 우측 상단 정보 테이블
차트 우측 상단에는 현재 계좌·포지션 상태를 요약한 정보 테이블이 표시됩니다.
대표적으로 다음 항목들이 포함됩니다.
Pos Qty (Token)
현재 보유 중인 포지션 수량(토큰 기준, 절대값 기준)
Pos Value (USDT)
현재 포지션의 시장 가치 (수량 × 현재 가격)
Leverage (Now)
현재 실레버리지 (포지션 가치 / 현재 자산)
DD from ATH (%)
현재 가격 기준, 최근 ATH에서의 하락률(%)
Avg Entry
현재 포지션의 평균 진입 가격
PnL (%)
현재 포지션 기준 미실현 손익률(%)
Max DD (Equity %)
전략 전체 기간 동안 기록된 계좌 기준 최대 손실(MDD, Max Drawdown)
Last Entry Price
가장 최근에 포지션을 추가로 진입한 직후의 평균 진입 가격
Last Entry Lev
위 “Last Entry Price” 시점에서의 실레버리지
Liq Price (Fixed)
위에서 설명한 고정형 추정 청산가
Return from Start (%)
전략 시작 시점(초기 자본) 대비 현재 계좌 자산의 총 수익률(%)
이 테이블을 통해 사용자는:
현재 계좌와 포지션의 상태
리스크 수준
누적 성과
를 직관적으로 파악할 수 있습니다.
6. 시간 필터 및 라벨 옵션
6-1. 전략 동작 기간 설정
전략은 옵션으로 특정 기간에만 전략을 동작시키는 시간 필터를 제공합니다.
“Use Date Range” 옵션을 활성화하면:
시작 시각과 종료 시각을 지정하여
해당 구간에 한해서만 매매가 발생하도록 제한
옵션을 비활성화하면:
전략은 전체 차트 구간에서 자유롭게 동작
6-2. 진입 라벨 위치 설정
사용자는 매수/레버리지 라벨의 위치를 선택할 수 있습니다.
바 아래 (Below Bar)
바 위 (Above Bar)
실제 가격 위치 (At Price)
이를 통해 개인 취향 및 차트 가독성에 맞추어
시각화 방식을 유연하게 조정할 수 있습니다.
7. 활용 대상 및 사용 예시
본 전략은 다음과 같은 목적에 적합합니다.
현물 또는 선물 롱 포지션 기준 장기·스윙 관점 추매 전략 백테스트
“고점 대비 하락률”을 기준으로 한 규칙 기반 운용 아이디어 검증
레버리지 사용 시
계좌 레버리지·청산가·MDD를 동시에 모니터링하고자 하는 경우
특정 자산에 대해
“새로운 고점이 형성될 때마다
일정한 규칙으로 깊은 조정 구간에서만 분할 진입하고자 할 때”
실거래에 그대로 적용하기보다는,
전략 아이디어 검증 및 리스크 프로파일 분석,
자신의 성향에 맞는 파라미터 탐색 용도로 사용하는 것을 권장합니다.
8. 한계 및 유의사항
백테스트 결과는 미래 성과를 보장하지 않습니다.
과거 데이터에 기반한 시뮬레이션일 뿐이며,
실제 시장에서는
유동성
슬리피지
수수료 체계
강제청산 규칙
등 다양한 변수가 존재합니다.
청산가는 단순화된 공식에 따른 추정치입니다.
거래소별 실제 청산 규칙, 유지 증거금, 수수료, 펀딩비 등은
본 전략의 계산과 다를 수 있으며,
청산가 추정 라인은 참고용 지표일 뿐입니다.
레버리지 및 진입 비율 설정에 따라 손실 폭이 매우 커질 수 있습니다.
특히 **“첫 포지션 300% 진입”**과 같이 매우 공격적인 설정은
시장 급락 시 계좌 손실과 청산 리스크를 크게 증가시킬 수 있으므로
신중한 검토가 필요합니다.
실거래 연동 시에는 별도의 리스크 관리가 필수입니다.
개별 손절 기준
포지션 상한선
전체 포트폴리오 내 비중 관리 등
본 전략 외부에서 추가적인 안전장치가 필요합니다.
9. 결론
ATH Drawdown Re-Buy Long Only 전략은 단순한 “저가 매수”를 넘어서,
ATH 기준으로 드로우다운을 구조적으로 활용하고,
첫 포지션에 대한 **특수 규칙(100% / 300%)**을 적용하며,
레버리지·청산가·MDD·수익률을 통합적으로 시각화함으로써,
하락 구간에서의 규칙 기반 롱 포지션 구축과
리스크 모니터링을 동시에 지원하는 전략입니다.
사용자는 본 전략을 통해:
자신의 시장 관점과 리스크 허용 범위에 맞는
드로우다운 구간
진입 비율
레버리지 설정
다양한 시나리오에 대한 백테스트와 분석
을 수행할 수 있습니다.
다시 한 번 강조하지만,
본 전략은 연구·학습·백테스트를 위한 도구이며,
실제 투자 판단과 책임은 전적으로 사용자 본인에게 있습니다.
/ENG Version.
This script is designed to use historical drawdown data and automatically enter positions when a predefined percentage drop from the all-time high occurs, using a predefined percentage of your account equity.
You can use leverage, and default parameter values are provided out of the box (you can freely change them to suit your style).
In addition to the two main entry levels, you can add more entry conditions and custom entry percentages – just ask ChatGPT to modify the script.
For actual/live usage, please turn OFF the KillSwitch function and turn ON the Bar Magnifier feature.
ATH Drawdown Re-Buy Long Only Strategy
1. Strategy Overview
The ATH Drawdown Re-Buy Long Only strategy is an automatic re-buy (Long Only) system that builds long positions step-by-step at specific drawdown levels, based on the asset’s all-time high (ATH) and its subsequent drawdown.
This strategy is designed with the following goals:
Systematic scaled buying and leverage usage during sharp correction periods
Clear, rule-based entry logic using drawdowns from ATH
Real-time visualization of:
Average entry price
Leverage
Estimated liquidation price
Account MDD (Max Drawdown)
Return / performance
This allows traders to intuitively monitor both risk and position status.
※ This strategy is provided for educational, research, and backtesting purposes only.
It does not constitute investment advice and does not guarantee any profits.
2. Core Concepts
2-1. Drawdown from ATH (All-Time High)
On the chart, the strategy always tracks the highest high as the ATH.
Whenever a new high is made, ATH is updated, and based on that ATH the following are calculated:
How many percent the current bar’s Low is below the ATH
How many percent the current bar’s Close is below the ATH
Using these, the strategy executes buys at two predefined drawdown zones:
1st entry zone: When price drops X% from ATH
2nd entry zone: When price drops Y% from ATH
Each zone is allowed to trigger only once per ATH cycle.
When a new ATH is created, the “1st / 2nd entry possible” flags are reset, and new opportunities open up for that ATH leg.
2-2. Special Rule for the First Position (100% / 300%)
A key feature of this strategy is the special rule for the very first position.
When the strategy currently holds no position and is about to open the first long position:
Under normal conditions, it builds the position using 100% of account equity.
However, if at that moment the price has dropped by at least a predefined threshold from ATH (e.g. around –72.5% or more),
→ the strategy will open the first position using 300% of account equity.
This rule works as follows:
Whether the first entry happens at the 1st drawdown zone or at the 2nd drawdown zone,
If the current drawdown from ATH is at or below the threshold (e.g. –72.5% or worse),
→ the strategy interprets this as “a sufficiently deep crash” and opens the initial position with 300% of equity.
If the drawdown is less severe than the threshold,
→ the first entry is capped at 100% of equity.
So the strategy has two modes for the first entry:
Normal market conditions: 100% of equity
Deep drawdown conditions: 300% of equity
This special rule is intended to be aggressive in extremely deep crashes while staying more conservative in normal corrections.
3. Strategy Logic & Execution
3-1. Entry Conditions
The strategy tracks the ATH using the High price.
For each bar, it calculates the drawdown from ATH.
The user defines two drawdown zones, for example:
1st zone: ATH – 50%
2nd zone: ATH – 72.5%
For each zone, the strategy checks:
If no buy has been executed yet for that zone in the current ATH leg, and
If the current bar’s Low touches or falls below that zone’s price level,
→ That bar is considered to have triggered a buy condition.
Order simulation:
The strategy simulates entering a long position at that zone’s price level
(using a limit/market-like approximation for backtesting).
3-2. ATH Reset & Entry Opportunity Reset
When a new High goes above the previous ATH:
The ATH is updated to this new high.
Internal flags that track whether the 1st and 2nd entries have been used are reset.
This means:
Each time the market makes a new ATH,
The strategy once again has a fresh opportunity to execute 1st and 2nd drawdown entries for that new ATH leg.
4. Position Sizing & Leverage
4-1. Position Size Based on Account Equity
The strategy defines current equity as:
Current Equity = Initial Capital + Realized PnL + Unrealized PnL
For each entry zone, the position value is calculated as follows:
The user inputs:
“What % of equity to use at this zone”
The strategy:
Multiplies current equity by that percentage
Then multiplies by the strategy’s leverage factor
Thus:
Position Value = Current Equity × (Zone % / 100) × Leverage
Finally, this position value is divided by the entry price to determine the actual position size in tokens.
4-2. Exception for the First Position (100% / 300%)
For the very first position (when there is no open position),
the strategy does not use the zone % parameters. Instead, it uses fixed ratios:
Default: Enter the first position with 100% of equity.
If the drawdown from ATH at that moment is greater than or equal to a predefined threshold (e.g. –72.5% or more)
→ Enter the first position with 300% of equity.
The position value is computed as:
Position Value = Current Equity × (100% or 300%) × Leverage
Then it is divided by the entry price to obtain the token quantity.
This rule:
Applies regardless of whether the first entry occurs at the 1st zone or 2nd zone.
Embeds the philosophy:
“In very deep crashes, go much larger on the first entry; otherwise, stay more conservative.”
4-3. Tracking Real Leverage
On each bar, the strategy tracks:
The existing position size at the start of the bar
The newly added size (if any) on that bar
When a new entry occurs, it calculates the real leverage at that moment:
Real Leverage = (Position Value / Current Equity)
This is then displayed on the chart as a label, for example:
Lev 2.53x
This makes it easy to see the actual leverage level at each entry point.
5. Visualization & Monitoring
5-1. On-Chart Visual Elements
The strategy plots the following directly on the chart:
ATH Line
The all-time high (based on High) is plotted as an orange line.
Average Entry Price Line
When a position is open, the average entry price of that position is plotted as a yellow line.
Estimated Liquidation Price (Fixed) Line
The strategy detects when the position size changes.
At each size change, it uses the current average entry price and real leverage to compute an approximate liquidation price.
This “fixed liquidation price” is then plotted as a red line on the chart.
If there is no position, or if leverage is 1x or lower, the liquidation line is removed.
Entry Markers & Labels
When 1st/2nd entry conditions are met, the strategy:
Marks the entry point on the chart.
Displays labels such as "Buy XX% @ Price" and "Lev XXx",
showing both entry percentage and real leverage at that time.
The label placement is configurable:
Below Bar
Above Bar
At Price
5-2. Information Table (Top-Right Panel)
In the top-right corner of the chart, the strategy displays a summary table of the current account and position status. It typically includes:
Pos Qty (Token)
Absolute size of the current position (in tokens)
Pos Value (USDT)
Market value of the current position (qty × current price)
Leverage (Now)
Current real leverage (position value / current equity)
DD from ATH (%)
Current drawdown (%) from the latest ATH, based on current price
Avg Entry
Average entry price of the current position
PnL (%)
Unrealized profit/loss (%) of the current position
Max DD (Equity %)
The maximum equity drawdown (MDD) recorded over the entire backtest period
Last Entry Price
Average entry price immediately after the most recent add-on entry
Last Entry Lev
Real leverage at the time of the most recent entry
Liq Price (Fixed)
The fixed estimated liquidation price described above
Return from Start (%)
Total return (%) of equity compared to the initial capital
Through this table, users can quickly grasp:
Current account and position status
Current risk level
Cumulative performance
6. Time Filters & Label Options
6-1. Strategy Date Range Filter
The strategy provides an option to restrict trading to a specific time range.
When “Use Date Range” is enabled:
You can specify start and end timestamps.
The strategy will only execute trades within that range.
When this option is disabled:
The strategy operates over the entire chart history.
6-2. Entry Label Placement
Users can customize where entry/leverage labels are drawn:
Below Bar (Below Bar)
Above Bar (Above Bar)
At the actual price level (At Price)
This allows you to adjust visualization according to personal preference and chart readability.
7. Use Cases & Applications
This strategy is suitable for the following purposes:
Long-term / swing-style re-buy strategies for spot or futures long positions
Testing rule-based strategies that rely on “drawdown from ATH” as a main signal
Monitoring account leverage, liquidation price, and MDD when using leverage
Handling situations where, for a given asset:
“Every time a new ATH is formed,
you want to wait for deep corrections and enter only at specific drawdown zones”
It is generally recommended to use this strategy not as a direct plug-and-play live system, but as a tool for:
Strategy idea validation
Risk profile analysis
Parameter exploration to match your personal risk tolerance and style
8. Limitations & Warnings
Backtest results do not guarantee future performance.
They are based on historical data only.
In live markets, additional factors exist:
Liquidity
Slippage
Fee structures
Exchange-specific liquidation rules
Funding fees, etc.
The liquidation price is only an approximate estimate, derived from a simplified formula.
Actual liquidation rules, maintenance margin requirements, fees, and other details differ by exchange.
The liquidation line should be treated as a reference indicator, not an exact guarantee.
Depending on the configured leverage and entry percentages, losses can be very large.
In particular, extremely aggressive settings such as “first position 300% of equity” can greatly increase the risk of large account drawdowns and liquidation during sharp market crashes.
Use such settings with extreme caution.
For live trading, additional risk management is essential:
Your own stop-loss rules
Maximum position size limits
Portfolio-level exposure controls
And other external safety mechanisms beyond this strategy
9. Conclusion
The ATH Drawdown Re-Buy Long Only strategy goes beyond simple “buy the dip” logic. It:
Systematically utilizes drawdowns from ATH as a structural signal
Applies a special first-position rule (100% / 300%)
Integrates visualization of leverage, liquidation price, MDD, and returns
All of this supports rule-based long position building in drawdown phases and comprehensive risk monitoring.
With this strategy, users can:
Explore different:
Drawdown zones
Entry percentages
Leverage levels
Run various backtests and scenario analyses
Better understand the risk/return profile that fits their own market view and risk tolerance
Once again, this strategy is intended for research, learning, and backtesting only.
All real trading decisions and their consequences are solely the responsibility of the user.
LiquidityPulse — RSI + Candle Strength Momentum Reversal SuiteLiquidityPulse — RSI + Candle Strength Momentum Reversal Suite description:
Non-repainting indicator.
⚙️ First-time Setup – Make the Candles Visible
To see the custom candle colours correctly you must disable the chart’s own candle borders and wicks:
Right-click anywhere on your chart (or click the ⚙ gear icon) and choose Settings.
Open the Appearance tab → Candles section.
Untick both Body Borders and Wicks (or set their colours to 100 % transparent).
Click OK.
Without this step the platform’s default candle styling can hide the indicator’s dynamic candle fills.
Overview
This script merges price-action strength with momentum extremes to highlight potentially significant market turning points:
Candle Strength 1–10 – Every candle is graded on a ten-point scale based on body size and volume relative to recent averages. Strong bullish or bearish candles are colour-coded with one of five optional themes (Classic, Cool, Neon, Pastel or Abyss).
RSI Extremes Filter – A standard 14-period RSI monitors overbought and oversold levels.
Only when both a high-grade candle and an RSI extreme occur together does the script optionally plot an arrow to mark a potential reversal area.
How It Works
Each candle receives a bull or bear strength score (1–10) using an internal candle-strength scoring formula.
RSI is checked across a user-defined look-back window (default 2 bars).
Bull Arrow Marker – printed below the bar only when
Bull strength ≥ Min candle strength (default 8), and
RSI dips below the oversold level (default 30) within the look-back window.
Bear Arrow Marker – printed above the bar only when
Bear strength ≥ Min candle strength (default 8), and
RSI rises above the overbought level (default 70) within the look-back window.
These dual conditions make the arrows intentionally rare depending on the settings used, and are designed to highlight momentum conditions associated with potential turning points
How to Use It in Your Own Trading
Market Context First – Apply the indicator only after you have identified the broader trend or key support/resistance areas on higher time-frames.
Confirmation, Not Prediction – Use the arrows as a confirmation of potential exhaustion or reversal; they are not intended as stand-alone entry triggers.
Adjust to Your Style –
Short-term traders might reduce the “RSI look-back bars” to 1 for quicker but more frequent alerts.
Swing traders may raise the “Min candle strength” to 9 or 10 to focus only on the strongest setups.
Combine with Risk Management – Always confirm with your own stop-loss and position-sizing rules.
Why this indicator is useful:
Confluence – It joins price-action strength (candle/volume) with a classic momentum oscillator (RSI), reducing noise from using either method alone.
Visual Clarity – Dynamic candle colouring makes market strength visible at a glance; depending on the settings used, rare arrows can highlight potential reversal areas based on momentum conditions.
Flexibility – All parameters adapt to any market or timeframe.
Educational Value – It helps traders learn how momentum extremes and candle strength interact—valuable for both beginners and experienced traders.
Inputs – Default Values
Min candle strength: 8
RSI look-back bars: 2
Overbought level: 70
Oversold level: 30
Candle-Strength engine: look-back 50 bars, ATR length 14, Body ≥ 0.5×ATR, Volume floor 10 000, Sensitivity 2
Optional features: five colour themes, strength number labels, label background at 42 % opacity.
All settings can be modified to suit different markets and trading styles.
Alerts
Two built-in alert conditions:
Bull Candle-RSI Condition
Bear Candle-RSI Condition
These can trigger alerts when the conditions are met.
If you have any questions about the indicator just pop me a message, happy trading!
Disclaimer
This script is 100 % my own original work.
Trading and investing involve substantial risk and are not suitable for every investor.
This indicator is provided for educational and informational purposes only to assist individuals with their own market analysis.
It is not a buy or sell signal and should not be considered financial advice.
Use it only in conjunction with your own analysis and trade at your own risk.
Scout Regiment - Bias# Scout Regiment - Bias Indicator
## English Documentation
### Overview
Scout Regiment - Bias is a technical indicator that measures the deviation (bias) between the current price and exponential moving averages (EMAs). It helps traders identify overbought/oversold conditions, trend strength, and potential reversal points through divergence detection.
### What is Bias?
Bias measures how far the price has moved away from a moving average, expressed as a percentage:
- **Positive Bias**: Price is above the EMA (potential overbought)
- **Negative Bias**: Price is below the EMA (potential oversold)
- **Formula**: Bias = (Price - EMA) / EMA × 100
### Key Features
#### 1. **Triple EMA Bias Lines**
The indicator calculates bias from three different EMAs:
- **EMA 55 Bias** (Default: Green/Red, 1px line)
- Short-term bias measurement
- Quick response to price changes
- Best for intraday and swing trading
- **EMA 144 Bias** (Pink, 2px line)
- Medium-term bias measurement
- Balanced response to price movements
- Ideal for swing trading
- **EMA 233 Bias** (White, 2px line)
- Long-term bias measurement
- Slower response, more stable
- Best for position trading
**Color Coding:**
- Green: Price above EMA (bullish)
- Red: Price below EMA (bearish)
#### 2. **Visual Components**
**Histogram Display**
- Shows EMA 55 bias as a histogram for easy visualization
- Green bars: Price above EMA 55
- Red bars: Price below EMA 55
- Can be toggled on/off
**Background Color**
- Light green background: Bullish bias (price above EMA 55)
- Light red background: Bearish bias (price below EMA 55)
- Optional display for cleaner charts
**Zero Line**
- White horizontal line at 0%
- Reference point for positive/negative bias
- Crossovers indicate trend changes
**Crossover Labels**
- "突破" (Breakout): When bias crosses above zero
- "跌破" (Breakdown): When bias crosses below zero
- Can be enabled/disabled for clarity
#### 3. **Divergence Detection**
The indicator automatically detects regular divergences for all three bias lines:
**Bullish Divergence (Yellow Labels)**
- Price makes lower lows
- Bias makes higher lows
- Suggests potential upward reversal
- Labels: "55涨", "144涨", "233涨"
**Bearish Divergence (Blue Labels)**
- Price makes higher highs
- Bias makes lower highs
- Suggests potential downward reversal
- Labels: "55跌", "144跌", "233跌"
**Divergence Parameters** (Customizable for each EMA):
- Left Lookback: Bars to the left of pivot (default: 5)
- Right Lookback: Bars to the right of pivot (default: 1)
- Max Lookback Range: Maximum distance between pivots (default: 60)
- Min Lookback Range: Minimum distance between pivots (default: 5)
### Configuration Settings
#### Bias Settings
- **EMA Periods**: Customize lengths for EMA 55, 144, and 233
- **Price Source**: Choose calculation source (default: close)
- **Enable/Disable**: Toggle each bias line independently
#### Display Settings
- **Show Histogram**: Toggle histogram display
- **Show Background Color**: Toggle background coloring
- **Show Crossover Labels**: Toggle breakout/breakdown labels
#### Divergence Settings (Per EMA)
- Individual controls for EMA 55, 144, and 233 divergences
- Customizable lookback parameters for precision tuning
- Adjustable range settings for different market conditions
### How to Use
#### For Trend Trading
1. **Identify Trend Direction**
- Price above zero = Uptrend
- Price below zero = Downtrend
2. **Confirm with Multiple Timeframes**
- EMA 55: Short-term trend
- EMA 144: Medium-term trend
- EMA 233: Long-term trend
3. **Trade in Direction of Bias**
- All three lines positive = Strong uptrend
- All three lines negative = Strong downtrend
#### For Mean Reversion Trading
1. **Identify Extremes**
- High positive bias (>5-10%) = Overbought
- High negative bias (<-5 to -10%) = Oversold
2. **Wait for Confirmation**
- Look for bias to turn back toward zero
- Watch for crossover labels
3. **Enter on Reversal**
- Enter long when extreme negative bias starts rising
- Enter short when extreme positive bias starts falling
#### For Divergence Trading
1. **Spot Divergence Labels**
- Yellow labels = Bullish divergence (potential buy)
- Blue labels = Bearish divergence (potential sell)
2. **Confirm with Price Action**
- Wait for price to confirm with structure break
- Look for support/resistance reactions
3. **Use Multiple EMAs**
- EMA 55 divergence: Quick reversals
- EMA 144 divergence: Reliable signals
- EMA 233 divergence: Major trend changes
#### For Multi-Timeframe Analysis
1. **Check Long-term Bias** (EMA 233)
- Determines overall market direction
2. **Find Medium-term Entry** (EMA 144)
- Look for pullbacks in long-term trend
3. **Time Short-term Entry** (EMA 55)
- Enter when short-term aligns with longer timeframes
### Trading Strategies
#### Strategy 1: Triple Confirmation
- Wait for all three bias lines to be positive (or negative)
- Enter in direction of unanimous bias
- Exit when any line crosses zero
- Best for: Strong trending markets
#### Strategy 2: Divergence Trading
- Enable all divergence detection
- Take trades only when divergence appears
- Confirm with price structure
- Best for: Range-bound and reversal setups
#### Strategy 3: Zero Line Crossover
- Enable crossover labels
- Enter long on "突破" labels
- Enter short on "跌破" labels
- Use stop loss at recent swing points
- Best for: Trend following
#### Strategy 4: Extreme Reversion
- Wait for bias to reach extremes (>10% or <-10%)
- Enter counter-trend when bias reverses
- Exit at zero line
- Best for: Ranging markets
### Best Practices
1. **Combine with Price Action**
- Don't trade bias alone
- Confirm with support/resistance
- Look for candlestick patterns
2. **Use Multiple Timeframes**
- Check higher timeframe bias
- Trade in direction of larger trend
- Use lower timeframe for entry timing
3. **Manage Risk**
- Set stop losses beyond recent swings
- Don't fight extreme bias in strong trends
- Reduce position size at extremes
4. **Customize for Your Market**
- Volatile assets: Use wider ranges
- Stable assets: Use tighter ranges
- Adjust EMA periods for your timeframe
5. **Watch for False Signals**
- Multiple small divergences = Less reliable
- Divergences at extremes = More reliable
- Confirm with other indicators
### Indicator Combinations
**With Volume:**
- High bias + Low volume = Weak move
- High bias + High volume = Strong move
**With Moving Averages:**
- Check if price is above/below key EMAs
- Bias confirms EMA trend strength
**With RSI/MACD:**
- Multiple indicator divergence = Stronger signal
- Use bias for overbought/oversold confirmation
### Performance Tips
- Disable unused features for faster loading
- Use histogram for quick visual reference
- Enable background color for trend clarity
- Use divergence detection selectively
### Common Patterns
1. **Bias Expansion**: Bias increasing = Strong trend
2. **Bias Contraction**: Bias decreasing = Trend weakening
3. **Zero Line Bounce**: Price respects EMA as support/resistance
4. **Extreme Bias**: Over-extension, watch for reversal
5. **Divergence Cluster**: Multiple EMAs diverging = High probability reversal
### Alert Conditions
You can set alerts for:
- Bias crossing above/below zero
- Extreme bias levels
- Divergence detection
- All three bias lines aligned
---
## 中文说明文档
### 概述
Scout Regiment - Bias 是一个技术指标,用于测量当前价格与指数移动平均线(EMA)之间的偏离程度(乖离率)。它帮助交易者识别超买超卖状况、趋势强度,以及通过背离检测发现潜在的反转点。
### 什么是乖离率?
乖离率衡量价格偏离移动平均线的程度,以百分比表示:
- **正乖离**:价格高于EMA(可能超买)
- **负乖离**:价格低于EMA(可能超卖)
- **计算公式**:乖离率 = (价格 - EMA) / EMA × 100
### 核心功能
#### 1. **三重EMA乖离率线**
指标计算三条不同EMA的乖离率:
- **EMA 55 乖离率**(默认:绿色/红色,1像素线)
- 短期乖离测量
- 对价格变化反应快速
- 适合日内和波段交易
- **EMA 144 乖离率**(粉色,2像素线)
- 中期乖离测量
- 对价格波动反应平衡
- 最适合波段交易
- **EMA 233 乖离率**(白色,2像素线)
- 长期乖离测量
- 反应较慢,更稳定
- 适合仓位交易
**颜色编码:**
- 绿色:价格高于EMA(看涨)
- 红色:价格低于EMA(看跌)
#### 2. **视觉组件**
**柱状图显示**
- 以柱状图形式显示EMA 55乖离率,便于可视化
- 绿色柱:价格高于EMA 55
- 红色柱:价格低于EMA 55
- 可开关显示
**背景颜色**
- 浅绿色背景:看涨乖离(价格高于EMA 55)
- 浅红色背景:看跌乖离(价格低于EMA 55)
- 可选显示,图表更清爽
**零轴**
- 零点位置的白色横线
- 正负乖离的参考点
- 穿越表示趋势变化
**穿越标签**
- "突破":乖离率向上穿越零轴
- "跌破":乖离率向下穿越零轴
- 可启用/禁用以保持清晰
#### 3. **背离检测**
指标自动检测所有三条乖离率线的常规背离:
**看涨背离(黄色标签)**
- 价格创新低
- 乖离率创更高的低点
- 暗示潜在向上反转
- 标签:"55涨"、"144涨"、"233涨"
**看跌背离(蓝色标签)**
- 价格创新高
- 乖离率创更低的高点
- 暗示潜在向下反转
- 标签:"55跌"、"144跌"、"233跌"
**背离参数**(每个EMA可自定义):
- 左侧回溯:枢轴点左侧K线数(默认:5)
- 右侧回溯:枢轴点右侧K线数(默认:1)
- 最大回溯范围:枢轴点之间最大距离(默认:60)
- 最小回溯范围:枢轴点之间最小距离(默认:5)
### 配置设置
#### Bias设置
- **EMA周期**:自定义EMA 55、144和233的长度
- **价格源**:选择计算源(默认:收盘价)
- **启用/禁用**:独立切换每条乖离率线
#### 显示设置
- **显示柱状图**:切换柱状图显示
- **显示背景颜色**:切换背景着色
- **显示突破标签**:切换突破/跌破标签
#### 背离设置(按EMA)
- EMA 55、144和233背离的独立控制
- 可自定义回溯参数用于精确调整
- 可调整范围设置以适应不同市场状况
### 使用方法
#### 趋势交易
1. **识别趋势方向**
- 价格高于零 = 上升趋势
- 价格低于零 = 下降趋势
2. **多时间框架确认**
- EMA 55:短期趋势
- EMA 144:中期趋势
- EMA 233:长期趋势
3. **顺乖离方向交易**
- 三条线全部为正 = 强劲上升趋势
- 三条线全部为负 = 强劲下降趋势
#### 均值回归交易
1. **识别极值**
- 高正乖离(>5-10%)= 超买
- 高负乖离(<-5至-10%)= 超卖
2. **等待确认**
- 等待乖离率回归零轴
- 观察穿越标签
3. **在反转时进场**
- 极端负乖离开始上升时做多
- 极端正乖离开始下降时做空
#### 背离交易
1. **发现背离标签**
- 黄色标签 = 看涨背离(潜在买入)
- 蓝色标签 = 看跌背离(潜在卖出)
2. **用价格行为确认**
- 等待价格通过结构突破确认
- 观察支撑/阻力反应
3. **使用多个EMA**
- EMA 55背离:快速反转
- EMA 144背离:可靠信号
- EMA 233背离:重大趋势变化
#### 多时间框架分析
1. **检查长期乖离**(EMA 233)
- 确定整体市场方向
2. **寻找中期入场**(EMA 144)
- 在长期趋势中寻找回调
3. **把握短期入场时机**(EMA 55)
- 短期与长期时间框架一致时进场
### 交易策略
#### 策略1:三重确认
- 等待三条乖离率线全部为正(或负)
- 顺一致乖离方向入场
- 任一线穿越零轴时离场
- 适合:强趋势市场
#### 策略2:背离交易
- 启用所有背离检测
- 仅在出现背离时交易
- 用价格结构确认
- 适合:震荡和反转设置
#### 策略3:零轴穿越
- 启用穿越标签
- 在"突破"标签时做多
- 在"跌破"标签时做空
- 在近期波动点设置止损
- 适合:趋势跟随
#### 策略4:极值回归
- 等待乖离率达到极值(>10%或<-10%)
- 乖离率反转时逆趋势入场
- 在零轴离场
- 适合:震荡市场
### 最佳实践
1. **结合价格行为**
- 不要单独使用乖离率交易
- 用支撑/阻力确认
- 寻找K线形态
2. **使用多时间框架**
- 检查更高时间框架的乖离
- 顺大趋势方向交易
- 用低时间框架把握入场时机
3. **风险管理**
- 在近期波动之外设置止损
- 不要在强趋势中对抗极端乖离
- 在极值处减少仓位
4. **针对您的市场定制**
- 波动大的资产:使用更宽的范围
- 稳定的资产:使用更紧的范围
- 根据时间框架调整EMA周期
5. **警惕假信号**
- 多个小背离 = 可靠性较低
- 极值处的背离 = 更可靠
- 用其他指标确认
### 指标组合
**与成交量配合:**
- 高乖离 + 低成交量 = 弱势波动
- 高乖离 + 高成交量 = 强势波动
**与移动平均线配合:**
- 检查价格是否在关键EMA上方/下方
- 乖离率确认EMA趋势强度
**与RSI/MACD配合:**
- 多指标背离 = 更强信号
- 使用乖离率确认超买超卖
### 性能提示
- 禁用未使用的功能以加快加载
- 使用柱状图快速视觉参考
- 启用背景颜色以清晰显示趋势
- 有选择地使用背离检测
### 常见形态
1. **乖离扩张**:乖离率增大 = 强趋势
2. **乖离收缩**:乖离率减小 = 趋势减弱
3. **零轴反弹**:价格将EMA作为支撑/阻力
4. **极端乖离**:过度延伸,注意反转
5. **背离集群**:多个EMA背离 = 高概率反转
### 警报条件
您可以为以下情况设置警报:
- 乖离率向上/向下穿越零轴
- 极端乖离水平
- 背离检测
- 三条乖离率线对齐
---
## Technical Support
For questions or issues, please refer to the TradingView community or contact the indicator creator.
## 技术支持
如有问题,请参考TradingView社区或联系指标创建者。
CNN Fear and Greed StrategyAdaptation of the CNN Fear and Greed Index Indicator (Original by EdgeTools)
The following changes have been implemented:
Put/Call Ratio Data Source: The data source for the Put/Call Ratio has been updated.
Bond Data Source: The data sources for the bond components (Safe Haven Demand and Junk Bond Demand) have been updated.
Normalization Adjustment: The normalization method has been adjusted to allow the CNN Fear and Greed Index to display over a longer historical period, optimizing it for backtesting purposes.
Style Modification: The display style has been modified for a simpler and cleaner appearance.
Strategy Logic Addition: Added a new strategy entry condition: index >= 25 AND index crosses over its 5-period Simple Moving Average (SMA), and a corresponding exit condition of holding the position for 252 bars (days).
CNN Fear & Greed Backtest Strategy (Adapted)
This script is an adaptation of the popular CNN Fear & Greed Index, originally created by EdgeTools, with significant modifications to optimize it for long-term backtesting on the TradingView platform.
The core function of the Fear & Greed Index is to measure the current emotional state of the stock market, ranging from 0 (Extreme Fear) to 100 (Extreme Greed). It operates on the principle that excessive fear drives prices too low (a potential buying opportunity), and excessive greed drives them too high (a potential selling opportunity).
Key Components of the Index (7 Factors)
The composite index is calculated as a weighted average of seven market indicators, each normalized to a score between 0 and 100:
Market Momentum: S&P 500's current level vs. its 125-day Moving Average.
Stock Price Strength: Stocks hitting 52-week highs vs. those hitting 52-week lows.
Stock Price Breadth: Measured by the McClellan Volume Summation Index (or similar volume/breadth metric).
Put/Call Ratio: The relationship between volume of put options (bearish bets) and call options (bullish bets).
Market Volatility: The CBOE VIX Index relative to its 50-day Moving Average.
Safe Haven Demand: The relative performance of stocks (S&P 500) vs. bonds.
Junk Bond Demand: The spread between high-yield (junk) bonds and U.S. Treasury yields.
Critical Adaptations for Backtesting
To improve the index's utility for quantitative analysis, the following changes were made:
Long-Term Normalization: The original normalization method (ta.stdev over a short LENGTH) has been replaced or adjusted to use longer historical data. This change ensures the index generates consistent and comparable sentiment scores across decades of market history, which is crucial for reliable backtesting results.
Updated Data Sources: Specific ticker requests for the Put/Call Ratio and Bond components (Safe Haven and Junk Bond Demand) have been updated to use the most reliable and long-running data available on TradingView, reducing data gaps and improving chart continuity.
Simplified Visuals: The chart display is streamlined, focusing only on the final Fear & Greed Index line and key threshold levels (25, 50, 75) for quick visual assessment.
Integrated Trading Strategy
This script also includes a simple, rules-based strategy designed to test the counter-trend philosophy of the index:
Entry Logic (Long Position): A long position is initiated when the market shows increasing fear, specifically when the index score is less than or equal to the configurable FEAR_LEVEL (default 25) and the index crosses above its own short-term 5-period Simple Moving Average (SMA). This crossover acts as a confirmation that sentiment may be starting to turn around from peak fear.
Exit Logic (Time-Based): All positions are subject to a time-based exit after holding for 252 trading days (approximately one year). This fixed holding period aims to capture the typical duration of a cyclical market recovery following a major panic event.
VIX Counter-Trend StrategyVIX Panic Index VOO Bottom-Fishing Strategy
📊 Strategy Overview
This strategy utilizes the VIX (Volatility Index) as a market sentiment indicator to help investors rationally enter positions during periods of extreme market panic, using objective technical signals to avoid emotional decision-making. It is designed to capture rebound opportunities in VOO (or other US equity ETFs) following panic-driven selloffs.
🎯 Entry and Exit Conditions
Entry Conditions (both must be met):
VIX reaches or exceeds the set threshold (default 25, adjustable)
VIX death crosses below its moving average (default 5-day MA), confirming panic sentiment is beginning to recede
Exit Conditions (three modes available):
Holding Period Mode: Exit after holding for the set number of days (default 100 days)
VIX Decline Mode: Exit when VIX falls below the set threshold (default 20)
Either Condition Mode: Exit when either condition is met
⚠️ Important Warnings
Not Suitable for Leveraged ETF Bottom-Fishing: VIX reflects market volatility. Using leveraged ETFs (such as TQQQ, SOXL) increases risk due to decay effects and greater volatility, potentially causing larger losses during panic periods.
Bear Market Inaccuracy Risk: This strategy assumes markets will rebound from panic. However, during prolonged bear markets or systemic risks (such as the 2008 financial crisis or 2022 rate hike cycle), VIX may remain elevated for extended periods, triggering multiple buy signals while prices continue declining, rendering the strategy ineffective.
Recommended to Combine with Market Trend Analysis: Works better in bull market conditions. In bear markets, consider raising VIX thresholds or suspending use.
For Reference Only, Not Investment Advice: Historical performance does not guarantee future results. Please use cautiously according to your personal risk tolerance.
VIX 恐慌指數 VOO 抄底策略
📊 策略目的
本策略利用 VIX 恐慌指數作為市場情緒指標,幫助投資人在市場極度恐慌時理性進場抄底,並透過客觀的技術訊號避免情緒化操作。適合用於捕捉 VOO(或其他美股 ETF)在恐慌性下跌後的反彈機會。
🎯 進出場條件
進場條件(同時滿足):
VIX 指數達到設定門檻以上(預設 25,可調整)
VIX 死亡交叉其均線(預設 5 日均線),確認恐慌情緒開始回落
出場條件(三種模式可選):
持有天數模式:持有達到設定天數後出場(預設 100 天)
VIX 回落模式:VIX 降至設定門檻以下時出場(預設 20)
兩者皆可模式:任一條件滿足即出場
⚠️ 重要警語
不適合槓桿型 ETF 抄底:VIX 反映的是市場波動度,使用槓桿 ETF(如 TQQQ、SOXL)會因為衰減效應和更大波動而增加風險,可能在恐慌期間造成更大虧損。
空頭市場失準風險:本策略假設市場會從恐慌中反彈,但在長期空頭或系統性風險(如 2008 金融危機、2022 升息循環)中,VIX 可能長期處於高檔,多次觸發買入訊號卻持續下跌,導致策略失效。
建議搭配大盤趨勢判斷:在多頭格局中使用效果較佳,空頭格局建議提高 VIX 門檻或暫停使用。
僅供參考,非投資建議:歷史績效不代表未來表現,請依個人風險承受度謹慎使用。
RSI VWAP EMA ON CHART1. Understand the components
VWAP (Volume Weighted Average Price)
Green: price is above VWAP → bullish trend
Red: price is below VWAP → bearish trend
Blue: price exactly at VWAP → neutral
Acts as a dynamic trend line and support/resistance.
4 Moving Averages (MA1–MA4)
Customizable lengths and type (SMA or EMA).
Useful for trend confirmation and dynamic support/resistance.
Typically:
MA1 = fastest (short-term)
MA4 = slowest (long-term)
When price is above multiple MAs → strong bullish trend; below → bearish trend.
RSI Overlay with VWAP Alignment
RSI line normalized to price scale.
Background shading indicates momentum aligned with VWAP trend:
Green shading: RSI > 50 and price above VWAP → bullish momentum
Red shading: RSI < 50 and price below VWAP → bearish momentum
Gray areas: neutral or momentum does not align with VWAP.
2. Basic usage workflow
Trend Confirmation
Look at VWAP color: price above → bullish, below → bearish.
Check RSI + VWAP shading: green confirms bullish momentum, red confirms bearish momentum.
Check MA alignment: shorter MAs above longer MAs = stronger bullish trend; vice versa for bearish.
Entry Signals (Scalping)
Long (Buy) Setup
Price above VWAP (green)
RSI green shading (RSI > 50)
Shorter MAs above longer MAs (trend support)
Short (Sell) Setup
Price below VWAP (red)
RSI red shading (RSI < 50)
Shorter MAs below longer MAs
Exits / Stops
Exit if price closes against VWAP trend (e.g., price drops below VWAP during a bullish trade).
Use nearest MA support/resistance as stop-loss or take-profit zones.
3. Optional adjustments for scalping
RSI length / thresholds
Shorter RSI (7–10) → faster response for scalping.
Standard RSI (14) → smoother, fewer false signals.
MA lengths
Short-term: 20–50
Medium-term: 50–100
Long-term: 100–200
Can tweak for the timeframe you trade (1m, 5m, 15m).
Timeframe
VWAP works best on intraday charts (1m, 5m, 15m).
Use higher timeframe (e.g., 15m or 1h) for trend direction and lower timeframe (1m–5m) for entries.
4. Example Scalping Setup
Bullish setup (buy):
Price above VWAP → VWAP green
RSI > 50 and green shading
Shorter MAs above longer MAs
Enter on small pullback or breakout
Stop: below nearest MA or VWAP
Bearish setup (sell):
Price below VWAP → VWAP red
RSI < 50 and red shading
Shorter MAs below longer MAs
Enter on minor bounce or breakdown
Stop: above nearest MA or VWAP
5. Visual cues summary
Element Interpretation
VWAP Green Price above VWAP → bullish trend
VWAP Red Price below VWAP → bearish trend
RSI Green Shading Bullish momentum aligns with VWAP
RSI Red Shading Bearish momentum aligns with VWAP
MA Alignment Trend strength (short above long = bullish, short below long = bearish)
VWAP + 4 MAs with RSI Overlay & VWAP Alignment1. Understand the components
VWAP (Volume Weighted Average Price)
Green: price is above VWAP → bullish trend
Red: price is below VWAP → bearish trend
Blue: price exactly at VWAP → neutral
Acts as a dynamic trend line and support/resistance.
4 Moving Averages (MA1–MA4)
Customizable lengths and type (SMA or EMA).
Useful for trend confirmation and dynamic support/resistance.
Typically:
MA1 = fastest (short-term)
MA4 = slowest (long-term)
When price is above multiple MAs → strong bullish trend; below → bearish trend.
RSI Overlay with VWAP Alignment
RSI line normalized to price scale.
Background shading indicates momentum aligned with VWAP trend:
Green shading: RSI > 50 and price above VWAP → bullish momentum
Red shading: RSI < 50 and price below VWAP → bearish momentum
Gray areas: neutral or momentum does not align with VWAP.
2. Basic usage workflow
Trend Confirmation
Look at VWAP color: price above → bullish, below → bearish.
Check RSI + VWAP shading: green confirms bullish momentum, red confirms bearish momentum.
Check MA alignment: shorter MAs above longer MAs = stronger bullish trend; vice versa for bearish.
Entry Signals (Scalping)
Long (Buy) Setup
Price above VWAP (green)
RSI green shading (RSI > 50)
Shorter MAs above longer MAs (trend support)
Short (Sell) Setup
Price below VWAP (red)
RSI red shading (RSI < 50)
Shorter MAs below longer MAs
Exits / Stops
Exit if price closes against VWAP trend (e.g., price drops below VWAP during a bullish trade).
Use nearest MA support/resistance as stop-loss or take-profit zones.
3. Optional adjustments for scalping
RSI length / thresholds
Shorter RSI (7–10) → faster response for scalping.
Standard RSI (14) → smoother, fewer false signals.
MA lengths
Short-term: 20–50
Medium-term: 50–100
Long-term: 100–200
Can tweak for the timeframe you trade (1m, 5m, 15m).
Timeframe
VWAP works best on intraday charts (1m, 5m, 15m).
Use higher timeframe (e.g., 15m or 1h) for trend direction and lower timeframe (1m–5m) for entries.
4. Example Scalping Setup
Bullish setup (buy):
Price above VWAP → VWAP green
RSI > 50 and green shading
Shorter MAs above longer MAs
Enter on small pullback or breakout
Stop: below nearest MA or VWAP
Bearish setup (sell):
Price below VWAP → VWAP red
RSI < 50 and red shading
Shorter MAs below longer MAs
Enter on minor bounce or breakdown
Stop: above nearest MA or VWAP
5. Visual cues summary
Element Interpretation
VWAP Green Price above VWAP → bullish trend
VWAP Red Price below VWAP → bearish trend
RSI Green Shading Bullish momentum aligns with VWAP
RSI Red Shading Bearish momentum aligns with VWAP
MA Alignment Trend strength (short above long = bullish, short below long = bearish)






















