Smart Dollar Cost Averaging DashboardThis closed-source TradingView indicator implements a comprehensive Dollar Cost Averaging (DCA) savings plan simulation designed to automate systematic investments. The script allows users to set a fixed investment amount and choose a customizable intervalโweekly, monthly, or quarterlyโat which purchases are simulated against historical or live price data. The core functionality calculates the average buy-in price dynamically by tracking cumulative invested capital and total acquired shares, providing a true average cost basis rather than simple price signals. This average price is visualized as a persistent, non-draggable horizontal line on the chart, enabling traders to intuitively compare the market price to their average entry point. A movable and toggleable dashboard accompanies the indicator, delivering real-time metrics including total investment, number of purchases, portfolio value, profit/loss both in absolute and percentage terms, and the price gap relative to the computed average buy-in. This transparency helps users understand their positionโs health and supports disciplined long-term investment strategies. This script stands unique by combining flexible periodic investment scheduling with real capital calculations and detailed, easy-to-read visual feedback that is rarely bundled so intuitively in similar scripts. Unlike many open-source trend-following or scalping tools, this indicator focuses on systematic investment and passive portfolio growth, ideal for investors pursuing dollar cost averaging. Unlike standard buy/sell signal creators or simplistic moving average crossovers, this script models actual cash flow deployment and quantifies performance in real-time with a clean, professional UI. Its originality lies in marrying realistic capital flow simulation with intuitive visualization and multi-interval flexibility.
How It Works:
Tracks virtual investments of fixed cash amounts at user-defined intervals Converts invested amounts into shares based on closing prices, accumulating holding size Recalculates weighted average purchase price after each simulated buy Continuously displays the average buy-in as a stable graphic element on any price chart Offers detailed investment metrics through an interactive dashboard overlay Supports weekly, monthly, and quarterly investment cadences with user-selectable investment days Use Cases: Ideal for investors employing systematic savings plans to build long-term positions Fits cryptocurrency, stock, ETF, and index investments on TradingView Supports financial education by illustrating dollar cost averaging principles visually Facilitates performance tracking for passive investors who prioritize consistent buying over timing The script is an advanced tool meeting a distinct trading niche: systematic, cash-based, passive investment modeling with transparency and user control. This originality and usefulness justify the closed-source mode to protect intellectual property.
Penunjuk dan strategi
Scissors&Knifes V3.1โ๏ธ The Scissors (PAG Chop V4 Engine)
๐ง Core idea
Scissors measure market compression and breakout readiness.
They use a modified Choppiness Index that looks at the relationship between:
True Range volatility (ATR ร period length)
The total highโlow range over the same window.
The smaller the ratio (sum of TR vs range), the more directional and impulsive the market is.
The higher the ratio, the more โsidewaysโ the market trades.
This version smooths the result over PAG_SMOOTHLEN bars and applies several color bands that correspond to volatility states.
๐จ Color code meaning
Range State Color Interpretation
โค 30 Strong Red #8B0000 Momentum exhaustion on downside, sellers dominating โ about to reverse or already strong down-trend.
30 โ 38 Brick Red #A52A2A Fading downside pressure; often the โbleeding edgeโ of a bearish climax.
38 โ 55 Transparent black (ฮฑโ100) Neutral chop zone โ indecision, range-building.
55 โ 61.8 Yellow (optional) #DAA520 Early compression pocket where volatility starts contracting; the calm before a trend.
61.8 โ 70 Bright Green #556B2F Energy release phase: volatility breaking out upward.
โฅ 70 Strong Green #355E3B Sustained bullish drive, often continuation leg of a trend.
๐ชถ Secret nuance:
The transition bands (38โ45 and 45โ55) are treated as fully transparent to mark โdead zones.โ
When PAG Chop sits here, all label activity pauses โ the system resets its cluster memory so the next colored print begins a new โclusterโ, letting you clearly see where fresh directional momentum starts.
๐งฉ Cluster logic
Every time a colored (non-transparent) reading appears, it belongs to a โcolor cluster.โ
Grey labels (= count 1) mark the genesis of a new cluster, and following counts 2, 3, 4 โฆ represent the internal continuity of that trend state.
You can optionally hide the first N grey or count 2 labels to reduce clutter on the initial stabilization bars.
โ๏ธ Label meaning
Each label shows:
Emoji โ๏ธ
Current count (e.g. โ๏ธ = 3 means 3 timeframes are simultaneously firing)
Optional list of the timeframes that contribute.
So a high count (e.g. 8โ10) means many lower TFs are synchronizing volatility breakout โ a multiframe alignment, often just before an acceleration burst.
๐ช The Knife (Mr Blonde V4 Engine)
๐ง Core idea
Mr Blonde converts the slope of a long EMA into an angle-of-attack metric โ literally the โtiltโ of market momentum.
It computes the EMA gradient relative to price span and rescales it into degrees (-5 ยฐ to +5 ยฐ).
The steeper the angle, the stronger the directional push.
๐จ Color code meaning
Angle range Color Interpretation
โฅ +5 ยฐ Transparent (Black 1) Fully over-extended up move โ wait for reset.
+3.57 โ +5 ยฐ Dark Red Strong upward slope, momentum apex.
+2.14 โ +3.57 ยฐ Orange Medium upward slope, trend acceleration zone.
+0.71 โ +2.14 ยฐ Light Orange Mild upward bias, pre-momentum phase.
0 to -0.71 ยฐ Yellow Neutral transition.
-0.71 โ -2.14 ยฐ Olive Green Soft bearish slope.
-2.14 โ -3.57 ยฐ Olive Drab Building bearish momentum.
-3.57 โ -5 ยฐ Hunter Green Strong downward angle, aggressive push.
โค -5 ยฐ Transparent (Black 2) Oversold/over-tilted โ likely exhaustion.
๐ชถ Secret nuance:
Mr Blonde uses a โspan normalizationโ factor that divides EMA slope by the dynamic range of highs and lows.
This lets it compare angles fairly across assets with different volatility profiles (e.g. BTC vs ES) โ itโs one of the rare EMA-angle implementations that self-scales properly.
๐ก Label meaning
Emoji ๐ช
Count = how many TFs share the same momentum angle bias.
When many TFs show the same slope polarity (e.g. knife = 8), youโre in a deep momentum cascade โ a โknife trend.โ
๐ซ Yellow knife
The yellow state marks neutrality or slope flattening.
If you enable yellow visibility (mb_show_yellow), you can see where momentum cools off โ often the earliest reversal hint.
โ๏ธ Shared mechanics between โ๏ธ and ๐ช
Multi-timeframe sweep
The script cycles through 1 m โ 10 m by default, running both engines once per TF.
Each returning true adds +1 to the count.
So:
sc_hits = count of timeframes where PAG fires + 1
knife_hits = count of timeframes where MB fires + 1
That โ+1 shiftโ means thereโs always at least 1, letting count = 1 represent the local TF itself.
Cluster limiter
If Limit max labels per cluster is on, you cap how many total symbols (both โ๏ธ & ๐ช, including trails) can appear within one color phase โ avoiding chart spam during extended trends.
Trails
Each printed label seeds a short-lived โtrailโ sequence โ faded copies extending N bars forward.
Trails visualize the linger effect of the last signal, useful for visually connecting bursts in momentum.
Grey or count = 1 labels can have shorter or longer trails depending on your overrides (*_trail_bars_grey).
Theyโre purely visual and do not affect alerting.
Alerts
Alerts fire independently of whether you hide labels โ unless you enable โrespect filtersโ.
This guarantees you never miss a structural signal even if you suppress visuals for clarity.
๐ Interpreting Both Together
Scenario Interpretation
โ๏ธ = low (1โ2) + ๐ช rising (red/orange) Market just leaving chop, early thrust stage.
โ๏ธ = high (โฅ 5) + ๐ช green Fully aligned breakout continuation โ trend in progress.
โ๏ธ = yellow cluster + ๐ช yellow Volatility squeeze, energy buildup โ next expansion near.
โ๏ธ = green cluster โ ๐ช turns red Cross-state conflict; likely transition or correction.
โ๏ธ = grey + ๐ช grey Reset condition โ both engines cooling; stand aside.
๐ก Hidden edge:
Scissors signal potential, Knife measures kinetic force.
The perfect storm is when โ๏ธ goes from yellowโgreen one bar before ๐ช shifts from orangeโgreen โ it catches the birth of directional flow while volatility is still tight.
๐งญ Reading the labels intuitively
Grey โ๏ธ/๐ช = 1 โ embryonic state, may fizzle or bloom.
โ๏ธ/๐ช = 2 or 3 โ expansion taking hold.
โ๏ธ/๐ช โฅ 4 (mid black) โ strong synchronized drive across TFs.
Transparent gap โ cluster reset; prepare for new phase.
Trail lines โ echo of previous cluster strength.
Final secret tip ๐
Because both engines are mathematically uncorrelated (volatility vs EMA angle), when they agree in color polarity on multiple TFs, you have one of the cleanest probabilistic trend windows possible.
If you ever see โ๏ธ = 6 + ๐ช = 6 both pointing the same way โ thatโs a โknife-through-the-scissorsโ moment: volatility expansion and directional slope synchronized โ those are the bars where institutional algorithms tend to add size.
Lateral Market DetectorOverview
The Lateral Market Detector is a TradingView indicator designed to identify and highlight range-bound market conditions (sideways movement) where price oscillates between defined support and resistance levels with minimal overall movement.
How It Works
The indicator analyzes price action using a dynamic range detection algorithm:
Range Calculation: Examines the last N candlesticks (default 50, adjustable 20-200) and calculates the difference between the highest high and lowest low within this period.
Laterality Detection: Compares the calculated range against a configurable tolerance threshold (in pips). If the range is smaller than the tolerance, the market is identified as laterally moving.
Confirmation Logic: Counts consecutive candlesticks that remain within the detected range. The indicator only confirms a lateral condition when the minimum number of consecutive candlesticks has been reached (default 15).
Visual Representation: Once confirmed, displays a colored rectangle (box) spanning from the range's start point to the current bar, with horizontal dashed lines marking the high and low levels.
Dynamic Update: Continuously updates the rectangle as new candlesticks form, adjusting the top and bottom boundaries if price remains within the lateral zone.
Key Features
Multi-Timeframe Optimization
Automatic timeframe adaptation using square root scaling
When enabled, parameters adjust proportionally based on the current timeframe (M1, M5, M15, M30, H1, D1, W1, MN)
Prevents the need for manual parameter adjustments across different timeframes
Formula: Adjusted_Tolerance = Base_Tolerance ร โ(Timeframe_Multiplier)
Customizable Parameters
Tolerance Pip (M1): Sets the maximum range width to identify laterality
Minimum Candlesticks: Minimum consecutive candles required to confirm a lateral zone
Candlesticks to Analyze: Lookback period for range calculation
Breakout Sensitivity: Controls the threshold for identifying range breakouts
Full Visual Customization
Rectangle color and transparency
High/Low line color and thickness
Automatic status display showing current timeframe, lateral confirmation, and active parameters
Use Cases
Range Trading: Identify optimal entry and exit points at support/resistance
Breakout Trading: Visual confirmation before entering breakout trades
Trend Analysis: Distinguish between trending and consolidating markets
Risk Management: Define clear stop-loss levels based on range boundaries
Technical Specifications
Indicator Type: Overlay
Maximum Boxes: 100 (prevents performance degradation)
Supported Assets: Forex, CFDs, Stocks, Cryptocurrencies
Pine Script Version: v5
Chart Display: Real-time updates on each new candlestick
Trend Pullback System```{"variant":"standard","id":"36492","title":"Trend Pullback System Description"}
Trend Pullback System is a price-action trend continuation model that looks to enter on pullbacks, not breakouts. Itโs designed to find high-quality long/short entries inside an already established trend, place the stop at meaningful structure, trail that stop as structure evolves, and warn you when the trade thesis is no longer valid.
Developed by: Mohammed Bedaiwi
---------------------------------
HOW IT WORKS
---------------------------------
1. Trend Detection
โข The strategy defines overall bias using moving averages.
โข Bullish environment (โuptrendโ): price above the slower MA, fast MA above slow MA, and the slow MA is sloping up.
โข Bearish environment (โdowntrendโ): price below the slower MA, fast MA below slow MA, and the slow MA is sloping down.
This prevents trading against chop and focuses on continuation moves in the dominant direction.
2. Pullback + Re-entry Logic
โข The script waits for price to pull back into structure (support in an uptrend, resistance in a downtrend), and then push back in the direction of the main trend.
โข That โpush backโ is the setup trigger. We donโt chase the first breakout candle โ we buy/sell the retest + resume.
3. Structural Levels (โDiamondsโ)
โข Green diamond (below bar): bullish pivot low formed while the trend is bullish. This marks defended support.
- Use it as a re-entry zone for longs.
- Use it to trail a stop higher when youโre already long.
- Shorts can take profit here because buyers stepped in.
โข Red diamond (above bar): bearish pivot high formed while the trend is bearish. This marks defended resistance.
- Use it as a re-entry zone for shorts.
- Use it to trail a stop lower when youโre already short.
- Longs can take profit here because sellers stepped in.
4. Entry Signals
โข BUY arrow (green triangle up under the candle, text like โBUYโ / โBUY Zoneโ):
- LongSetup is true.
- Trend is bullish or turning bullish.
- Price just bounced off recent defended support (green diamond) and reclaimed short-term momentum.
Meaning: enter long here or cover/exit shorts.
โข SELL arrow (red triangle down above the candle):
- ShortSetup is true.
- Trend is bearish or turning bearish.
- Price just rolled down from defended resistance (red diamond) and lost short-term momentum.
Meaning: enter short here or take profit on longs.
These are the primary trade entries. They are meant to be actionable.
5. Weak Setups (โWโ in yellow)
โข Yellow triangle with โWโ:
- A possible long/short idea is trying to form, BUT the higher-timeframe confirmation is not fully there yet.
- Think of it as early pressure / early caution, not a full signal.
โข You usually watch these areas rather than jumping in immediately.
6. Exit Warning (orange โEXITโ label above a bar)
โข The strategy will raise an EXIT marker when youโre in a trade and the *opposite* side just produced a confirmed setup.
- Youโre short and a valid longSetup appears โ EXIT.
- Youโre long and a valid shortSetup appears โ EXIT.
โข This is basically: โClose or reduce โ the other side just took control.โ
โข Itโs not just a trailing stop hit; itโs a regime flip warning.
7. Stop, Target, and Trailing
โข On every new setup, the script records:
- Initial stop: recent swing beyond the defended level (below support for longs, above resistance for shorts).
- Initial target: recent opposing swing.
โข While youโre in position, if new confirming diamonds print in your favor, the stop can trail toward the new defended level.
โข This creates structure-based risk management (not just fixed % or ATR).
8. Reference Levels
โข The strategy also plots prior higher-timeframe closes (last weekโs close, last monthโs close, last yearโs close). These can behave as magnets or stall points.
โข Theyโre helpful for take-profit timing and for reading โare we trading above or below last monthโs close?โ
9. Momentum Panel (hidden by default)
โข Internally, the script calculates an SMI-style momentum oscillator with overbought/oversold zones.
โข This is optional visual confirmation and does not drive the core entry/exit logic.
---------------------------------
WHAT A TRADE LOOKS LIKE IN REAL PRICE ACTION
---------------------------------
Early warning
โข Yellow W + red diamonds + red down arrows = โThis is getting weak. Short setups are here.โ
โข You may also see something like โMy Short Entry Id.โ Thatโs where the short side actually engages.
Bearish follow-through, then exhaustion
โข Price bleeds down.
โข Then the orange EXIT appears.
โ Translation: โIf youโre still short, close it. Buyers are stepping in hard. Risk of reversal is now high.โ
Regime flip
โข Right after EXIT, multiple green BUY arrows fire together (โBUYโ, โBUYZoneโ).
โข Thatโs the true long trigger.
โ This is where you either enter long or flip from short to long.
Expansion leg
โข After that flip, price rips up for multiple candles / days / weeks.
โข While it runs:
- Green diamonds appear under pullbacks โ โdip buy zones / trail stop up here.โ
- More BUY arrows show on minor pullbacks โ continuation long / scale adds.
Distribution / topping
โข Later, you start seeing new yellow W triangles again near local highs. Thatโs your โcareful, this might be toppingโ warning.
โข You finally get a hard red candle, and green diamonds stop stacking.
โ Thatโs where you tighten risk, scale out, or assume the move is mature.
In plain terms, the model is doing the following for you:
โข It puts you short during weakness.
โข It tells you when to get OUT of the short.
โข It flips you long right as control changes.
โข It gives you a structure-based trail the whole way up.
โข It warns you again when momentum at the top starts cracking.
That is exactly how the logic was designed.
---------------------------------
QUICK INTERPRETATION CHEAT SHEET
---------------------------------
๐ป Red triangle + โShort Entryโ near a red diamond
โ Short entry zone (or take profit on a long).
๐ฅ Red diamond above bar
โ Sellers defended here. Treat it as resistance. Good place to trail short stops just above that level. Avoid chasing longs straight into it.
๐จ Yellow W
โ Attention only. Early pressure / possible turn. Not fully confirmed.
๐ง EXIT (orange label)
โ The opposite side just printed a real setup. Close the old idea (cover shorts if youโre short, exit longs if youโre long). Thesis invalid.
๐ฉ Burst of green BUY triangles after EXIT
โ Long entry. Also a โcover shorts nowโ alert. This is the core money entry in bullish reversals.
๐ Green diamond below bar
โ Bulls defended that level. Good for trailing your long stop up, and good โbuy the dip in trendโ locations.
๐ Blue / teal MAs stacked and rising
โ Confirmed bullish structure. Youโre in trend continuation mode, so dips are opportunities, not automatic exits.
---------------------------------
COLOR / SHAPE KEY
---------------------------------
โข Green triangle up (โBUYโ, โBUY Zoneโ):
Long entry / cover shorts / continuation long trigger.
โข Red triangle down:
Short entry / take profit on longs / continuation short trigger.
โข Orange โEXITโ label:
Opposite side just fired a real setup. The previous trade thesis is now invalid.
โข Green diamond below price:
Bullish defended support in an uptrend. Use for dip buys, trailing stops on longs, and objective cover zones for shorts.
โข Red diamond above price:
Bearish defended resistance in a downtrend. Use for re-entry shorts, trailing stops on shorts, and objective scale-out zones for longs.
โข Yellow โWโ:
Weak / early potential setup. Watch it, donโt blindly trust it.
โข Moving average bands (fast MA, slow MA, Hull MA):
When stacked and rising, bullish control. When stacked and falling, bearish control.
---------------------------------
INTENT
---------------------------------
This system is built to:
โข Trade with momentum, not against it.
โข Enter on pullbacks into proven structure, not chase stretched breakouts.
โข Automate stop/target logic around actual defended swing levels.
โข Warn you when the other side takes over so you donโt give back gains.
Typical usage:
1. In an uptrend, wait for price to pull back, print a green diamond (support proved), then take the first BUY arrow that fires.
2. In a downtrend, wait for a bounce into resistance, print a red diamond (sellers proved), then take the first SELL arrow that fires.
3. Respect EXIT when it appears โ thatโs the model saying โthis trade is done.โ
---------------------------------
DISCLAIMER
---------------------------------
This script is for educational and research purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any security, cryptoasset, or derivative. Markets carry risk. Past performance does not guarantee future results. You are fully responsible for your own decisions, position sizing, risk management, and compliance with all applicable laws and regulations.
Candle Range Theory (CRT) by LucasCRT script to find entries on AMD trades - turtle soup, ICT, manipulation, stop loss hunt. Use on higher timeframes - minimum 1H and higher, try to enter with trend - when uptrending wait for bearish candle with entry signal.
Opening Range Break LRSThis script is designed for a trend-following, opening range breakout strategy. The main idea is to only trade breakouts that happen in the same direction as the short-term trend, which the script identifies using a linear regression slope.
1. Identify the Short-Term Trend
This is the first and most important step. The script does this for you using the Linear Regression and the bar coloring.
โข If the bars are colored BLUE: The linear regression slope is positive. This means the script considers the short-term trend to be UP. A trader using this script would only look for long (buy) trades.
โข If the bars are colored YELLOW: The linear regression slope is negative. This means the script considers the short-term trend to be DOWN. A trader using this script would only look for short (sell) trades.
This filter is designed to prevent you from trading a "false breakout" against the immediate momentum.
2. Watch the Opening Ranges Form
At the start of the trading session (8:30 AM by default), the script will begin drawing boxes for the 5, 15, 30, and 60-minute opening ranges you've enabled.
โข The 5-minute box (e.g., gray) will be set after the 8:30 - 8:35 period.
โข The 15-minute box (e.g., blue) will be set after the 8:30 - 8:45 period.
โข ...and so on.
These boxes, which extend for the rest of the day, represent the key high and low levels established at the open. The "Live Box Extension" input simply keeps the right edge of the box a few bars away from the current price so you can see it clearly.
3. Look for a Filtered Breakout Signal
This is where the trend filter (Step 1) and the range boxes (Step 2) come together.
Bullish Trade Example (Long):
1. A trader sees the bars are colored BLUE (uptrend). They are now only looking for a break above one of the ORB highs.
2. They will ignore any break below the ORB lows, as that would be trading against the trend filter.
3. The price moves up and finally closes above the 15-minute ORB high.
4. The script will plot a green "Break 15" label. This is the trader's signal to enter a long trade.
Bearish Trade Example (Short):
1. A trader sees the bars are colored YELLOW (downtrend). They are now only looking for a break below one of the ORB lows.
2. They will ignore any break above the ORB highs.
3. The price moves down and closes below the 5-minute ORB low.
4. The script will plot a red "Break 5" label. This is the trader's signal to enter a short trade.
4. Use Multiple Timeframes for Context
The real power of this script is seeing all the ranges at once. A trader wouldn't just trade them in isolation.
โข Confirmation: A "Break 5" signal is a quick, early signal. But if the price also breaks the "15" and "30" minute highs, it signals much stronger bullish consensus, which might encourage the trader to hold the trade longer.
โข Support & Resistance: The other ORB levels act as a map for the day.
o As Targets: If a trader takes a "Break 15" long signal, the 30-minute ORB high and 60-minute ORB high become logical profit targets.
o As Warning Signs: If the price gives a "Break 5" long signal but is struggling right under the 15-minute high, a trader might wait for that 15-minute level to break before entering, seeing it as a key resistance level.
Summary: A Trader's Workflow
1. Morning (8:30 AM): Watch the script. What color are the bars? (Blue = longs only, Yellow = shorts only).
2. Wait: Let the 5, 15, 30, and 60-minute ranges form. The boxes will be drawn on the chart.
3. Execute: Wait for a "Break" signal (a label) that matches your trend direction.
4. Manage: Use the other ORB levels as potential profit targets or as confirmation of the move's strength.
5. Single Signal: The "Single Signal Only" input, if checked, ensures they only get one signal per timeframe (e.g., one "Break 15" long, and that's it for the day), which helps prevent over-trading in choppy conditions.
Zarattini Intra-day Threshold Bands (ZITB)This indicator implements the intraday threshold band methodology described in the research paper by Carlo Zarattini et al.
Overview:
Plots intraday threshold bands based on daily open/close levels.
Supports visualization of BaseUp/BaseDown levels and Threshold Upper/Lower bands.
Optional shading between threshold bands for easier interpretation.
Usage Notes / Limitations:
Originally studied on SPY (US equities), this implementation is adapted for NSE intraday market timing, specifically the NIFTY50 index.
Internally, 2-minute candles are used if the chart timeframe is less than 2 minutes.
Values may be inaccurate if the chart timeframe is more than 1 day.
Lookback days are auto-capped to avoid exceeding TradingViewโs 5000-bar limit.
The indicator automatically aligns intraday bars across multiple days to compute average deltas.
For better returns, it is recommended to use this indicator in conjunction with VWAP and a volatility-based position sizing mechanism.
Can be used as a reference for Open Range Breakout (ORB) strategies.
Customizations:
Toggle plotting of base levels and thresholds.
Toggle shading between thresholds.
Line colors and styles can be adjusted in the Style tab.
Intended for educational and research purposes only.
This indicator implements the approach described in the research paper by Zarattini et al.
Note: This implementation is designed for the NSE NIFTY50 index. While Zarattiniโs original study was conducted on SPY, this version adapts the methodology for the Indian market.
Methodology Explanation
This indicator is primarily designed for Open Range Breakout (ORB) strategies.
Base Levels
BaseUp = Maximum of todayโs open and previous dayโs close
BaseDown = Minimum of todayโs open and previous dayโs close
Delta Calculation
For the past 14 trading days (lookbackDays), the delta for each intraday candle is calculated as the ab
solute difference from the close of the first candle of that day.
Average Delta
For a given intraday time/candle today, deltaAvg is computed as the average of the deltas at the same time across the previous 14 days.
Threshold Bands
ThresholdUp = BaseUp + deltaAvg
ThresholdDown = BaseDown โ deltaAvg
Signals
Spot price moving above ThresholdUp โ Long signal
Spot price moving below ThresholdDown โ Short signal
Tip: For better returns, combine this indicator with VWAP and a volatility-based position sizing mechanism.
NFCI National Financial Conditions IndexChicago Fed National Financial Conditions Index (NFCI)
This indicator plots the Chicago Fedโs National Financial Conditions Index (NFCI).
The NFCI updates weekly, and its latest value is displayed across all chart intervals.
The NFCI measures how tight or loose overall U.S. financial conditions are. It combines over 100 weekly indicators from the money, bond, and equity marketsโalong with credit and leverage dataโinto a single composite index.
The NFCI has three key subcomponents, each of which can be independently selected within the indicator:
Risk: Captures volatility, credit spreads, and overall market stress.
Credit: Tracks how easy or difficult it is to borrow across households and businesses.
Leverage: Reflects the level of debt and balance-sheet strength in the financial system.
When the NFCI rises, financial conditions are tightening โ liquidity is contracting, borrowing costs are climbing, and investors tend to reduce risk.
When the NFCI falls, conditions are loosening โ liquidity expands, credit flows more freely, and markets generally become more risk-seeking.
Traders often use the NFCI as a macro backdrop for risk appetite: rising values signal growing stress and defensive positioning, while falling values indicate improving liquidity and a more supportive market environment.
(FTD) Follow-Through Day SignalFollow-Through Day (FTD) Signal
This indicator detects potential Follow-Through Days (FTDs) โ a concept popularized by William OโNeil โ to help identify possible market trend confirmations.
A Follow-Through Day occurs when an index shows strong upside action on higher volume several days after a market low, suggesting institutional buying rather than short covering.
How it works:
The indicator checks for a session where the price gains a defined minimum percentage from the prior close (default: 1.2% or more).
Volume must be greater than the previous dayโs volume.
The rally must occur at least three days after a recent low, determined by the lookback period (default: 20 days).
Additional safeguards require that recent bars are not making new lows and that the bar three days prior either closed positive or was not at a new low โ filtering out false signals from oversold bounces.
When all conditions are met, a blue up arrow is plotted beneath the bar, and an optional โFTDโ label appears if enabled.
Inputs:
Min % Gain from Previous Close (%): Sets the minimum daily percentage gain to qualify as a Follow-Through Day.
Lookback Period for Lowest Low Checks: Defines how many bars back to search for a recent market low (default: 20).
Show Signal Label: Toggles the on-chart โFTDโ label display.
Usage:
This indicator is intended for use on daily charts of major market indexes โ such as the Nasdaq Composite (symbol: IXIC) or broad index ETFs including QQQ, SPY, and DIA โ where Follow-Through Day signals are most relevant for confirming potential trend reversals.
Session Streaks [LuxAlgo]The Session Streaks tool allows traders to identify whether a session is bullish or bearish on the chart. It also shows the current session streak, or the number of consecutive bullish or bearish sessions.
The tool features a dashboard with information about the session streaks of the underlying product on the chart.
๐ถ USAGE
Analyzing session streaks is commonly used for market timing by studying the number of consecutive sessions over time and how long they last before the market changes direction.
We identify a bullish session as one in which the closing price is equal to or greater than the opening price, and a bearish session as one in which the closing price is below the opening price.
Each session is labeled according to its bias (bullish or bearish) and the number of consecutive sessions of the same type that conform the current streak.
๐น Dashboard
The dashboard at the top shows information about the current session.
Under the "Streaks" header, historical information about session streaks is displayed, divided into bullish and bearish categories.
Number: Total number of streaks.
Median: The average duration of those streaks. We chose the median over the mean to avoid misrepresentation due to outliers.
Mode: The most common streak duration.
As the image shows, for this particular market, there are more bullish streaks than bearish ones. Bullish streaks have an average duration that is longer than that of bearish streaks, and both have the same most common streak duration.
If the current session is bullish and the median streak duration for bullish sessions is three, then we could consider scenarios in which the next two sessions are bullish.
๐ถ DETAILS
๐น Streaks On Larger Timeframes
On timeframes lower than or equal to Daily, the tool identifies each consecutive session, but this behavior changes on larger timeframes.
On timeframes larger than daily, the tool identifies the last session of each bar. Let's use the chart in the image as a reference.
At the top of the image, there is a daily chart where each session corresponds to each candle. One candle equals one day.
In the middle, we have a weekly chart where each session is the last session of each week, which is usually Friday for the Nasdaq 100 futures contract. The levels and labels displayed correspond to the last session within each candle, which is the last day of each week.
The levels and labels on the monthly chart correspond to the last session of each month, which is the last day of each month.
๐น Gradient Style
Traders can choose between two different color gradients for the session background. Each gradient provides different information about price behavior within each session.
Horizontal: Green indicates prices at the top of the session range and red indicates prices at the bottom.
Vertical: Green indicates prices that are equal to or greater than the open price and red indicates prices that are below the open price of the session.
๐ถ SETTINGS
๐น Dashboard
Dashboard: Enable or disable the dashboard.
Position: Select the location of the dashboard.
Size: Select the dashboard size.
๐น Style
Bullish: Select a color for bullish sessions.
Bearish: Select a color for bearish sessions.
Transparency: Select a transparency level from 100 to 0.
Gradient: Select a horizontal or vertical gradient.
ORB Detection and LabelsOverview
ORB Detection and Labels is a comprehensive Opening Range Breakout (ORB) indicator designed for Indian market traders focusing on indices and stocks. This advanced tool automatically calculates critical trading levels based on the first 15 minutes of trading (09:15-09:30 IST) and provides precise entry, target, and stop-loss levels.
Key Features
Dual Operating Modes:
Auto Mode: Automatically detects and calculates ORB during market hours on 1/3/5/15-minute charts
Manual Mode: Allows custom ORB input for any timeframe including daily, weekly, and higher timeframes
Precision Trading Levels:
2 Buy Entry Levels
2 Sell Entry Levels
Dynamic Stop Loss levels
3 Target levels per direction
Visual Clarity:
Color-coded horizontal lines for instant recognition
Customizable label positioning to avoid chart clutter
Real-time info panel displaying all critical levels and status
Clean, professional interface with adjustable colors
Smart Alert System:
Configurable alerts for entry levels, stop losses, and targets
Non-repainting alerts that fire on bar close
Separate toggles for entry, target, and SL alerts
How It Works
ORB Calculation: During 09:15-09:30 IST, the indicator tracks the high and low to establish the Opening Range
Level Generation: After 09:30, it calculates buy/sell entries, stop losses, and targets using proprietary Fibonacci ratios
Visual Display: Lines extend across the chart with labels positioned for easy reading
Daily Reset: Automatically resets each trading day for fresh analysis
Ideal For
Intraday traders
Swing traders using manual ORB input on daily charts
Traders following opening range breakout strategies
Those seeking clear, mechanical entry and exit levels
Technical Specifications
Works on all symbols
Best suited for 1, 3, 5, and 15-minute timeframes in Auto mode
Manual mode supports all timeframes
Timezone: GMT+5:30 (IST)
Unique Advantages
โ
No repainting - all calculations finalize after ORB session closes
โ
Customizable colors and label positions
โ
Built-in risk management with defined SL levels
โ
Multiple profit targets for partial exit strategies
โ
Works across timeframes with manual override option
โ
Professional info panel with real-time status updates
Settings
ORB session timing (default: 09:15-09:30, 15 minutes)
Manual ORB high/low inputs
Label offset adjustment
Toggle targets, labels, info table
Alert preferences
Complete color customization
Perfect for traders who value precision, clarity, and systematic trading approaches based on proven ORB methodology.
This Script is Just for Educational Purpose. Please test it as per your risk. This is not a recommendation.
Auto Fibonacci LevelsAuto Fibonacci Momentum Zones with Visible Range Table
Overview and Originality
The Auto Fibonacci Momentum Zones indicator offers a streamlined, static overlay of Fibonacci retracement levels inspired by extreme RSI momentum thresholds, enhanced with a dynamic table displaying the high and low of the currently visible chart range. This isn't a repackaged RSI oscillator or basic Fib drawerโcommon in TradingView's libraryโbut a purposeful fusion of geometric harmony (Fibonacci ratios) with momentum psychology (RSI extremes at 35/85), projected as fixed horizontal reference lines on the price chart. The addition of the visible range table, powered by PineCoders' VisibleChart library, provides real-time context for the chart's current view, enabling traders to quickly assess range compression or expansion relative to these zones.
This script's originality stems from its "static momentum mapping": by hardcoding Fib levels on a dynamic chart, it creates universal psychological support/resistance lines that transcend specific assets or timeframes.
Unlike dynamic Fib tools that auto-adjust to price swings (risking noise in ranging markets) or standalone RSI plots (confined to panes), this delivers clean, bias-adjustable overlays for confluence analysis. The visible range table justifies the library integrationโit's not a gratuitous add-on but a complementary tool that quantifies the "screen real estate" of price action, helping users correlate Fib touches with actual volatility. Drawn from original code (no auto-generation or public templates), it builds TradingView's body of knowledge by simplifying multi-tool workflows into one indicator, ideal for discretionary traders who value visual efficiency over algorithmic complexity.
How It Works: Underlying Concepts
Fibonacci retracements, derived from the Fibonacci sequence and the golden ratio (โ0.618), identify potential reversal points based on the idea that markets retrace prior moves in predictable proportions: shallow (23.6%, 38.2%), mid (50%), and deep (61.8%, 78.6%).
Adjustable Outputs
1. The "Invert Fibs" toggle (default: true) for bearish/topping bias, can be flipped aligning with trend context.
2. Fibonacci Levels: Seven semi-transparent horizontal lines are drawn using `hline()`:
- 0.0 at high (gray).
- 0.236: high - (range ร 0.236) (light cyan, shallow pullback).
- 0.382: high - (range ร 0.382) (teal, common retracement).
- 0.5: midpoint average (green, equilibrium).
- 0.618: high - (range ร 0.618) (amber, golden pocket for reversals).
- 0.786: high - (range ร 0.786) (orange, deep support).
- 1.0 at low (gray).
Colors progress from cool (shallow) to warm (deep) for intuitive scanning.
3. Optional Fib Labels: Right-edge text labels (e.g., "0.618") appear only if enabled, positioned at the last bar + offset for non-cluttering visibility.
4. Visible Range Table: Leveraging the VisibleChart library's `visible.high()` and `visible.low()` functions, a compact 2x2 table (top-right corner) updates on the last bar to show the extrema of bars currently in view. This mashup enhances utility: Fib zones provide fixed anchors, while the table's dynamic values reveal if price is "pinned" to a zone (e.g., visible high hugging 0.382 signals resistance). The library is invoked sparingly for performance, adding value by bridging static geometry with viewport-aware dataโunavailable in built-ins without custom code.
How to Use It
1. Setup:
Add to any chart (e.g., 15M for scalps, Daily for swings). As an overlay, lines appear directly on price candlesโadjust chart scaling if needed.
2. Input Tweaks:
Invert Fibs: Enable for downtrends (85 top), disable for uptrends (35 bottom).
Show Fibs: Toggle labels for ratio callouts (off for clean charts).
Show Table: Display/hide the visible high/low summary (red for high, green for low, formatted to 2 decimals).
3. Trading Application:
Zone Confluence: Seek price reactions at each fibonacci levelโe.g., a doji at 0.618 + rising volume suggests entry; use 0.0/1.0 as invalidation.
Range Context: Check the table: If visible high/low spans <20% of the Fib arc (e.g., both near 0.5), anticipate breakout; wider spans signal consolidation.
Multi-Timeframe: Overlay on higher TF for bias, lower for precisionโe.g., Daily Fibs guide 1H entries.
Enhancements: Pair with volume or candlesticks; set alerts on line crosses via TradingView's built-in tools. Backtest on your symbols to validate (e.g., equities favor 0.382, forex the 0.786).
This indicator automates advanced Fibonacci synthesis dynamically, eliminating manual measurement and calculations.
published by ozzy_livin
AEON | Liquidity HunterA visual tool for identifying high-probability liquidity zones across multiple timeframes and sessions.
Overview
Liquidity Hunter is a multi-timeframe, all market tool designed to help traders visualise areas where price may be drawn in search of resting liquidity. These liquidity zones often align with swing highs and lows, session extremes, or significant higher-time-frame reference points.
Rather than producing entry or exit signals, this indicator aims to support market behaviour analysis and contextual awareness.
Core Functions
The indicator identifies potential liquidity areas using four optional methods:
1. Current Time Frame Analysis โ Automatically locates swing highs and lows based on a customisable setting for sensitivity and lookback depth.
2. Higher Time Frame Analysis โ Uses the same logic as above, but projects liquidity zones from a selected higher time frame (HTF).
3. Session Highs & Lows โ Highlights the Asian, London, New York, or user-defined session extremes where liquidity commonly pools.
4. Time-Based Highs & Lows โ Marks the final bar of any higher time frame (for example, the last H4 or D1 candle) to show potential liquidity reference points.
Each method can be enabled or disabled independently and visually customised, allowing traders to tailor the display to their preferred style and time frame.
How to Use
When applied, the indicator plots horizontal levels representing potential liquidity pools. These levels persist until price engages with or mitigates them, at which point users can opt to modify their visual style or delete them as preferred.
Adjusting the sensitivity of the current and higher time frame levels may reflect the market's likelihood of treating them as targets or reversal points.
Many traders combine these levels with concepts such as market structure shifts, displacement, or fair-value gaps to build a narrative around price behaviour.
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice or a trade signal. Past performance or visual confluence does not guarantee future results.
---
About the Author
Created by a passionate developer focused on algorithmic and quantitative concepts.
Pullback Levels from ATH# ATH Pullback Levels
**Assess correction depth with precision โ 5%, 10%, 15%, 20% below All-Time High**
---
### Overview
This indicator draws **horizontal support lines** at **5%, 10%, 15%, and 20%** below the **All-Time High (ATH)** of any asset. Perfect for **swing traders**, **long-term investors**, and **bull market participants** who want to:
- Measure **pullback depth** in real-time
- Identify **potential support zones**
- Set **alerts** when price enters key retracement levels
---
### Features
| Feature | Description |
|--------|-------------|
| **Dynamic ATH Tracking** | Automatically updates with every new high |
| **4 Pullback Levels** | 5%, 10%, 15%, 20% below ATH |
| **Live Pullback % Label** | Shows current % drop from ATH (top-right) |
| **Customizable Lines** | Toggle visibility, change colors & styles |
| **Built-in Alerts** | Trigger on entry into each zone |
| **No Errors** | Works on 50k+ bar charts (BTC, SPX, etc.) |
| **Time-Based Lines** | Uses `xloc.bar_time` โ no 500-bar future limit |
---
### How to Use
1. Apply to any chart (stocks, crypto, forex, indices)
2. Watch the **info box** for current pullback %
3. Use lines as **potential buy zones** during corrections
4. Set **alerts** to be notified when price enters a level
> Example: If ATH = $100 โ
> - 5% = $95
> - 10% = $90
> - 15% = $85
> - 20% = $80
---
### Inputs
- **Show 5% / 10% / 15% / 20% Level** โ Toggle on/off
- **Line Colors** โ Fully customizable
- **Line Style** โ Solid, Dashed, or Dotted
---
### Alerts
Create alerts directly from the indicator:
- `"Entered 5% Pullback"`
- `"Entered 10% Pullback"`
- etc.
---
### Best For
- Bull market corrections
- Long-term position sizing
- Risk management in uptrends
- Swing entries on dips
---
### Notes
- Works on **all timeframes**
- **Log scale compatible** (lines adjust correctly)
- No repainting โ ATH only updates on confirmed highs
---
**Built with Pine Script v6 โ Clean, fast, reliable.**
*Happy trading!*
Risk/Reward Ratio Analyzer II by NeW๐ What is R/RR Analyzer II?
This indicator is engineered to reflect professional trade planning directly onto your chart, instantly. Itโs not just a drawing tool; it incorporates the intelligence to automatically set a logical Stop Loss (SL) based on market structure, ensuring your risk is always well-defined.
๐ก๏ธ New Features & Why You Need It
โ
Full Support!
The SL/TP lines are perfectly positioned above and below the entry price for accurate planning.
๐ง Auto Stop Loss Level Mode (Auto SL)
Beyond the standard ATR multiplier, this mode detects the nearest structural Pivot (L4/R2) and sets that price as your SL (1R).
This means you're using a "meaningful" SL based on actual market structure.
If a valid pivot isn't found, it seamlessly falls back to the manual ATR setting.
Each line displays the R/RR ratio, the percentage gain, and the crucial required theoretical Win Rate needed for profitability.
๐ก Configuration Highlights
Three main settings control everything:
- Short Mode: Decides your trade direction (Buy/Sell).
- Auto SL Mode: Flip ON and let the script suggest optimal, structure-based SL levels.
- TP Ratios: Set custom RRR multiples for TP1, TP2, and TP3 (e.g., 1:1, 1:2) directly in the settings.
Stop guessing your risk. Add this analyzer to your chart and start planning every trade with market intelligence.
Good luck out there! ๐๐
FVG MagicFVG Magic โ Fair Value Gaps with Smart Mitigation, Inversion & Auto-Clean-up
FVG Magic finds every tradable Fair Value Gap (FVG), shows who powered it, and then manages each gap intelligently as price interacts with itโso your chart stays actionable and clean.
Attribution
This tool is inspired by the idea popularized in โVolumatic Fair Value Gaps โ by BigBeluga (licensed CC BY-NC-SA 4.0). Credit to BigBeluga for advancing FVG visualization in the community.
Important: This is a from-scratch implementationโno code was copied from the original. I expanded the concept substantially with a different detection stack, a gap state machine (ACTIVE โ 50% SQ โ MITIGATED โ INVERSED), auto-clean up rules, lookback/nearest-per-side pruning, zoom-proof volume meters, and timeframe auto-tuning for 15m/H1/H4.
What makes this version more accurate
Full-coverage detection (no โmissedโ gaps)
Default ICT-minimal rule (Bullish: low > high , Bearish: high < low ) catches all valid 3-candle FVGs.
Optional Strict filter (stricter structure checks) for traders who prefer only โcleanโ gaps.
Optional size percentile filterโoff by default so nothing is hidden unless you choose to filter.
Correct handling of confirmations (wick vs close)
Mitigation Source is user-selectable: high/low (wick-based) or close (strict).
This avoids false โmissesโ when you expect wick confirmations (50% or full fill) but your logic required closes.
State-aware labelling to prevent misleading data
The Bull%/Bear% meter is shown only while a gap is ACTIVE.
As soon as a gap is 50% SQ, MITIGATED, or INVERSED, the meter is hidden and replaced with a clear tagโso you never read stale participation stats.
Robust zoom behaviour
The meter uses a fixed bar-width (not pixels), so it stays proportional and readable at any zoom level.
Deterministic lifecycle (no stale boxes)
Remove on 50% SQ (instant or delayed).
Inversion window after first entry: if price enters but doesnโt invert within N bars, the box auto-removes once fully filled.
Inversion clean up: after a confirmed flip, keep for N bars (context) then delete (or 0 = immediate).
Result: charts auto-maintain themselves and never โlieโ about relevance.
Clarity near current price
Nearest-per-side (keep N closest bullish & bearish gaps by distance to the midpoint) focuses attention where it matters without altering detection accuracy.
Lookback (bars) ensures reproducible behaviour across accounts with different data history.
Timeframe-aware defaults
Sensible auto-tuning for 15m / H1 / H4 (right-extension length, meter width, inversion windows, clean up bars) to reduce setup friction and improve consistency.
What it does (under the hood)
Detects FVGs using ICT-minimal (default) or a stricter rule.
Samples volume from a 10ร lower timeframe to split participation into Bull % / Bear % (sum = 100%).
Manages each gap through a state machine:
ACTIVE โ 50% SQ (midline) โ MITIGATED (full) โ INVERSED (SR flip after fill).
Auto-clean up keeps only relevant levels, per your rules.
Dashboard (top-right) displays counts by side and the active state tags.
How to use it
First run (show everything)
Use Strict FVG Filter: OFF
Enable Size Filter (percentile): OFF
Mitigation Source: high/low (wick-based) or close (stricter), as you prefer.
Remove on 50% SQ: ON, Delay: 0
Read the context
While ACTIVE, use the Bull%/Bear% meter to gauge demand/supply behind the impulse that created the gap.
Confluence with your HTF structure, sessions, VWAP, OB/FVG, RSI/MACD, etc.
Trade interactions
50% SQ: often the highest-quality interaction; if removal is ON, the box clears = โjob done.โ
Full mitigation then rejection through the other side โ tag changes to INVERSED (acts like SR). Keep for N bars, then auto-remove.
Keep the chart tidy (optional)
If too busy, enable Size Filter or set Nearest per side to 2โ4.
Use Lookback (bars) to make behaviour consistent across symbols and histories.
Inputs (key ones)
Use Strict FVG Filter: OFF(default)/ON
Enable Size Filter (percentile): OFF(default)/ON + threshold
Mitigation Source: high/low or close
Remove on 50% SQ + Delay
Inversion window after entry (bars)
Remove inversed after (bars)
Lookback (bars), Nearest per side (N)
Right Extension Bars, Max FVGs, Meter width (bars)
Colours: Bullish, Bearish, Inversed fill
Suggested defaults (per TF)
15m: Extension 50, Max 12, Inversion window 8, Clean up 8, Meter width 20
H1: Extension 25, Max 10, Inversion window 6, Clean up 6, Meter width 15
H4: Extension 15, Max 8, Inversion window 5, Clean up 5, Meter width 10
Notes & edge cases
If a wick hits 50% or the far edge but state doesnโt change, youโre likely on close modeโswitch to high/low for wick-based behaviour.
If a gap disappears, it likely met a clean up condition (50% removal, inversion window, inversion clean up, nearest-per-side, lookback, or max-cap).
Meters are hidden after ACTIVE to avoid stale percentages.
Mirpapa_Lib_RenkoLibrary "Mirpapa_Lib_Renko"
Mirpapa Renko Library - HL2 ๊ธฐ๋ฐ ATR ๋ ์ฝ ์ฐจํธ ์์ฑ ๋ผ์ด๋ธ๋ฌ๋ฆฌ
get_renko(atr_period, atr_multiplier)
โโATR ๊ธฐ๋ฐ ๋ ์ฝ ์ฐจํธ ์์ฑ
โโParameters:
โโโโ atr_period (simple int) : ATR ๊ณ์ฐ ๊ธฐ๊ฐ
โโโโ atr_multiplier (float) : ATR ์น์ (๋ฐ์ค ํฌ๊ธฐ ์กฐ์ )
โโReturns: ๋ ์ฝ ์บ๋ค OHLC ๊ฐ
HaP OtoDinamikFฤฐBO+EMA1. Automatic Dynamic Fibonacci Levels
This is the first and primary feature of the indicator. Instead of manually drawing the Fibonacci tool, this section automates the entire process.
Zigzag Algorithm: It automatically detects significant high and low points (swings) on the chart. While making these detections, it adjusts its own period based on the chart's timeframe (e.g., weekly, daily, 4-hour).
Automatic Fibo Drawing: It automatically draws Fibonacci retracement and extension levels between the last two significant high and low points it has detected.
Dynamic Updates: When a new and more significant low or high is formed in the market, it automatically updates the Fibonacci levels to reflect this new structure. As Fibonacci levels are breached, the next relevant levels are automatically displayed.
Customization: Users can toggle the visibility of the Fibonacci lines, adjust their thickness and colors (e.g., different colors for levels between 0-1 and for levels above 1), and choose whether the price labels appear on the right or left side of the chart.
2. Dynamic EMA (Exponential Moving Average) Support/Resistance Zones
Instead of cluttering the chart with dozens of moving averages, this feature is an intelligent system that displays only the most relevant ones at any given time.
Multi-Timeframe Analysis: It calculates numerous popular EMA values (e.g., 5, 8, 13, 21, ..., 1000) in the background on both the Daily (D) and Weekly (W) timeframes. This allows you to see where the daily and weekly EMAs are located, even when you are viewing a 1-hour chart.
Displaying the Closest Levels: Based on the current price location, it finds the nearest EMA above it (resistance) and the nearest EMA below it (support), and displays only these two on the chart.
Informative Labels: It adds labels to these EMA lines, indicating their timeframe (D/W) and period (e.g., D EMA 55), their price value, and their percentage distance from the current price.
Special Condition Handling: If the price moves above all calculated EMAs or drops below all of them (indicating a strong trend), it will only show the 5-period EMA to keep the chart clean.
Comprehensive Settings: Users can toggle the visibility of all EMAs, the price line, and labels. They can fully customize the colors, thickness, and style of the lines, as well as the size, color, and position of the labels according to their preferences.
Summary
In summary, this indicator is a powerful and flexible tool designed to help traders with the following:
Identifying potential support, resistance, and target levels through automatic and effortless Fibonacci analysis.
Instantly viewing the most critical dynamic support and resistance zones for the current price by utilizing EMAs from multiple timeframes.
Simplifying the analysis process by keeping the chart clean and understandable.
SuperTrend Cyan โ Split ST & Triple Bands (A/B/C)SuperTrend Cyan โ Split ST & Triple Bands (A/B/C)
โจ Concept:
The SuperTrend Cyan indicator expands the classical SuperTrend logic into a split-line + triple-band visualization for clearer structure and volatility mapping.
Instead of a single ATR-based line, this tool separates SuperTrend direction from volatility envelopes (A/B/C), providing a layered view of both regime and range compression.
โจ The design goal:
Preserve the simplicity of SuperTrend
Add volatility context via multi-band envelopes
Provide a compact MTF (Multi-Timeframe) summary for broader trend alignment
โจ How It Works
1. SuperTrend Core (Active & Opposite Lines)
Uses ATR-based bands (Factor ร ATR-Length).
Active SuperTrend is plotted according to current regime.
Opposite SuperTrend (optional) shows potential reversal threshold.
2. Triple Band System (A/B/C)
Each band (A, B, C) scales from the median price (hl2) by different ATR multipliers.
A: Outer band (wider, long-range context)
B: Inner band (mid-range activity)
C: Core band (closest to price, short-term compression)
Smoothness can be controlled with EMA.
Uptrend fills are lime-toned, downtrend fills are red-toned, with adjustable opacity (gap intensity).
3. Automatic Directional Switch
When the regime flips from up โ down (or vice versa), the overlay automatically switches between lower and upper bands for a clean transition.
4. Multi-Timeframe SuperTrend Table
Displays SuperTrend direction across 5m, 15m, 1h, 4h, and 1D frames.
Green โฒ = Uptrend, Red โผ = Downtrend.
Useful for checking cross-timeframe trend alignment.
โจ How to Read It
Green SuperTrend + Lime Bands
- Uptrend regime; volatility expanding upward
Red SuperTrend + Red Bands
- Downtrend regime; volatility expanding downward
Narrow gaps (AโC)
- Low volatility / compression (potential squeeze)
Wide gaps
- High volatility / active trend phase
Opposite ST line close to price
- Early warning for regime transition
โจ Practical Use
Identify trend direction (SuperTrend color & line position).
Assess volatility conditions (band width and gap transparency).
Watch for MTF alignment: consistent up/down signals across 1hโ4hโ1D = strong structural trend.
Combine with momentum indicators (e.g., RSI, DFI, PCI) for confirmation of trend maturity or exhaustion.
โจ Customization Tips
ST Factor / ATR Length
- Adjust sensitivity of SuperTrend direction changes
Band ATR Length
- Controls overall smoothness of volatility envelopes
Band Multipliers (A/B/C)
- Define how wide each volatility band extends
Gap Opacity
- Affects visual contrast between layers
MTF Table
- Enable/disable multi-timeframe display
โจ Educational Value
This script visualizes the interaction between trend direction (SuperTrend) and volatility envelopes, helping traders understand how price reacts within layered ATR zones.
It also introduces a clean MTF (multi-timeframe) perspective โ ideal for discretionary and system traders alike.
โจ Disclaimer
This indicator is provided for educational and research purposes only.
It does not constitute financial advice or a trading signal.
Use at your own discretion and always confirm with additional tools.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ ํ๊ตญ์ด ์ค๋ช
(Korean translation below)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โจ๊ฐ๋
SuperTrend Cyan ์งํ๋ ๊ธฐ์กด์ SuperTrend๋ฅผ ํ์ฅํ์ฌ,
์ถ์ธ์ ๋ถ๋ฆฌ(Split Line) + 3์ค ๋ฐด๋ ์์คํ
(Triple Bands) ์ผ๋ก
์์ฅ์ ๊ตฌ์กฐ์ ํ๋ฆ๊ณผ ๋ณ๋์ฑ ๋ฒ์๋ฅผ ๋์์ ์๊ฐํํฉ๋๋ค.
๋จ์ํ SuperTrend์ ๊ฐ์ ์ ์ ์งํ๋ฉด์๋,
ATR ๊ธฐ๋ฐ์ A/B/C ๋ฐด๋๋ฅผ ํตํด ๋ณ๋์ฑ ์์ถยทํ์ฅ ๊ตฌ๊ฐ์ ์ง๊ด์ ์ผ๋ก ํ์
ํ ์ ์์ต๋๋ค.
โจ ์๋ ๋ฐฉ์
1. SuperTrend ์ฝ์ด (ํ์ฑ/๋ฐ๋ ๋ผ์ธ)
ATRรFactor๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ์ถ์ธ์ ์ ๊ณ์ฐํฉ๋๋ค.
ํ์ฌ ์ถ์ธ ๋ฐฉํฅ์ ๋ฐ๋ผ ํ์ฑ ๋ผ์ธ์ด ํ์๋๊ณ , โShow Oppositeโ ์ต์
์ ์ผ๋ฉด ๋ฐ๋ํธ ๊ฒฝ๊ณ์ ๋ ํจ๊ป ๋ณด์
๋๋ค.
2. ํธ๋ฆฌํ ๋ฐด๋ ์์คํ
(A/B/C)
hl2(์ค๊ฐ๊ฐ)๋ฅผ ๊ธฐ์ค์ผ๋ก ATR ๋ฐฐ์์ ๋ฐ๋ผ ์ธ ๊ฐ์ ๋ฐด๋๋ฅผ ๊ณ์ฐํฉ๋๋ค.
A: ์ธ๊ณฝ ๋ฐด๋ (๊ฐ์ฅ ๋๊ณ ์ฅ๊ธฐ ๊ตฌ์กฐ ๋ฐ์)
B: ์ค๊ฐ ๋ฐด๋ (์ค๊ธฐ์ ์์ง์)
C: ์ฝ์ด ๋ฐด๋ (๊ฐ๊ฒฉ์ ๊ฐ์ฅ ๊ทผ์ , ๋จ๊ธฐ ๋ณ๋์ฑ ๋ฐ์)
EMA ์ค๋ฌด๋ฉ์ผ๋ก ๋ถ๋๋ฝ๊ฒ ์กฐ์ ๊ฐ๋ฅ.
์
ํธ๋ ๋ ๊ตฌ๊ฐ์ ๋ผ์์, ๋ค์ดํธ๋ ๋๋ ๋นจ๊ฐ์ ์์์ผ๋ก ํ์๋ฉ๋๋ค.
3. ์๋ ์ ํ ์์คํ
์ถ์ธ๊ฐ ์ ํ๋ ๋(Up โ Down), ๋ฐด๋ ์ค๋ฒ๋ ์ด๋ ์๋์ผ๋ก ๊ต์ฒด๋์ด ๊น๋ํ ์๊ฐ์ ๊ตฌ์กฐ๋ฅผ ์ ์งํฉ๋๋ค.
4. MTF SuperTrend ํ
์ด๋ธ
5m / 15m / 1h / 4h / 1D ํ๋ ์๋ณ SuperTrend ๋ฐฉํฅ์ ํ์ํฉ๋๋ค.
์ด๋ก โฒ = ์์น, ๋นจ๊ฐ โผ = ํ๋ฝ.
๋ณต์ ํ์ํ๋ ์ ์ ๋ ฌ ํ์ธ์ฉ์ผ๋ก ์ ์ฉํฉ๋๋ค.
โจ ํด์ ๋ฐฉ๋ฒ
์ด๋ก SuperTrend + ๋ผ์ ๋ฐด๋
- ์์น ์ถ์ธ ๋ฐ ํ์ฅ ๊ตฌ๊ฐ
๋นจ๊ฐ SuperTrend + ๋ ๋ ๋ฐด๋
- ํ๋ฝ ์ถ์ธ ๋ฐ ํ์ฅ ๊ตฌ๊ฐ
๋ฐด๋ ํญ์ด ์ข์
- ๋ณ๋์ฑ ์ถ์ (์คํด์ฆ)
๋ฐด๋ ํญ์ด ๋์
- ๋ณ๋์ฑ ํ์ฅ, ์ถ์ธ ๊ฐํ
๋ฐ๋์ ์ด ๊ทผ์
- ์ถ์ธ ์ ํ ๊ฐ๋ฅ์ฑ ๋์
โจ ํ์ฉ ๋ฐฉ๋ฒ
SuperTrend ์์์ผ๋ก ์ถ์ธ ๋ฐฉํฅ์ ํ์ธ
A/B/C ๋ฐด๋ ํญ์ผ๋ก ๋ณ๋์ฑ ์์ค์ ํ๋จ
MTF ํ
์ด๋ธ์ ํตํด ๋ณต์ ํ์ํ๋ ์ ์ ๋ ฌ ์ฌ๋ถ ํ์ธ
RSI, DFI, PCI ๋ฑ ๋ค๋ฅธ ์งํ์ ํจ๊ป ํ์ฉ ์, ์ถ์ธ ํผ๋กยท๋ชจ๋ฉํ
๋ณํ๋ฅผ ์กฐ๊ธฐ์ ํ์
๊ฐ๋ฅ
โจ ๊ต์ก์ ๊ฐ์น
์ด ์คํฌ๋ฆฝํธ๋ ์ถ์ธ ๊ตฌ์กฐ(SuperTrend) ์ ๋ณ๋์ฑ ๋ ์ด์ด(ATR Bands) ์ ์ํธ์์ฉ์
์๊ฐ์ ์ผ๋ก ํ์ตํ๊ธฐ ์ํ ๊ต์ก์ฉ ์งํ์
๋๋ค.
๋ํ, MTF ๊ตฌ์กฐ๋ฅผ ํตํด ์์ฅ์ โ์๊ณ์ ์ ๋ ฌ(hierarchical alignment)โ์ ์ฝ๊ฒ ์ธ์ํ ์ ์์ต๋๋ค.
โจ ๋ฉด์ฑ
์ด ์งํ๋ ๊ต์ก ๋ฐ ์ฐ๊ตฌ ๋ชฉ์ ์ผ๋ก๋ง ์ ๊ณต๋ฉ๋๋ค.
ํฌ์ ํ๋จ์ ์ฑ
์์ ์ฌ์ฉ์ ๋ณธ์ธ์๊ฒ ์์ผ๋ฉฐ, ๋ณธ ์งํ๋ ๋งค๋งค ์ ํธ๋ฅผ ๋ณด์ฅํ์ง ์์ต๋๋ค.
Rolling Correlation vs Another Symbol (SPY Default)This indicator visualizes the rolling correlation between the current chart symbol and another selected asset, helping traders understand how closely the two move together over time.
It calculates the Pearson correlation coefficient over a user-defined period (default 22 bars) and plots it as a color-coded line:
โข Green line โ positive correlation (move in the same direction)
โข Red line โ negative correlation (move in opposite directions)
โข A gray dashed line marks the zero level (no correlation).
The background highlights periods of strong relationship:
โข Light green when correlation > +0.7 (strong positive)
โข Light red when correlation < โ0.7 (strong negative)
Use this tool to quickly spot diversification opportunities, confirm hedges, or understand how assets interact during different market regimes.
Phase Coherence Index (PCI) โ Hilbert Prototype v0.1Phase Coherence Index (PCI) โ Hilbert Prototype v0.1
โจ Concept:
The Phase Coherence Index (PCI) measures the degree of phase alignment among multiple trend components derived from band-filtered price signals.
In simpler terms, PCI quantifies how โin-syncโ short, mid, and long-term market oscillations are.
A high PCI (values near 100) means the marketโs cyclical components are moving together โ a state of phase alignment that typically accompanies sustained, directional trends.
A low PCI (values near 0) indicates phase disorder or divergence between timeframes โ often seen during transitions, chop, or volatility compression phases.
โจ How it works:
1. Multi-Band Extraction
The price series is decomposed into three frequency bands using a simple EMA-difference
bandpass filter:
Short-term band
Mid-term band
Long-term band
2. Hilbert Quadrature Approximation
For each band, a Hilbert-style quadrature signal (Q) is estimated using an Ehlers-inspired FIR kernel with coefficients h0=0.0962 and h1=0.5769.
The original bandpass (I) and its quadrature (Q) form a complex phasor that carries instantaneous phase information.
3. Phase Extraction
The arctangent of Q/I gives the phase angle (โฯ to ฯ).
Each bandโs phase represents the โtimingโ of its oscillation relative to price movement.
4. Coherence Calculation
All three band phases are converted to unit phasors (cos ฯ, sin ฯ).
The average of these phasors is taken, and the magnitude of the resulting vector defines the PCI value:
PCI = |mean_phasor| ร 100
PCI = 100 โ perfect phase alignment
PCI = 0 โ complete phase randomness
5. Smoothing and Regime Coloring
The raw PCI is lightly smoothed by EMA to stabilize readings.
A simple SuperTrend regime filter (ATR length 5, factor 6) colors the PCI line:
Green: uptrend regime
Red: downtrend regime
Gray: low-coherence or neutral zone
โจ How to interpret PCI
High PCI (โฅ70):
Indicates strong phase coherence โ multi-timeframe alignment, stable directional energy.
Often coincides with trend persistence or mature momentum phases.
Low PCI (โค30):
Suggests phase dispersion or regime transition โ signals are desynchronized across bands.
Common near reversals, volatility compressions, or sideways congestion.
Cross-phase Transitions:
Rapid drops in PCI often precede periods of uncertainty or trend fatigue.
Rising PCI after a contraction suggests emerging order or trend formation.
โจ Visualization
PCI Line:
Displays phase coherence magnitude (0โ100).
Color changes dynamically with SuperTrend regime.
Dotted Reference Levels:
70 (high coherence), 30 (low coherence), 50 (midline).
Optional Label:
When PCI is high, a text label appears indicating whether the average phase bias leans bullish or bearish.
โจ Practical Use
Combine PCI with momentum or volatility tools (e.g., RSI, ATR, DFI) to detect when multiple timeframes become synchronized.
Use PCI drops (<30) as early warnings for possible trend exhaustion or market disorder.
Use PCI rises (>70) as confirmation of trend continuation or emerging coherence.
โจ Limitations
PCI measures phase alignment, not directional bias. It should be combined with a directional filter (e.g., SuperTrend, slope, or moving average).
The Hilbert approximation is not a true analytic signal, but a real-time proxy optimized for stability.
PCI is best interpreted as a structural context indicator rather than a direct entry signal.
โจ Educational intent
This script is designed for quantitative study and visualization of phase alignment, not for direct trading advice.
It demonstrates how Hilbert-style phasors and vector averaging can reveal coherence across timescales โ a foundational concept for spectral, cyclical, and structural analysis.
โจ Disclaimer
This script is provided for educational purposes only.
It does not constitute financial advice.
Trading involves risk; use at your own discretion.
ยฉ 2025 Trading Playground Labs โ โPhase Coherence Index (Hilbert Prototype v0.1)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ ํ๊ตญ์ด ์ค๋ช
(Korean translation below)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Phase Coherence Index (PCI) โ Hilbert Prototype v0.1 (ํ๊ตญ์ด ์ค๋ช
)
โจ ๊ฐ๋
Phase Coherence Index (PCI) ๋ ์ฌ๋ฌ ์ฃผ๊ธฐ์ ์ถ์ธ ๊ตฌ์ฑ ์์๋ค ๊ฐ์ ์์์ ์ ํฉ ์ ๋๋ฅผ ์ธก์ ํ๋ ์งํ์
๋๋ค.
์ฝ๊ฒ ๋งํ๋ฉด, ์์ฅ์ ๋จ๊ธฐยท์ค๊ธฐยท์ฅ๊ธฐ ์ง๋(์ฌ์ดํด)๋ค์ด ์๋ก ์ผ๋ง๋ โ๊ฐ์ ๋ฐ์โ๋ก ์์ง์ด๋์ง๋ฅผ ์์นํํ ๊ฒ์
๋๋ค.
PCI ๊ฐ์ด 100์ ๊ฐ๊น์ธ์๋ก ์์ฅ์ ์ฃผ๊ธฐ์ ๊ตฌ์ฑ ์์๋ค์ด ํจ๊ป ์์ง์ด๊ณ ์๋ค๋ ๋ป์ด๋ฉฐ,
์ด๋ ์ผ๋ฐ์ ์ผ๋ก ์ง์์ ์ธ ๋ฐฉํฅ์ฑ ์ถ์ธ(trend persistence) ์ํ๋ฅผ ์๋ฏธํฉ๋๋ค.
๋ฐ๋๋ก PCI ๊ฐ์ด 0์ ๊ฐ๊น์ธ์๋ก ๊ฐ ์ฃผ๊ธฐ์ ์์ง์์ด ์๋ก ์๋ฐ์ ์ํ๋ก ํ๋ฅด๋ฉฐ,
์ด๋ ์ ํ๊ธฐ(chop), ํผ๋(chaos), ํน์ ์์ถ(squeeze) ์ํ๋ฅผ ๋ฐ์ํฉ๋๋ค.
โจ ์๋ ์๋ฆฌ
1. ๋ค์ค ๋ฐด๋ ์ถ์ถ
๊ฐ๊ฒฉ ๋ฐ์ดํฐ๋ฅผ 3๊ฐ์ ์ฃผํ์ ๋์ญ์ผ๋ก ๋ถ๋ฆฌํฉ๋๋ค.
๋จ๊ธฐ (short-term band)
์ค๊ธฐ (mid-term band)
์ฅ๊ธฐ (long-term band)
๊ฐ ๋์ญ์ ๋น ๋ฅธ EMA์ ๋๋ฆฐ EMA์ ์ฐจ์ด(EMA difference)๋ก ์ป์ ๋จ์ํ ๋ฐด๋ํจ์ค๋ก ๊ณ์ฐ๋ฉ๋๋ค.
2. Hilbert ์ง๊ต ์ฑ๋ถ ๊ทผ์ฌ
๊ฐ ๋ฐด๋์ ๋ํด Ehlers ๊ณ์ด FIR ํํฐ๋ฅผ ์ด์ฉํ Hilbert ๊ทผ์ฌ ์ ํธ(Q)๋ฅผ ๊ณ์ฐํฉ๋๋ค.
์๋ณธ ๋ฐด๋ํจ์ค ์ ํธ(I)์ Q๋ฅผ ๊ฒฐํฉํ๋ฉด ๋ณต์ ์์(phasor) ๋ฅผ ๊ตฌ์ฑํ ์ ์๊ณ ,
์ด๋ฅผ ํตํด ๊ฐ ๋์ญ์ ์๊ฐ ์์(instantaneous phase) ์ ์ถ์ ํฉ๋๋ค.
3. ์์ ๊ณ์ฐ
Q/I์ ์ํฌํ์ ํธ ๊ฐ์ ๊ตฌํ๋ฉด ์์๊ฐ ฯ(โฯ ~ ฯ)๊ฐ ๋์ถ๋ฉ๋๋ค.
์ด ์์์ ํด๋น ์ฃผ๊ธฐ์ ์ง๋ ํ์ด๋ฐ์ ๋ํ๋
๋๋ค.
4. ์์ ์ ํฉ(Phase Coherence) ๊ณ์ฐ
๊ฐ ๋ฐด๋์ ์์์ ๋จ์ ํ์ด์ ๋ฒกํฐ (cos ฯ, sin ฯ)๋ก ๋ณํํฉ๋๋ค.
์ธ ๋ฒกํฐ์ ํ๊ท ์ ๊ตฌํ๊ณ , ๊ทธ ํ๊ท ๋ฒกํฐ์ ํฌ๊ธฐ๋ฅผ 0~100 ์ค์ผ์ผ๋ก ๋ณํํ ๊ฐ์ด PCI์
๋๋ค.
PCI = |ํ๊ท ํ์ด์ | ร 100
PCI = 100 โ ์์ ํ ์์ ์ผ์น
PCI = 0 โ ์์ ํ ์์ ๋ฌด์ง์
5. ์ค๋ฌด๋ฉ ๋ฐ ์ถ์ธ ์ปฌ๋ฌ๋ง
๊ณ์ฐ๋ PCI๋ EMA๋ก ์ฝ๊ฐ ํํํ๋์ด ์์ ์ ์ผ๋ก ํ์๋ฉ๋๋ค.
๋ํ, SuperTrend ๋ ์ง ํํฐ(ATR=5, Factor=6) ๋ก ์ถ์ธ ๋ฐฉํฅ์ ๋ฐ๋ผ ์์ด ๋ฐ๋๋๋ค:
์ด๋ก์: ์์น ์ถ์ธ
๋นจ๊ฐ์: ํ๋ฝ ์ถ์ธ
ํ์: ์ ์ ํฉ / ์ค๋ฆฝ ๊ตฌ๊ฐ
โจ ํด์ ๋ฐฉ๋ฒ
PCI โฅ 70 (๋์ ์ ํฉ)
์ฌ๋ฌ ํ์ํ๋ ์์ด ๊ฐ์ ๋ฐฉํฅ์ผ๋ก ๋๊ธฐํ๋์ด ์๋ ์ํ์
๋๋ค.
์ด๋ ์ถ์ธ ์ง์์ฑ, ๋ชจ๋ฉํ
์ ์ง, ๊ตฌ์กฐ์ ์์ ์ํ๋ฅผ ์๋ฏธํฉ๋๋ค.
PCI โค 30 (๋ฎ์ ์ ํฉ)
๊ฐ ์ฃผ๊ธฐ ๊ฐ ์์ ๋ถ์ผ์น๊ฐ ์ฌํด์ง๋ฉฐ, ์์ฅ์ด ๋ฐฉํฅ์ ์๊ฑฐ๋ ๋ณ๊ณก์ ์ ๊ทผ์ ํ ์ํฉ์
๋๋ค.
๋ณดํต ์กฐ์ ๊ธฐ, ๋ณ๋์ฑ ์ถ์, ํก๋ณด ๊ตญ๋ฉด์์ ์์ฃผ ๋ํ๋ฉ๋๋ค.
๊ธ๊ฒฉํ ๋ณ๋ (Phase Transition)
PCI๊ฐ ๊ธ๊ฒฉํ ํ๋ฝํ๋ ๊ตฌ๊ฐ์ ์ถ์ธ ํผ๋ก(trend fatigue) ๋๋ ํผ๋ ๊ตญ๋ฉด ์ง์
์ ์ ํธ์ผ ์ ์์ผ๋ฉฐ,
์ดํ PCI๊ฐ ์์นํ๊ธฐ ์์ํ๋ฉด ์๋ก์ด ์ง์(์ถ์ธ ํ์ฑ) ๊ฐ ์์๋ ๊ฐ๋ฅ์ฑ์ ์๋ฏธํฉ๋๋ค.
โจ ์๊ฐํ ๊ตฌ์ฑ
PCI ๋ผ์ธ:
์์ ์ ํฉ๋์ ํฌ๊ธฐ(0~100)๋ฅผ ํ์ํฉ๋๋ค.
SuperTrend ๋ฐฉํฅ์ ๋ฐ๋ผ ์์ด ๋์ ์ผ๋ก ๋ณํฉ๋๋ค.
์ ์ ๊ธฐ์ค์ :
70(๋์ ์ ํฉ), 50(์ค๊ฐ), 30(๋ฎ์ ์ ํฉ) ๊ธฐ์ค์ผ๋ก ์๊ฐํ๋ฉ๋๋ค.
ํ๊ท ์์ ๋ผ๋ฒจ:
PCI๊ฐ ๋์ ๋, ํ๊ท ์์์ ๋ฐฉํฅ์ด ์์น(bullish) ์ธ์ง ํ๋ฝ(bearish) ์ธ์ง๋ฅผ ๋ผ๋ฒจ๋ก ํ์ํฉ๋๋ค.
โจ ํ์ฉ ๋ฐฉ๋ฒ
RSI, ATR, DFI ๋ฑ ๋ค๋ฅธ ๋ชจ๋ฉํ
/๋ณ๋์ฑ ์งํ์ ํจ๊ป ์ฌ์ฉํ๋ฉด, ๋ณต์ ํ์ํ๋ ์ ๋๊ธฐํ ๊ตฌ๊ฐ์ ํ์งํ ์ ์์ต๋๋ค.
PCI ํ๋ฝ(30 ์ดํ)์ ์ถ์ธ ํผ๋ก ๋๋ ํผ๋ ์ง์
์ ์ ํธ๋ก, PCI ์์น(70 ์ด์)์ ์ง์ ํ๋ณต ๋๋ ์ถ์ธ ์ง์์ ์ ํธ๋ก ํด์ํ ์ ์์ต๋๋ค.
์ถ์ธ ์ ํ, ์กฐ์ , ๋๋ ๋ชจ๋ฉํ
์ฌํธ์ฑ ๊ตฌ๊ฐ์ ๊ฐ์งํ๋ ๋ฐ ์ ์ฉํฉ๋๋ค.
โจ ํ๊ณ์
PCI๋ ๋ฐฉํฅ์ฑ(Direction)์ ์ง์ ์ธก์ ํ์ง ์๊ณ , ๊ตฌ์กฐ์ ์ ํฉ(Alignment) ๋ง ์ธก์ ํฉ๋๋ค. ๋ฐ๋ผ์ ๋ฐ๋์ ๋ฐฉํฅ ํํฐ(SuperTrend, MA ๊ธฐ์ธ๊ธฐ ๋ฑ)์ ํจ๊ป ํด์ํด์ผ ํฉ๋๋ค.
Hilbert ๊ทผ์ฌ๋ ์์ ํ ๋ณต์ ํด์ ์ ํธ๊ฐ ์๋๋ผ, ์ค์๊ฐ ์์ ์ฑ์ ์ค์ํ ๊ทผ์ฌ ๋ชจ๋ธ์
๋๋ค.
PCI๋ ์ง์
์๊ทธ๋์ฉ๋ณด๋ค๋ ์์ฅ ๊ตฌ์กฐ ์ธ์์ฉ ๋ณด์กฐ ์งํ๋ก ์ ํฉํฉ๋๋ค.
โจ ๊ต์ก์ ๋ชฉ์
์ด ์คํฌ๋ฆฝํธ๋ ์์ ์ ํฉ(phase coherence) ๊ฐ๋
์ ์๊ฐํ์ ์ ๋์ ์ฐ๊ตฌ๋ฅผ ์ํ ๋ชฉ์ ์ผ๋ก ์ค๊ณ๋์์ต๋๋ค.
ํ๋ฒํธ ๋ณํ ๊ธฐ๋ฐ ์์ ๋ฒกํฐ(phasor) ์ ๋ฒกํฐ ํ๊ท ํ(vector averaging) ์ ๊ฐ๋
์ ํตํด
์์ฅ์ ๋ค์ค ์๊ฐ ๊ตฌ์กฐ ๊ฐ ์ผ๊ด์ฑ(coherence)์ ํ์ํ ์ ์์ต๋๋ค.
โจ๋ฉด์ฑ
์ด ์งํ๋ ๊ต์ก ๋ชฉ์ ์ผ๋ก๋ง ์ ๊ณต๋ฉ๋๋ค.
ํฌ์ ์กฐ์ธ์ด ์๋๋ฉฐ, ๋ชจ๋ ํธ๋ ์ด๋ฉ ๊ฒฐ์ ์ ์ฑ
์์ ์ฌ์ฉ์์๊ฒ ์์ต๋๋ค.
ยฉ 2025 Trading Playground Labs โ Phase Coherence Index (Hilbert Prototype v0.1)
Developed for structural & spectral analysis of market phase alignment.
Directional Flow Index (DFI) โ v2.4Directional Flow Index (DFI) โ v2.4
โจ 1) What DFI measures (conceptual)
DFI aims to quantify directional flow โi.e., whether trading activity is skewed toward buying (supportive pressure) or selling (resistive pressure) โand then present it as a normalized oscillator that is easy to compare across symbols and timeframes. It is designed to highlight high-confidence thrusts within a prevailing trend and to detect fatigue as momentum decays.
Positive DFI (> 0) : net buy-side pressure dominates.
Negative DFI (< 0) : net sell-side pressure dominates.
Magnitude reflects intensity after de-trending and Z-score normalization.
While multiple โflowโ proxies exist, this version emphasizes a True Volume Delta (TVD) workflow (default) that tallies buy vs. sell volume from a lower timeframe (LTF) inside an anchor timeframe bar, producing a more realistic per-bar delta when supported by the symbolโs data.
โจ 2) Core pipeline (how it works)
Flow construction (TVD default).
Using ta.requestVolumeDelta(LTF, Anchor), the script approximates up-volume vs. down-volume inside each anchor bar.
A per-bar delta is derived (with a reset on anchor switches to avoid jumps).
If TVD is unsupported on the symbol, DFI can fall back to synthetic proxies (e.g., Synthetic Delta Volume: (close-low)/(high-low) ร vol), but TVD is the intended default.
CVD-style accumulation.
Per-bar delta is cumulatively summed into a running flow line (CVD-like), providing temporal context to the net pressure.
High-pass de-trending + smoothing.
A high-pass step (EMA-based) removes slow drifts (trend bias) from the CVD line.
A short EMA smoothing reduces noise while preserving thrust.
Z-score normalization.
The de-trended series is standardized (rolling mean/std), so DFI readings are comparable across markets/timeframes.
The Signal line is an EMA of DFI and is used for momentum cross checks.
SuperTrend (regime filter).
A lightweight SuperTrend (ATR len=5, factor=6 by default) provides up/down regime.
DFI coloring and alerts can be conditioned on the regime (optional).
Fatigue % (0โ100).
Tracks energy (EMA of |DFI|) vs. peak energy (with adaptive half-life decay).
When energy stays far below the decaying peak, Fatigue% rises, suggesting momentum exhaustion.
The decay rate adapts to DFI volatility and regime alignment, so decay is faster when thrusts are misaligned with trend, slower when aligned and orderly.
Gradient highlight (confidence shading).
Histogram color transparency blends three ingredients:
DFI strength (|DFI| vs user-set bands)
Low fatigue (fresher thrusts score higher)
Regime alignment (DFI sign vs SuperTrend direction)
Result: darker bars indicate higher confidence in thrust quality; faint bars warn of weaker, stale, or misaligned pushes.
โจ 3) Interpreting the plots
DFI histogram (columns):
Green above zero for buy-side thrust, Red below zero for sell-side thrust.
Opacity encodes confidence (darker = stronger alignment & lower fatigue).
Signal (line): EMA of DFI used for momentum regime checks.
Zero line: structural reference for thrust crossovers.
Fatigue Table (optional): shows Fatigue%, SuperTrend regime, and selected Flow Method.
โจ 4) Alerts (examples)
Long Thrust: DFI crosses above zero while in Up regime.
Short Thrust: DFI crosses below zero while in Down regime.
Loss of Momentum (Up): DFI crosses below Signal while DFI > 0 (warns of weakening long thrust).
Loss of Momentum (Down): DFI crosses above Signal while DFI < 0 (warns of weakening short thrust).
โจ 5) How to set the TVD Lower TF (important)
TVD needs a sensible LTF/Anchor ratio for balanced accuracy and performance. As a rule of thumb, aim for ~30โ120 LTF bars inside one anchor bar:
1h chart โ 1โ2m LTF (if seconds not available).
4h โ 3โ5m.
1D โ 15โ30m.
1W โ 1โ2h.
1M โ 4hโ1D.
Notes: Some symbols/exchanges do not provide seconds. Too small an LTF can be heavy/noisy; too large becomes coarse/laggy.
โจ 6) Practical usage patterns
Trend-following entries:
Look for DFI > 0 in Up regime (green) with low Fatigue%, and DFI crossing above zero or above its Signal.
Prefer darker (higher-confidence) histogram bars.
Trend-following exits / de-risking:
Rising Fatigue% toward your high threshold (e.g., 80โ90) suggests exhaustion.
DFI vs Signal crosses against your position can be used to scale down.
Avoid chop:
When DFI oscillates around zero with faint bars and Fatigue% rises quickly, quality is lowโbe selective.
โจ 7) Inputs (summary)
Flow Method: default True Volume Delta (LTF scan); synthetic fallbacks available.
Processing: Detrend length, smoothing EMA, Z-score window, Signal EMA.
Regime: SuperTrend ATR length & factor (default 5 & 6).
Fatigue%: EMA length, base half-life, adaptive volatility coupling (enable/disable, sensitivity).
UI Highlight: strength thresholds, fatigue cap, alignment weights, opacity range.
Table: toggle Fatigue table, decimals, position.
โจ 8) Compatibility & performance notes
TVD requires supported data for the symbol; if unavailable, DFI can switch to synthetic deltas.
Smaller LTFs increase request load and may introduce noise; prefer a balanced ratio.
The indicator is designed to be self-contained; no other overlays are needed to read the outputs.
โจ 9) Limitations and good practice
This is an oscillator, not a price predictor. Extreme values can persist in strong trends.
Normalization (Z-score) makes values comparable, but distributions differ across assets/timeframes.
Always combine with risk management and position sizing; avoid interpreting any single condition as a guarantee.
โจ 10) Disclaimer
This script is for educational purposes only and does not constitute financial advice. Trading involves risk, including possible loss of principal.
---------------------------------------------------------------------------------------------------------------------
ํ๊ตญ์ด ๋ฒ์ญ / Korean version below
โจDFI๋ ๋ฌด์์ธ๊ฐ?
DFI๋ ์์ฅ์ ๋งค์ยท๋งค๋ ์ฐ์๋ฅผ Flow(ํ๋ฆ) ํํ๋ก ๋ถ์ํ์ฌ
๊ทธ ์๋์ง๋ฅผ ์ ๊ทํ๋ ์ค์ค๋ ์ดํฐ๋ก ํํํ๋ ์งํ์
๋๋ค.
๊ฐ๊ฒฉ์ ๋จ์ ๋ณ๋์ด ์๋๋ผ, โ์ผ๋ง๋ ์ผ๊ด์ฑ ์๋ ์๋ ฅ(Flow)์ด ์ ์ง๋๋๊ฐโ๋ฅผ ๋ณด์ฌ์ค๋๋ค.
DFI > 0: ๋งค์์ธ ์ฐ์ (์๋ฐฉ ์๋ ฅ)
DFI < 0: ๋งค๋์ธ ์ฐ์ (ํ๋ฐฉ ์๋ ฅ)
๊ฐ์ ํฌ๊ธฐ: ๋ชจ๋ฉํ
์ ๊ฐ๋ (Z-score ๊ธฐ๋ฐ ์ ๊ทํ)
๊ธฐ๋ณธ ๋ฐฉ์์ธ True Volume Delta (TVD) ๋ ์์ ๋ด(Anchor) ๋ด๋ถ์ ํ์ ํ์ํ๋ ์(LTF) ๋ฐ์ดํฐ๋ฅผ ์ค์บํด
์ค์ ๋งค์/๋งค๋ ์ฒด๊ฒฐ๋ ์ฐจ์ด๋ฅผ ๊ณ์ฐํฉ๋๋ค.
์ด๋ก์จ ๋จ์ ๊ฐ๊ฒฉ ๋ณํ๊ฐ ์๋ ์ค์ ์ฒด๊ฒฐ ํ๋ฆ์ ๋ฐฉํฅ์ฑ์ ๋ฐ์ํฉ๋๋ค.
โจDFI์ ๊ณ์ฐ ๊ณผ์ (๊ฐ๋
์ ํ๋ฆ)
1. Flow ๊ณ์ฐ (TVD ๋๋ ๋์ฒด ๋ฐฉ์)
ta.requestVolumeDelta()๋ฅผ ์ฌ์ฉํ์ฌ ์ยทํ์ TF๊ฐ ๋ณผ๋ฅจ ๋ธํ๋ฅผ ๊ณ์ฐํฉ๋๋ค.
TVD ๋ฏธ์ง์ ์ฌ๋ณผ์ ์๋์ผ๋ก Synthetic Delta Volume ๋ฑ ๋์ฒด ๋ฐฉ์์ผ๋ก ์ ํ๋ฉ๋๋ค.
2. ๋์ (CVD) ๊ตฌ์ฑ
Flow๋ฅผ CVD์ฒ๋ผ ๋์ ํ์ฌ ์๋งค์/์๋งค๋ ์๋ ฅ์ ๋์ ์ถ์ ํฉ๋๋ค.
3. ๊ณ ์ญํต๊ณผ(High-pass) ํํฐ
๋์ ํ๋ฆ(CVD)์์ ์ฅ๊ธฐ ์ถ์ธ ์ฑ๋ถ์ ์ ๊ฑฐํ์ฌ ์์ํ ๋ณ๋ ์๋์ง๋ง ๋จ๊น๋๋ค.
4. Z-score ์ ๊ทํ
ํ๊ท ๊ณผ ํ์คํธ์ฐจ๋ก ํ์คํํด DFI์ ํฌ๊ธฐ๋ฅผ **์ผ์ ํ ์ค์ผ์ผ(0 ์ค์ฌ)**๋ก ๋ง๋ญ๋๋ค.
๋ค๋ฅธ ์ข
๋ชฉยท์๊ฐ๋ ๊ฐ ๋น๊ต๊ฐ ์ฉ์ดํฉ๋๋ค.
5. SuperTrend ๋ ์ง(์ถ์ธ ์ํ) ์ธ์
ATR ๊ธฐ๋ฐ ST(๊ธฐ๋ณธ: Length=5, Factor=6)๋ฅผ ํตํด ์์ฅ์ด ์์น/ํ๋ฝ/์ค๋ฆฝ ์ค ์ด๋์ ์๋์ง๋ฅผ ๊ฐ์งํฉ๋๋ค.
DFI ์ปฌ๋ผ ์์ ๋ฐ ์๋ฆผ์ ์ด ST ๋ฐฉํฅ์ ๋ฐ๋ผ ๋์ํฉ๋๋ค
6. Fatigue% (ํผ๋ก๋ ์ง์)
์ต๊ทผ ์๋์ง ํ๊ท ๊ณผ ์ญ์ฌ์ ํผํฌ(๊ฐ์ )๋ฅผ ๋น๊ตํด 0~100%๋ก โ์ ์ ๋โ๋ฅผ ํํํฉ๋๋ค.
๋์์๋ก ํผ๋กํ ์ํ, ๋ฎ์์๋ก ์ ์ ํ ์ถ์ธ.
๋ํ ๋ณ๋์ฑ๊ณผ ์ ๋ ฌ ์ฌ๋ถ์ ๋ฐ๋ผ Adaptive Half-Life๋ก ๊ฐ์ ์๋๊ฐ ์๋ ์กฐ์ ๋ฉ๋๋ค.
7. ๊ทธ๋ผ๋์ธํธ ํ์ด๋ผ์ดํธ (Gradient Highlight)
DFI ๊ฐ๋(|DFI|), Fatigue%, ๋ ์ง ์ ๋ ฌ ์ํ๋ฅผ ์ข
ํฉํด ํ์คํ ๊ทธ๋จ์ ํฌ๋ช
๋๋ฅผ ์ฐ์์ ์ผ๋ก ๋ณํ์ํต๋๋ค.
๊ฐํ๊ณ ์ ์ ํ๋ฉฐ ์ ๋ ฌ๋ ์ถ์ธ์ผ์๋ก ๋ ์งํ๊ฒ ํ์, ๋ฐ๋๋ก ์ฝํ๊ฑฐ๋ ํผ๋กํ ๊ตฌ๊ฐ์ ํ๋ฆฌ๊ฒ ํ์๋ฉ๋๋ค.
โจDFI ์ฐจํธ ํด์๋ฒ
DFI ํ์คํ ๊ทธ๋จ (์ปฌ๋ผ):
์๋ก ํฅํ ์ด๋ก์ = ๋งค์ ์ฐ์,
์๋๋ก ํฅํ ๋นจ๊ฐ์ = ๋งค๋ ์ฐ์.
์งํ ์๋ก โ์ ๋ขฐ๋ ๋์ ํ๋ฆ(Aligned + Low Fatigue)โ
ํ๋ฆด์๋ก โ๋
ธ์ด์ฆ์ฑ ์์ง์ / ํผ๋ก ๊ตฌ๊ฐโ
Signal ์ :
DFI์ EMA.
DFI์์ ๊ต์ฐจ๋ ๋ชจ๋ฉํ
์ ํ ์ ํธ๋ก ์ฌ์ฉ.
Zero ์ :
์ถ์ธ ์ ํ์ ๊ธฐ์ค์ .
Fatigue Table:
Fatigue%, Regime, Flow Method ์ ๋ณด๋ฅผ ์ค์๊ฐ ํ์.
โจ์๋ฆผ ์กฐ๊ฑด (Alerts)
DFI Long Thrust: ์์น ๋ ์ง์์ DFI๊ฐ 0 ์๋ก ๋ํ.
DFI Short Thrust: ํ๋ฝ ๋ ์ง์์ DFI๊ฐ 0 ์๋๋ก ๋ํ.
Loss of Momentum (Up): DFI>0 ์ํ์์ Signal ์๋๋ก ํ๋ฝ.
Loss of Momentum (Down): DFI<0 ์ํ์์ Signal ์๋ก ์์น.
TVD (True Volume Delta) ์ค์ ๊ฐ์ด๋
TVD๋ Anchor:LowerTF = ์ฝ 30~120๋ฐฐ ๋น์จ์ด ๊ฐ์ฅ ํจ์จ์ ์
๋๋ค.
1์๊ฐ๋ด -> 30์ด~2๋ถ
4์๊ฐ๋ด -> 2~8๋ถ
์ผ๋ด(1D) -> 12~48๋ถ
์ฃผ๋ด(1W) -> 1~4์๊ฐ
์๋ด(1M) -> 4์๊ฐ~ 1์ผ
์ฐธ๊ณ :
์ผ๋ถ ๊ฑฐ๋์๋ ์ด ๋จ์๋ฅผ ์ง์ํ์ง ์์ต๋๋ค โ ๋ถ ๋จ์๋ก ๋์ฒด.
๋๋ฌด ์งง์ LTF โ ๊ณผ๋ถํ/๋
ธ์ด์ฆ,
๋๋ฌด ๊ธด LTF โ ์ ํธ ์ง์ฐ/์ ๋ฐ๋ ์ ํ.
โจํ์ฉ ์ ๋ต ์์
์ถ์ธ ์ถ์ข
(Trend-following):
Up Regime์์ DFI>0 & Fatigue% ๋ฎ์ ๋ ๋กฑ ์ ํธ ์ฐ์ .
DFI๊ฐ Signal ์๋ก ๋ํํ๋ ์์ ์ด thrust ์์์ .
๋ฆฌ์คํฌ ์ถ์ (De-risking):
Fatigue%๊ฐ 80~90 ์ด์์ด๋ฉด ์ถ์ธ ๊ณผ์ด๋ก ๊ฐ์ฃผ.
DFI๊ฐ Signal์ ์ญ๋ฐฉํฅ์ผ๋ก ๊ต์ฐจ ์ ํฌ์ง์
์ถ์ ๊ณ ๋ ค.
ํก๋ณด ํํผ:
DFI๊ฐ 0์ ๋ถ๊ทผ์์ ์๊ฒ ์ง๋ํ๋ฉฐ ํ๋ฆฟํ๊ฒ ํ์๋ ๋๋
๋ฐฉํฅ์ฑ์ด ์ฝํ ๊ตฌ๊ฐ โ ์ง์
ํํผ.
โจํ๊ณ ๋ฐ ๊ถ์ฅ ์ฌ์ฉ๋ฒ
TVD๋ ์ฌ๋ณผ/๊ฑฐ๋์์ ์ง์ ์ฌ๋ถ์ ๋ฐ๋ผ ์ ํ๋ ์ ์์ต๋๋ค.
Z-score ์ ๊ทํ๋ก ์์น ๊ฐ ๋น๊ต๋ ์ฉ์ดํ์ง๋ง, ์์ฐ๋ง๋ค ๋ถํฌ ํน์ฑ์ด ๋ฌ๋ผ ์ ๋๊ฐ ํด์์ ์ฃผ์ ํ์.
Fatigue%๋ โ๋ชจ๋ฉํ
์ ์ ๋โ ๊ฐ๋
์ด์ง, ๋ฐ์ ํ์ด๋ฐ์ด ์๋๋๋ค.
๋ฆฌ์คํฌ ๊ด๋ฆฌ ๋ฐ ์ ๋ต์ ์ปจํ
์คํธ ์์์ ์ฌ์ฉํ์ธ์.
โจ๋ฉด์ฑ
(Disclaimer)
์ด ์คํฌ๋ฆฝํธ๋ ๊ต์ก์ฉ ๋๊ตฌ(Educational purpose)์ด๋ฉฐ,
ํฌ์ ์กฐ์ธ(Financial advice)์ด ์๋๋๋ค.
๋ชจ๋ ํธ๋ ์ด๋ฉ์๋ ์์ค์ ์ํ์ด ์์ผ๋ฉฐ,
DFI์ ์ ํธ๋ ์์น๊ฐ ์์ต์ ๋ณด์ฅํ์ง ์์ต๋๋ค.
โจ์ ๋ฆฌ
DFI๋ ๋จ์ํ โ์ถ์ธ ์ค์ค๋ ์ดํฐโ๊ฐ ์๋๋ผ,
์๋์ง์ ํ๋ฆ + ํผ๋ก๋ + ๋ ์ง ์ ๋ ฌ์ด๋ผ๋ 3์์๋ฅผ ๊ฒฐํฉํด
โ์ง์ ๊ฐ๋ฅํ ๋ฐฉํฅ์ฑโ์ ์๊ฐ์ ์ผ๋ก ํํํ๋ ์งํ์
๋๋ค.
์ฆ, ๋จ์ํ โ๋ฐฉํฅโ์ด ์๋๋ผ โ์ถ์ธ์ ์ง(Quality)โ์ ๋ณด์ฌ์ฃผ๋
์๋ก์ด ํํ์ Flow ๋ถ์ ๋๊ตฌ์
๋๋ค.
4H SMA+CCI Signal Map - J&COverview
This TradingView indicator identifies high-timeframe (HTF) trend-confirmation entry signals based on the relationship between two Simple Moving Averages (SMAs) and the Commodity Channel Index (CCI). It provides visual cues (arrows, labels, and background shading) when a new 4-hour bar confirms a long or short setup, even if applied to lower-timeframe charts (like 1H or 15m).
Core Concept
The script monitors higher-timeframe (default: 4H) trend conditions:
Fast SMA (default 20) and Slow SMA (default 40) determine the trend direction.
CCI (default 5-period) acts as a momentum filter.
Signals are generated only when a new 4H candle opens, ensuring cleaner higher-timeframe alignment and avoiding lower-timeframe noise.






















