J1 - Glassnode Metrics ToolkitTV announced that you can now pull data from Glassnode!
Here you can find every metric available to compare blockchain data from different coins.
How to use:
- Select your Coin
- Select your Metric
Then you can enable another coin or the same one to compare data.
As per TV's post:
Coins:
BTC, ETH, LTC, AAVE, ABT, AMPL, ANT, ARMOR, BADGER, BAL, BAND, BAT, BIX, BNT, BOND, BRD, BUSD, BZRX, CELR, CHSB, CND, COMP, CREAM, CRO, CRV, CVC, CVP, DAI, DDX, DENT, DGX, DHT, DMG, DODO, DOUGH, DRGN, ELF, ENG, ENJ, EURS, FET, FTT, FUN, GNO, GUSD, HEGIC, HOT, HPT, HT, HUSD, INDEX, KCS, LAMB, LBA, LDO, LEO, LINK, LOOM, LRC, MANA, MATIC, MCB, MCO, MFT, MIR, MKR, MLN, MTA, MTL, MX, NDX, NEXO, NFTX, NMR, Nsure, OCEAN, OKB, OMG, PAX, PAY, PERP, PICKLE, PNK, PNT, POLY, POWR, PPT, QASH, QKC, QNT, RDN, REN, REP, RLC, ROOK, RPL, RSR, SAI, SAN, SNT, SNX, STAKE, STORJ, sUSD, SUSHI, TEL, TOP, UBT, UMA, UNI, USDC, USDK, USDT, UTK, VERI, WaBi, WAX, WBTC, WETH, wNMX, WTC, YAM, YFI, ZRX.
Metrics:
ACTIVEADDRESSES — Number of Active Addresses
SENDINGADDRESSES — Number of Sending Addresses
RECEIVINGADDRESSES — Number of Receiving Addresses
NEWADDRESSES — Number of New Addresses
ADDRESSES — Number of Addresses
BLOCKS — Block Height
BLOCKSMINED — Number of Blocks Mined
BLOCKMEANINTERVAL — Mean Block Interval
BLOCKMEDIANINTERVAL — Median Block Interval
TOTALBLOCKSIZE — Total Block Size
MEANBLOCKSIZE — Mean Block Size
TOTALTXFEES — Total Transaction Fees
MEANTXFEES — Mean Transaction Fees
MEDIANTXFEES — Median Transaction Fees
TOTALTXFEESUSD — Total Transaction Fees in USD
MEANTXFEESUSD — Mean Transaction Fees in USD
MEDIANTXFEESUSD — Median Transaction Fees in USD
TOTALGASUSED — Total Gas Used
MEANGASUSED — Mean Gas Used
MEDIANGASUSED — Median Gas Used
MEANTXGASPRICE — Mean Transaction Gas Price in gwei
MEDIANTXGASPRICE — Median Transaction Gas Price in gwei
MEANTXGASPRICEUSD — Mean Transaction Gas Price in USD
MEDIANTXGASPRICEUSD — Median Transaction Gas Price in USD
MEANGASLIMIT — Mean Transaction Gas Limit
MEDIANGASLIMIT — Median Transaction Gas Limit
MARKETCAP — Market Cap
DIFFICULTY — Mining Difficulty
HASHRATE — Mean Hash Rate
ATHDRAWDOWN — Price Drawdown from ATH
SOPR — Spent Output Profit Ratio (SOPR)
NEWDEPOSITS — Number of New Deposits
NEWSTAKED — Amount of New Value Staked
NEWSTAKEDUSD — Amount of New Value Staked in USD
NEWVALIDATORS — Number of New Validators
DEPOSITS — Total Number of Deposits
STAKED — Total Value Staked
STAKEDUSD — Total Value Staked in USD
VALIDATORS — Total Number of Validators
PHASE0GOAL — Phase 0 Staking Goal
ACTIVE1Y — Percent of Supply Last Active 1+ Years Ago
TXS — Number of Transactions
TXSPS — Number of Transactions per Second
TFSPS — Number of Transfers per Second
TOTALTXSIZE — Total Size of Transactions
MEANTXSIZE — Mean Size of Transfers
TOTALVOLUME — Total Transfer Volume
TOTALVOLUMEUSD — Total Transfer Volume in USD
MEANVOLUME — Mean Transfer Volume
MEANVOLUMEUSD — Mean Transfer Volume in USD
MEDIANVOLUME — Median Transfer Volume
MEDIANVOLUMEUSD — Median Transfer Volume in USD
UTXOCREATED — Number of Created UTXOs
UTXOSPENT — Number of Spent UTXOs
UTXOTOTAL — Total Numbers of UTXOs in the Network
UTXOVALUETOTAL — Total Value of Created UTXOs
UTXOVALUETOTALUSD — Total Value of Created UTXOs in USD
UTXOVALUEMEAN — Mean Value of Created UTXOs
UTXOVALUEMEANUSD — Mean Value of Created UTXOs in USD
UTXOVALUEMEDIAN — Median Value of Created UTXOs
UTXOVALUEMEDIANUSD — Median Value of Created UTXOs in USD
UTXOVALUETOTALSPENT — Total Value of Spent UTXOs
UTXOVALUETOTALSPENTUSD — Total Value of Spent UTXOs in USD
UTXOVALUEMEANSPENT — Mean Value of Spent UTXOs
UTXOVALUEMEANSPENTUSD — Mean Value of Spent UTXOs in USD
UTXOVALUEMEDIANSPENT — Median Value of Spent UTXOs
UTXOVALUEMEDIANSPENTUSD — Median Value of Spent UTXOs in USD
UNISWAPTXS — Number of Transactions on Uniswap
UNISWAPTOTALVOLUME — Total Volume Traded on Uniswap
UNISWAPTOTALVOLUMEUSD — Total Volume Traded on Uniswap in USD
UNISWAPLIQUIDITY — Total Liquidity on Uniswap
UNISWAPLIQUIDITYUSD — Total Liquidity on Uniswap in USD
Buscar en scripts para "liquidity"
PVSRA Volume Price - Some people say "Price Action is King". I say, we cannot know how the MMs (Market Makers) will move price next, period. But price tends to consolidate above key SR when MMs are filling short orders for SM (Smart Money) and long orders for DM (Dumb Money), and price tends to consolidate below key SR when MMs are filling long orders for SM and short orders for DM. The MMs are also "SM", and they tend to do the other SMs "one better"! This means that after the MMs fill the SM/DM orders, they might move price a bit further in an attempt to stop out some of those SM executed orders and sucker in more DM; both giving liquidity for the MMs to add to their own SM side position. Yes, the MMs are bastards. But the point is that could leave price not "nicely" above or below a SR anymore, yet more consolidation can occur.
Volume - Increases in activity denote increase in interest. But, is it long or short interest? Where is price in the bigger picture when this is happening? Is it at relative highs, or lows in the overall price action? And if a high volume bar is for a candle which you can examine by going to lower TF charts, you might see where in the spread of that candle the most volume occurred, high or low! Using volume is about taking note of relative increases in volume and what price is doing at the same time. Are the better volumes favoring the lower or the higher prices, as the MMs waffle price up and down? And do the volumes get particularly notable when the MMs take price above or below key SR?
S&R - Read all about S&R at "Baby Pips.com". What I want you to realize here is that the whole, half and quarter numbered price levels (hereinafter referred to as "Levels") are the most important SR of all in this market! Not because price stops, pauses, proceeds or reverses there, but because it is above or below these levels that important consolidation (MMs filling SM orders) takes place. Once SM long orders are filled, they become interested in placing orders to close them at higher prices, and hence the MMs will be moving price higher, eventually. Once SM short orders are filled, they become interested in placing orders to close them at lower prices, and hence the MMs will be moving price lower, eventually.
PVSRA - If we can spot consolidations above/below key SR, examine the overall price action on various TF charts, and take note of where the notable increases in volume have most recently occurred (did volume favor relative highs or lows), then we can build a consensus about what kind of orders the MMs have most recently been filling; buying to open longs or close shorts, or selling to open shorts or close longs. And we can get a better idea if things will next become bullish or bearish. And once PA confirms our bullish or bearish PVSRA results, by recognizing the importance of Levels we can look beyond current PA in the direction it is going and look to historic PA S&R (consolidation around key Levels) to come up with candidates for where the price might be headed. And bull or bear swings typically run in terms of 100+, 150+, 200+ pips, .....etc. And now you know why.
Okay. Now, if this is your first introduction to PVSRA, and having just read the above, you are likely scratching your head and still confused. That is normal. I will tell you a secret about the market and why you have a right to be confused. The secret is this. The market cannot be defined by mathematics nor by immutable logic. This is why the most advanced mathematicians over a century have never even come close to cracking the market. It cannot be done. Something else, other than math and immutable logic is the fundamental operand in the market. Have you ever watched a child attempt a jigsaw puzzle for the first time? And watched as that child grew and attempted more of them, and more complex ones? What is at work in the market I will elaborate on later, but for now trust me in this. We need to apply ourselves to learning how to do PVSRA just as a child attacks learning how to do jigsaw puzzles. And we must continue doing PVSRA, because in time our mind will "learn" when we have just picked up an important piece of the puzzle, and that we know where it goes! Developing the skill of PVSRA is an art form. We must not allow ourselves to feel badly if we miss clues. PVSRA is an art form that takes time to perfect. Over time our skill will grow and our "read" of the unpredictable market will improve. We must take to ongoing learning and application of PVSRA.
Introduction to How the Market Really Works
Does anybody remember the "lil' Abner" cartoons in the Sunday papers? Let me draw for you a mental picture of how the market really works.....
Imagine Daddy Yokum ferociously racing a buckboard wagon up and down the steep inclines and declines in the rough, rocky mountain road that has sharp turns and a sheer cliff on one side. The wagon wheels are spewing rocks off the side of the cliff! Even Daddy Yokum's shotgun is going off due to the jolting of the buckboard! Daddy Yokum has a demented look on his face, but he is smiling! The horse has a wild look in it's eyes and is frothing at the mouth. There are two passengers being tossed around in the back of the buckboard, terror stricken! Now, let's pan back from this cartoon picture and place the labels needed. On the side of the wagon is the sign "Market Pricing". The demented, smiling Daddy Yokum, is the Market Maker. The passengers being tossed around are the buyers and sellers.
.....Got it? Market prices are not determined by the buyers and sellers. They are determined by the Robber Bank Market Makers (MMs).
MMs are Market Manipulators of Price, and Thieves!
The "market" is the sole creation of the Robber Banks that "make the market". While it serves the world of commerce, they run it to make profits. And they opened the market up to foster prolific currency trading by others for the sole purpose of making more profits. They move prices up and down to "create liquidity" to fill the orders of SM (Smart Money) and DM (Dumb Money), for the commissions they make by filling the orders. When they have some orders above the current price and some below the current price, who do you think determines the sequence of direction and distance the price is going to move so these orders can be filled? And always - since they know how they are going to move price next - they take positions themselves to make additional profits.
They do this by:
1. Manipulating price to sucker into the market DM that is taking the wrong side position.
2. Manipulating price to sucker into the market SM that is taking the right side position, but too soon, and later manipulating price to hit their stops.
They have total control of pricing, and by these actions they effectively "steal" from others the money to fill their own "right side" positions before moving the price to the next area they have decided on for filling orders, and for taking profit on their positions built beforehand. Don't get me wrong. I do not object to the market volatility these thieving Robber Banks create. We need it. But we also need to understand what these people are like, the cloth they are cut from. They are crooks, and we have to be extra careful about trading in the market they operate. On some special days you can see them in their true colors. We should witness it. Take note of it. Speak of it. And remember it!
DOJI FU IndicatorIndicator is designed to paint a doji, the size of which can be adjusted in settings.
Provided there is a valid doji, the following candle is a 'FU candle' or an 'Institution' candle. This candle wicks above/below the doji and takes liquidity from above or below.
Colours can be changed
Red = Doji candle
Yellow = FU candle
Example shown on the 1hr chart, red doji indicating a change of trend upwards, the FU candle (yellow) takes liquidity from above and sweeps down.
Multi-Exchange Volume (30 Tickers) by kurtsmock + BV + rVolauthor: kurtsmock
Fully Customizable ticker set. Up to 30 Tickers. Bitcoin set as default.
-- IMPORTANT NOTE: --
30 Exchanges are a lot. It can take a while to load. You can fully customize this indicator to your liking. Here's how:
1. Load indicator
2. Open Settings
3. Uncheck the switch box for exchanges you want unincluded
4. At the bottom of the settings menu click "Defaults" and hit "Save as Default"
5. To turn them all back on, hit "Reset Settings" in that same "Defaults" menu and click "Save as Default" again.
Also, you don't have to use this with Bitcoin. This works with any asset, just change the ticker in the settings.
There's a lot going on with this indicator so the following is descriptions and instructions to help you better understand what's going on here. Thanks!
Goal:
- To provide a mechanism for assets on multiple exchanges to have their volume evaluated together
Edge:
- Having better and more complete volume information
Notes:
- The Default Exchanges for this indicator are highest volume bitcoin exchanges, but may contain "fake volume"
- Indicator is set for Bitcoin by default. However, you can change the tickers to reflect any asset you want
////// rVol //////
Goal:
- To understand how much volume is being executed relative to the same candle on previous days/periods
Edge:
- Higher rVol implies higher volatility and market interest.
- High rVol = higher than average volume . Markets move on volume so higher than average volume indicates increased market activity/volatility
- rVol is an indirect measure of active or anticipated volatility
Definitions:
- rVol: The volume of a period compared to the Average Volume of that same period in past sessions
- Important to note it does NOT add up the last 10 (default) candles, but rather the last 10 candles at session intervals.
- Example:
-- On a Tuesday, 1h chart it will add up the last ten Tuesday, 9:00 am candles, not including the current, active candle.
-- It then averages those lookback candles.
-- It then plots the percentage relationship between the most recent candle and the average of the lookback candles
-- Avg Vol of Lookback candles = 5000,
-- Volume of most recent candle = 4000: Output = rVol = 80:
-- Volume of most recent candle was 80% of the average volume in the 9 am time period of the last ten Tuesdays in the 9 am, 1h period
Notes:
- rVol does not add current candle volume into lookback sum. So, you set lookback to be: (not including the current day)
- rVol is on a switch. So, if you want to see rVol instead of volume, hit the switch in the settings
- If you want to see both, load 2 instances of the indicator.
////// Better-er Volume //////
Goal:
To Identify:
- When a candle closes at the highest volume * range relative to the lookback period and close > open
- When a candle closes at the highest volume * range relative to the lookback period and close < open
- When a candle closes at the highest volume / price relative to the lookback period
Edge:
- Identifies beginnings of price expansion, climax of price expansion, breakouts, pivots, and take profit points on the volume chart
Notes:
- Based generally on Barry Taylor's "Better Volume" indicator and ideas from Pascal Willain's book "Value in Time."
- Better-er Volume rules are applied to both Total Volume or rVol.
-- When rVol is displayed Better-er Volume is applied to rVol
-- When Total Volume is displayed Better-er Volume is applied to Total Volume
// Plot Key: //
Green Triangle Up = Often marks the beginning and/or end of price expansion to the upside
Red Triangle Up = Often marks the beginning and/or end of price expansion to the downside
Yellow Square = High Volume but Tight Range. Implies a Battle of Bulls and Bears. High Liquidity area. Provided Liquidity is not enough to move price. Thick Limit Order Book.
Purple Triangle Up or Down = Implies high market participation. Typically at the end of expansion when very significant s/r is hit
category: volume Volatility
tags: Volume rVol relativevolume Bitcoin cryptocurrency bettervolume
Many More Volume Indicators Coming Out Soon!
Volume Surprise [LuxAlgo]The Volume Surprise tool displays the trading volume alongside the expected volume at that time, allowing users to spot unexpected trading activity on the chart easily.
The tool includes an extrapolation of the estimated volume for future periods, allowing forecasting future trading activity.
🔶 USAGE
We define Volume Surprise as a situation where the actual trading volume deviates significantly from its expected value at a given time.
Being able to determine if trading activity is higher or lower than expected allows us to precisely gauge the interest of market participants in specific trends.
A histogram constructed from the difference between the volume and expected volume is provided to easily highlight the difference between the two and may be used as a standalone.
The tool can also help quantify the impact of specific market events, such as news about an instrument. For example, an important announcement leading to volume below expectations might be a sign of market participants underestimating the impact of the announcement.
Like in the example above, it is possible to observe cases where the volume significantly differs from the expected one, which might be interpreted as an anomaly leading to a correction.
🔹 Detecting Rare Trading Activity
Expected volume is defined as the mean (or median if we want to limit the impact of outliers) of the volume grouped at a specific point in time. This value depends on grouping volume based on periods, which can be user-defined.
However, it is possible to adjust the indicator to overestimate/underestimate expected volume, allowing for highlighting excessively high or low volume at specific times.
In order to do this, select "Percentiles" as the summary method, and change the percentiles value to a value that is close to 100 (overestimate expected volume) or to 0 (underestimate expected volume).
In the example above, we are only interested in detecting volume that is excessively high, we use the 95th percentile to do so, effectively highlighting when volume is higher than 95% of the volumes recorded at that time.
🔶 DETAILS
🔹 Choosing the Right Periods
Our expected volume value depends on grouping volume based on periods, which can be user-defined.
For example, if only the hourly period is selected, volumes are grouped by their respective hours. As such, to get the expected volume for the hour 7 PM, we collect and group the historical volumes that occurred at 7 PM and average them to get our expected value at that time.
Users are not limited to selecting a single period, and can group volume using a combination of all the available periods.
Do note that when on lower timeframes, only having higher periods will lead to less precise expected values. Enabling periods that are too low might prevent grouping. Finally, enabling a lot of periods will, on the other hand, lead to a lot of groups, preventing the ability to get effective expected values.
In order to avoid changing periods by navigating across multiple timeframes, an "Auto Selection" setting is provided.
🔹 Group Length
The length setting allows controlling the maximum size of a volume group. Using higher lengths will provide an expected value on more historical data, further highlighting recurring patterns.
🔹 Recommended Assets
Obtaining the expected volume for a specific period (time of the day, day of the week, quarter, etc) is most effective when on assets showing higher signs of periodicity in their trading activity.
This is visible on stocks, futures, and forex pairs, which tend to have a defined, recognizable interval with usually higher trading activity.
Assets such as cryptocurrencies will usually not have a clearly defined periodic trading activity, which lowers the validity of forecasts produced by the tool, as well as any conclusions originating from the volume to expected volume comparisons.
🔶 SETTINGS
Length: Maximum number of records in a volume group for a specific period. Older values are discarded.
Smooth: Period of a SMA used to smooth volume. The smoothing affects the expected value.
🔹 Periods
Auto Selection: Automatically choose a practical combination of periods based on the chart timeframe.
Custom periods can be used if disabling "Auto Selection". Available periods include:
- Minutes
- Hours
- Days (can be: Day of Week, Day of Month, Day of Year)
- Months
- Quarters
🔹 Summary
Method: Method used to obtain the expected value. Options include Mean (default) or Percentile.
Percentile: Percentile number used if "Method" is set to "Percentile". A value of 50 will effectively use a median for the expected value.
🔹 Forecast
Forecast Window: Number of bars ahead for which the expected volume is predicted.
Style: Style settings of the forecast.
Super Optimized SMA 20/200 Strategy - Long & Short_grok### Description of the SMA 20/200 Trading Strategy with Proposed Optimizations
The "Super Optimized SMA 20/200 Strategy - Long & Short" is a technical trading strategy designed for TradingView, leveraging two Simple Moving Averages (SMA) — a 20-period SMA for short-term trend detection and a 200-period SMA for long-term support/resistance — to identify entry and exit points for both long and short positions. Originally inspired by Emmanuel Malyarovich's minimalist approach, the strategy has been enhanced with optimizations to improve profitability, reduce risk, and adapt to volatile markets like cryptocurrencies (e.g., XRPUSD). Below is a detailed description of the base strategy and the proposed optimizations.
#### **Base Strategy Overview**
- **Indicators Used**:
- **20 SMA**: Tracks short-term trends and serves as a dynamic support/resistance level for bounce entries.
- **200 SMA**: Acts as a long-term support (for long entries) or resistance (for short entries).
- **Entry Logic**:
- **Long Entry**: Triggered when the price bounces off the 20 SMA in an uptrend (20 SMA sloping upward over the last 3 bars), with the low touching or slightly below the 20 SMA and the close above it. The price must also be above the 200 SMA for confirmation.
- **Short Entry**: Triggered when the price rebounds off the 20 SMA in a downtrend (20 SMA sloping downward), with the high touching or slightly above the 20 SMA and the close below it. The price must be below the 200 SMA.
- **Exit Logic**:
- Default settings include a 2% take profit (TP) and 1% stop loss (SL) for both long and short positions.
- A trailing stop with a 0.1% offset can be activated to lock in profits during strong trends.
- **Visuals and Alerts**: The strategy plots 20 SMA (blue) and 200 SMA (red) on the chart, with green triangles for long entries and red triangles for short entries. Alerts notify users of entry signals with price details.
- **Initial Settings**: Starts with $10,000 capital, using 10% of equity per trade.
#### **Proposed Optimizations**
To address the observed 2% profitability (improved to 112% with trailing stop) and align with your feedback (e.g., 1H outperforming 4H, tolerance at 0.1% working well), the following enhancements have been integrated into the strategy:
1. **Flexible Take Profit and Trailing Stop**:
- Added a `useTakeProfit` boolean (default true) to toggle TP. If set to false, only the trailing stop (0.1% offset) is used, allowing unlimited profit capture in strong trends. This addresses your request to disable TP, potentially boosting profitability in bull/bear runs while increasing drawdown risk.
- **Recommendation**: Test with TP off on 1H for XRPUSD to confirm 112% holds; adjust offset to 0.2% if drawdown exceeds 20%.
2. **Dynamic Stop Loss with ATR**:
- Replaced fixed 1% SL with a dynamic SL based on ATR(14) * 1.5, calculated as `close * (1 - (ATR * multiplier / close))` for long and the inverse for short. Inputs `atrLength` (14) and `atrMultiplier` (1.5) are adjustable.
- **Benefit**: Adapts to market volatility, reducing premature exits in choppy conditions. Test with multiplier 1-2 to balance risk/reward.
- **Note**: A `useAtrStop` toggle (default true) allows reverting to fixed SL if needed.
3. **Tolerance for Pullback Adjustment**:
- Set to 0.1% (your successful tweak), allowing precise bounce detection. The strategy checks if the low is within ±0.1% of 20 SMA, with the close crossing above for long or below for short.
- **Optimization**: If trades are too few, increase to 0.3-0.5% to capture more opportunities, as seen in your original script’s 0.5% tolerance.
4. **RSI Filter**:
- Integrated RSI(14) with configurable `rsiOverbought` (default 70) and `rsiOversold` (default 30). Long entries require RSI > oversoldLevel, and short entries require RSI < overboughtLevel.
- **Benefit**: Filters out overbought/oversold conditions, improving signal quality. Test with neutral levels (50) for broader entries, potentially adding 10-20% to profitability.
5. **Market Sideways Filter**:
- Added a `sma20_flat` condition, checking if the 20 SMA variation over the last 5 bars (`flatCheckBars`) is below a `flatTolerance` (0.001). If true, entries are blocked.
- **Benefit**: Reduces false signals in range-bound markets, lowering drawdown. Adjust `flatCheckBars` to 3-7 based on volatility.
6. **Time/Day Filter**:
- Restricts trading to active hours (default 8:00-20:00 UTC, adjustable with `startHour` and `endHour`) and excludes weekends (Saturday/Sunday).
- **Benefit**: Focuses on high-volume periods in crypto, improving winning rate. Adjust hours to 9:00-17:00 UTC if testing on BTCUSD/ETHUSD.
7. **Volume Filter**:
- Retained from your script, with `minVolume` (default 0, disabled) to filter low-liquidity trades.
- **Optimization**: Set to a symbol-specific minimum (e.g., 10,000 for XRPUSD) to avoid slippage.
#### **Implementation Details**
- The strategy uses `strategy.entry` and `strategy.exit` with conditional logic for TP, SL, and trailing stops. Visuals (triangles) and alerts remain for manual oversight.
- Inputs are fully customizable, allowing backtesting to fine-tune parameters.
#### **Testing Recommendations**
- **Timeframe**: Stick to 1H for XRPUSD, as 4H underperformed. Test 2H or Daily on BTCUSD/ETHUSD for stability.
- **Symbols**: Beyond XRPUSD, try BTCUSD (stable) or ETHUSD (volatile but liquid) to diversify gains.
- **Backtesting**: Run on the last 2 years (Oct 2023-Oct 2025), with 70% for optimization and 30% for out-of-sample testing. Include 0.1% commissions and 0.05% slippage.
- **Metrics to Watch**: Aim for profit >6%, drawdown <30%, and winning rate >50%. If 112% persists, validate with live demo trading.
#### **Next Steps**
This optimized strategy balances your successful tweaks (0.1% tolerance, trailing stop) with robust filters (RSI, sideways, time). Test on TradingView, adjust inputs based on results, and report back with drawdown or trade count for further tuning!
Session Lines Clean (Asia/London/NY)Session Lines Clean (Asia/London/NY) — v6” automatically plots the high and low levels of the Asia and London forex sessions, and marks the opening times of Asia, London, and New York sessions with vertical dashed lines. The indicator helps traders quickly identify key session ranges, potential liquidity areas, and time-based structure levels. Optional labels and visibility toggles make it easy to customize the display without cluttering the chart.
TriAnchor Elastic Reversion US Market SPY and QQQ adaptedSummary in one paragraph
Mean-reversion strategy for liquid ETFs, index futures, large-cap equities, and major crypto on intraday to daily timeframes. It waits for three anchored VWAP stretches to become statistically extreme, aligns with bar-shape and breadth, and fades the move. Originality comes from fusing daily, weekly, and monthly AVWAP distances into a single ATR-normalized energy percentile, then gating with a robust Z-score and a session-safe gap filter.
Scope and intent
• Markets: SPY QQQ IWM NDX large caps liquid futures liquid crypto
• Timeframes: 5 min to 1 day
• Default demo: SPY on 60 min
• Purpose: fade stretched moves only when multi-anchor context and breadth agree
• Limits: strategy uses standard candles for signals and orders only
Originality and usefulness
• Unique fusion: tri-anchor AVWAP energy percentile plus robust Z of close plus shape-in-range gate plus breadth Z of SPY QQQ IWM
• Failure mode addressed: chasing extended moves and fading during index-wide thrusts
• Testability: each component is an input and visible in orders list via L and S tags
• Portable yardstick: distances are ATR-normalized so thresholds transfer across symbols
• Open source: method and implementation are disclosed for community review
Method overview in plain language
Base measures
• Range basis: ATR(length = atr_len) as the normalization unit
• Return basis: not used directly; we use rank statistics for stability
Components
• Tri-Anchor Energy: squared distances of price from daily, weekly, monthly AVWAPs, each divided by ATR, then summed and ranked to a percentile over base_len
• Robust Z of Close: median and MAD based Z to avoid outliers
• Shape Gate: position of close inside bar range to require capitulation for longs and exhaustion for shorts
• Breadth Gate: average robust Z of SPY QQQ IWM to avoid fading when the tape is one-sided
• Gap Shock: skip signals after large session gaps
Fusion rule
• All required gates must be true: Energy ≥ energy_trig_prc, |Robust Z| ≥ z_trig, Shape satisfied, Breadth confirmed, Gap filter clear
Signal rule
• Long: energy extreme, Z negative beyond threshold, close near bar low, breadth Z ≤ −breadth_z_ok
• Short: energy extreme, Z positive beyond threshold, close near bar high, breadth Z ≥ +breadth_z_ok
What you will see on the chart
• Standard strategy arrows for entries and exits
• Optional short-side brackets: ATR stop and ATR take profit if enabled
Inputs with guidance
Setup
• Base length: window for percentile ranks and medians. Typical 40 to 80. Longer smooths, shorter reacts.
• ATR length: normalization unit. Typical 10 to 20. Higher reduces noise.
• VWAP band stdev: volatility bands for anchors. Typical 2.0 to 4.0.
• Robust Z window: 40 to 100. Larger for stability.
• Robust Z entry magnitude: 1.2 to 2.2. Higher means stronger extremes only.
• Energy percentile trigger: 90 to 99.5. Higher limits signals to rare stretches.
• Bar close in range gate long: 0.05 to 0.25. Larger requires deeper capitulation for longs.
Regime and Breadth
• Use breadth gate: on when trading indices or broad ETFs.
• Breadth Z confirm magnitude: 0.8 to 1.8. Higher avoids fighting thrusts.
• Gap shock percent: 1.0 to 5.0. Larger allows more gaps to trade.
Risk — Short only
• Enable short SL TP: on to bracket shorts.
• Short ATR stop mult: 1.0 to 3.0.
• Short ATR take profit mult: 1.0 to 6.0.
Properties visible in this publication
• Initial capital: 25000USD
• Default order size: Percent of total equity 3%
• Pyramiding: 0
• Commission: 0.03 percent
• Slippage: 5 ticks
• Process orders on close: OFF
• Bar magnifier: OFF
• Recalculate after order is filled: OFF
• Calc on every tick: OFF
• request.security lookahead off where used
Realism and responsible publication
• No performance claims. Past results never guarantee future outcomes
• Fills and slippage vary by venue
• Shapes can move during bar formation and settle on close
• Standard candles only for strategies
Honest limitations and failure modes
• Economic releases or very thin liquidity can overwhelm mean-reversion logic
• Heavy gap regimes may require larger gap filter or TR-based tuning
• Very quiet regimes reduce signal contrast; extend windows or raise thresholds
Open source reuse and credits
• None
Strategy notice
Orders are simulated by TradingView on standard candles. request.security uses lookahead off where applicable. Non-standard charts are not supported for execution.
Entries and exits
• Entry logic: as in Signal rule above
• Exit logic: short side optional ATR stop and ATR take profit via brackets; long side closes on opposite setup
• Risk model: ATR-based brackets on shorts when enabled
• Tie handling: stop first when both could be touched inside one bar
Dataset and sample size
• Test across your visible history. For robust inference prefer 100 plus trades.
Aurum DCX AVE Gold and Silver StrategySummary in one paragraph
Aurum DCX AVE is a volatility break strategy for gold and silver on intraday and swing timeframes. It aligns a new Directional Convexity Index with an Adaptive Volatility Envelope and an optional USD/DXY bias so trades appear only when direction quality and expansion agree. It is original because it fuses three pieces rarely combined in one model for metals: a convexity aware trend strength score, a percentile based envelope that widens with regime heat, and an intermarket DXY filter.
Scope and intent
• Markets. Gold and silver futures or spot, other liquid commodities, major indices
• Timeframes. Five minutes to one day. Defaults to 30min for swing pace
• Default demo used in this publication. TVC:GOLD on 30m
• Purpose. Enter confirmed volatility breaks while muting chop using regime heat and USD bias
• Limits. This is a strategy. Orders are simulated on standard candles only
Originality and usefulness
• Unique fusion. DCX combines DI strength with path efficiency and curvature. AVE blends ATR with a high TR percentile and widens with DCX heat. DXY adds an intermarket bias
• Failure mode addressed. False starts inside compression and unconfirmed breakouts during USD swings
• Testability. Each component has a named input. Entry names L and S are visible in the list of trades
• Portable yardstick. Weekly ATR for stops and R multiples for targets
• Open source. Method and implementation are disclosed for community review
Method overview in plain language
You score direction quality with DCX, size an adaptive envelope with a blend of ATR and a high TR percentile, and only allow breaks that clear the band while DCX is above a heat threshold in the same direction. An optional DXY filter favors long when USD weakens and short when USD strengthens. Orders are bracketed with a Weekly ATR stop and an R multiple target, with optional trailing to the envelope.
Base measures
• Range basis. True Range and ATR over user windows. A high TR percentile captures expansion tails used by AVE
• Return basis. Not required
Components
• Directional Convexity Index DCX. Measures directional strength with DX, multiplies by path efficiency, blends a curvature term from acceleration, scales to 0 to 100, and uses a rise window
• Adaptive Volatility Envelope AVE. Midline ALMA or HMA or EMA plus bands sized by a blend of ATR and a high TR percentile. The blend weight follows volatility of volatility. Band width widens with DCX heat
• DXY Bias optional. Daily EMA trend of DXY. Long bias when USD weakens. Short bias when USD strengthens
• Risk block. Initial stop equals Weekly ATR times a multiplier. Target equals an R multiple of the initial risk. Optional trailing to AVE band
Fusion rule
• All gates must pass. DCX above threshold and rising. Directional lead agrees. Price breaks the AVE band in the same direction. DXY bias agrees when enabled
Signal rule
• Long. Close above AVE upper and DCX above threshold and DCX rising and plus DI leads and DXY bias is bearish
• Short. Close below AVE lower and DCX above threshold and DCX falling and minus DI leads and DXY bias is bullish
• Exit and flip. Bracket exit at stop or target. Optional trailing to AVE band
Inputs with guidance
Setup
• Symbol. Default TVC:GOLD (Correlation Asset for internal logic)
• Signal timeframe. Blank follows the chart
• Confirm timeframe. Default 1 day used by the bias block
Directional Convexity Index
• DCX window. Typical 10 to 21. Higher filters more. Lower reacts earlier
• DCX rise bars. Typical 3 to 6. Higher demands continuation
• DCX entry threshold. Typical 15 to 35. Higher avoids soft moves
• Efficiency floor. Typical 0.02 to 0.06. Stability in quiet tape
• Convexity weight 0..1. Typical 0.25 to 0.50. Higher gives curvature more influence
Adaptive Volatility Envelope
• AVE window. Typical 24 to 48. Higher smooths more
• Midline type. ALMA or HMA or EMA per preference
• TR percentile 0..100. Typical 75 to 90. Higher favors only strong expansions
• Vol of vol reference. Typical 0.05 to 0.30. Controls how much the percentile term weighs against ATR
• Base envelope mult. Typical 1.4 to 2.2. Width of bands
• Regime adapt 0..1. Typical 0.6 to 0.95. How much DCX heat widens or narrows the bands
Intermarket Bias
• Use DXY bias. Default ON
• DXY timeframe. Default 1 day
• DXY trend window. Typical 10 to 50
Risk
• Risk percent per trade. Reporting field. Keep live risk near one to two percent
• Weekly ATR. Default 14. Basis for stops
• Stop ATR weekly mult. Typical 1.5 to 3.0
• Take profit R multiple. Typical 1.5 to 3.0
• Trail with AVE band. Optional. OFF by default
Properties visible in this publication
• Initial capital. 20000
• Base currency. USD
• request.security lookahead off everywhere
• Commission. 0.03 percent
• Slippage. 5 ticks
• Default order size method percent of equity with value 3% of the total capital available
• Pyramiding 0
• Process orders on close ON
• Bar magnifier ON
• Recalculate after order is filled OFF
• Calc on every tick OFF
Realism and responsible publication
• No performance claims. Past results never guarantee future outcomes
• Shapes can move while a bar forms and settle on close
• Strategies use standard candles for signals and orders only
Honest limitations and failure modes
• Economic releases and thin liquidity can break assumptions behind the expansion logic
• Gap heavy symbols may prefer a longer ATR window
• Very quiet regimes can reduce signal contrast. Consider higher DCX thresholds or wider bands
• Session time follows the exchange of the chart and can change symbol to symbol
• Symbol sensitivity is expected. Use the gates and length inputs to find stable settings
Open source reuse and credits
• None
Mode
Public open source. Source is visible and free to reuse within TradingView House Rules
Legal
Education and research only. Not investment advice. You are responsible for your decisions. Test on historical data and in simulation before any live use. Use realistic costs.
FluxGate Daily Swing StrategySummary in one paragraph
FluxGate treats long and short as different ecosystems. It runs two independent engines so the long side can be bold when the tape rewards upside persistence while the short side can stay selective when downside is messy. The core reads three directional drivers from price geometry then removes overlap before gating with clean path checks. The complementary risk module anchors stop distance to a higher timeframe ATR so a unit means the same thing on SPY and BTC. It can add take profit breakeven and an ATR trail that only activates after the trade earns it. If a stop is hit the strategy can re enter in the same direction on the next bar with a daily retry cap that you control. Add it to a clean chart. Use defaults to see the intended behavior. For conservative workflows evaluate on bar close.
Scope and intent
• Markets. Large cap equities and liquid ETFs major FX pairs US index futures and liquid crypto pairs
• Timeframes. From one minute to daily
• Default demo in this publication. SPY on one day timeframe
• Purpose. Reduce false starts without missing sustained trends by fusing independent drivers and suppressing activity when the path is noisy
• Limits. This is a strategy. Orders are simulated on standard candles. Non standard chart types are not supported for execution
Originality and usefulness
• Unique fusion. FluxGate extracts three drivers that look at price from different angles. Direction measures slope of a smoothed guide and scales by realized volatility so a point of slope does not mean a different thing on different symbols. Persistence looks at short sign agreement to reward series of closes that keep direction. Curvature measures the second difference of a local fit to wake up during convex pushes. These three are then orthonormalized so a strong reading in one does not double count through another.
• Gates that matter. Efficiency ratio prefers direct paths over treadmills. Entropy turns up versus down frequency into an information read. Light fractal cohesion punishes wrinkly paths. Together they slow the system in chop and allow it to open up when the path is clean.
• Separate long and short engines. Threshold tilts adapt to the skew of score excursions. That lets long engage earlier when upside distribution supports it and keeps short cautious where downside surprise and venue frictions are common.
• Practical risk behavior. Stops are ATR anchored on a higher timeframe so the unit is portable. Take profit is expressed in R so two R means the same concept across symbols. Breakeven and trailing only activate after a chosen R so early noise does not squeeze a good entry. Re entry after stop lets the system try again without you babysitting the chart.
• Testability. Every major window and the aggression controls live in Inputs. There is no hidden magic number.
Method overview in plain language
Base measures
• Return basis. Natural log of close over prior close for stability and easy aggregation through time. Realized volatility is the standard deviation of returns over a moving window.
• Range basis for risk. ATR computed on a higher timeframe anchor such as day week or month. That anchor is steady across venues and avoids chasing chart specific quirks.
Components
• Directional intensity. Use an EMA of typical price as a guide. Take the day to day slope as raw direction. Divide by realized volatility to get a unit free measure. Soft clip to keep outliers from dominating.
• Persistence. Encode whether each bar closed up or down. Measure short sign agreement so a string of higher closes scores better than a jittery sequence. This favors push continuity without guessing tops or bottoms.
• Curvature. Fit a short linear regression and compute the second difference of the fitted series. Strong curvature flags acceleration that slope alone may miss.
• Efficiency gate. Compare net move to path length over a gate window. Values near one indicate direct paths. Values near zero indicate treadmill behavior.
• Entropy gate. Convert up versus down frequency into a probability of direction. High entropy means coin toss. The gate narrows there.
• Fractal cohesion. A light read of path wrinkliness relative to span. Lower cohesion reduces the urge to act.
• Phase assist. Map price inside a recent channel to a small signed bias that grows with confidence. This helps entries lean toward the right half of the channel without becoming a breakout rule.
• Shock control. Compare short volatility to long volatility. When short term volatility spikes the shock gate temporarily damps activity so the system waits for pressure to normalize.
Fusion rule
• Normalize the three drivers after removing overlap
• Blend with weights that adapt to your aggression input
• Multiply by the gates to respect path quality
• Smooth just enough to avoid jitter while keeping timing responsive
• Compute an adaptive mean and deviation of the score and set separate long and short thresholds with a small tilt informed by skew sign
• The result is one long score and one short score that can cross their thresholds at different times for the same tape which is a feature not a bug
Signal rule
• A long suggestion appears when the long score crosses above its long threshold while all gates are active
• A short suggestion appears when the short score crosses below its short threshold while all gates are active
• If any required gate is missing the state is wait
• When a position is open the status is in long or in short until the complementary risk engine exits or your entry mode closes and flips
Inputs with guidance
Setup Long
• Base length Long. Master window for the long engine. Typical range twenty four to eighty. Raising it improves selectivity and reduces trade count. Lowering it reacts faster but can increase noise
• Aggression Long. Zero to one. Higher values make thresholds more permissive and shorten smoothing
Setup Short
• Base length Short. Master window for the short engine. Typical range twenty eight to ninety six
• Aggression Short. Zero to one. Lower values keep shorts conservative which is often useful on upward drifting symbols
Entries and UI
• Entry mode. Both or Long only or Short only
Complementary risk engine
• Enable risk engine. Turns on bracket exits while keeping your signal logic untouched
• ATR anchor timeframe. Day Week or Month. This sets the structural unit of stop distance
• ATR length. Default fourteen
• Stop multiple. Default one point five times the anchor ATR
• Use take profit. On by default
• Take profit in R. Default two R
• Breakeven trigger in R. Default one R
Usage recipes
Intraday trend focus
• Entry mode Both
• ATR anchor Week
• Aggression Long zero point five Aggression Short zero point three
• Stop multiple one point five Take profit two R
• Expect fewer trades that stick to directional pushes and skip treadmill noise
Intraday mean reversion focus
• Session windows optional if you add them in your copy
• ATR anchor Day
• Lower aggression both sides
• Breakeven later and trailing later so the first bounce has room
• This favors fade entries that still convert into trends when the path stays clean
Swing continuation
• Signal timeframe four hours or one day
• Confirm timeframe one day if you choose to include bias
• ATR anchor Week or Month
• Larger base windows and a steady two R target
• This accepts fewer entries and aims for larger holds
Properties visible in this publication
• Initial capital 25.000
• Base currency USD
• Default order size percent of equity value three - 3% of the total capital
• Pyramiding zero
• Commission zero point zero three percent - 0.03% of total capital
• Slippage five ticks
• Process orders on close off
• Recalculate after order is filled off
• Calc on every tick off
• Bar magnifier off
• Any request security calls use lookahead off everywhere
Realism and responsible publication
• No performance promises. Past results never guarantee future outcomes
• Fills and slippage vary by venue and feed
• Strategies run on standard candles only
• Shapes can update while a bar is forming and settle on close
• Keep risk per trade sensible. Around one percent is typical for study. Above five to ten percent is rarely sustainable
Honest limitations and failure modes
• Sudden news and thin liquidity can break assumptions behind entropy and cohesion reads
• Gap heavy symbols often behave better with a True Range basis for risk than a simple range
• Very quiet regimes can reduce score contrast. Consider longer windows or higher thresholds when markets sleep
• Session windows follow the exchange time of the chart if you add them
• If stop and target can both be inside a single bar this strategy prefers stop first to keep accounting conservative
Open source reuse and credits
• No reused open source beyond public domain building blocks such as ATR EMA and linear regression concepts
Legal
Education and research only. Not investment advice. You are responsible for your decisions. Test on history and in simulation with realistic costs
Levels[cz]Description
Levels is a proportional price grid indicator that draws adaptive horizontal levels based on higher timeframe (HTF) closes.
Instead of relying on swing highs/lows or pivots, it builds structured support and resistance zones using fixed percentage increments from a Daily, Weekly, or Monthly reference close.
This creates a consistent geometric framework that helps traders visualize price zones where reactions or consolidations often occur.
How It Works
The script retrieves the last HTF close (Daily/Weekly/Monthly).
It then calculates percentage-based increments (e.g., 0.5%, 1%, 2%, 4%) above and below that reference.
Each percentage forms a distinct “level group,” creating layered grids of potential reaction zones.
Levels are automatically filtered to avoid overlap between different groups, keeping the chart clean.
Visibility is dynamically controlled by timeframe:
Level 1 → up to 15m
Level 2 → up to 1h
Level 3 → up to 4h
Level 4 → up to 1D
This ensures the right amount of structural detail at every zoom level.
How to Use
Identify confluence zones where multiple levels cluster — often areas of strong liquidity or reversals.
Use the grid as a support/resistance map for entries, targets, and stop placement.
Combine with trend or momentum indicators to validate reactions at key price bands.
Adjust the percentage increments and reference timeframe to match the volatility of your instrument (e.g., smaller steps for crypto, larger for indices).
Concept
The indicator is based on the idea that markets move in proportional price steps, not random fluctuations.
By anchoring levels to a higher-timeframe close and expanding outward geometrically, Levels highlights recurring equilibrium and expansion zones — areas where traders can anticipate probable turning points or consolidations.
Features
4 customizable percentage-based level sets
Dynamic visibility by timeframe
Non-overlapping level hierarchy
Lightweight on performance
Fully customizable colors, styles, and widths
Moon_TimeBreaks_Indicator🌙 Moon + Timeframe Breaks (Daily, Weekly, Monthly, Quarterly, Yearly)
A unique indicator that combines lunar cycles with major time-based breaks to reveal potential rhythm and cycle shifts in price behavior.
🔹 Features
Displays New Moon and Full Moon phases directly on the chart.
Highlights background color during lunar events.
Draws dynamic timeframe separators for Day, Week, Month, Quarter, and Year.
Helps identify cyclical turning points and time-based reactions in markets.
🔹 Customization
Toggle moon phases, background, or time breaks individually.
Adjust colors for each period (daily, weekly, etc.).
Works on all instruments and timeframes.
🔹 Use Case
Perfect for traders interested in time-price harmony, cyclical analysis, or astro-based market timing.
It pairs well with structure or liquidity tools to enhance timing accuracy.
HTF Candles with PVSRA Volume Coloring (PCS Series)This indicator displays higher timeframe (HTF) candles using a PVSRA-inspired color model that blends price and volume strength, allowing traders to visualize higher-timeframe activity directly on lower-timeframe charts without switching screens.
OVERVIEW
This script visualizes higher-timeframe (HTF) candles directly on lower-timeframe charts using a custom PVSRA (Price, Volume & Support/Resistance Analysis) color model.
Unlike standard HTF indicators, it aggregates real-time OHLC and volume data bar-by-bar and dynamically draws synthetic HTF candles that update as the higher-timeframe bar evolves.
This allows traders to interpret momentum, trend continuation, and volume pressure from broader market structures without switching charts.
INTEGRATION LOGIC
This script merges higher-timeframe candle projection with PVSRA volume analysis to provide a single, multi-timeframe momentum view.
The HTF structure reveals directional context, while PVSRA coloring exposes the underlying strength of buying and selling pressure.
By combining both, traders can see when a higher-timeframe candle is building with strong or weak volume, enabling more informed intraday decisions than either tool could offer alone.
HOW IT WORKS
Aggregates price data : Groups lower-timeframe bars to calculate higher-timeframe Open, High, Low, Close, and total Volume.
Applies PVSRA logic : Compares each HTF candle’s volume to the average of the last 10 bars:
• >200% of average = strong activity
• >150% of average = moderate activity
• ≤150% = normal activity
Assigns colors :
• Green/Blue = bullish high-volume
• Red/Fuchsia = bearish high-volume
• White/Gray = neutral or low-volume moves
Draws dynamic outlines : Outlines update live while the current HTF candle is forming.
Supports symbol override : Calculations can use another instrument for correlation analysis.
This multi-timeframe aggregation avoids repainting issues in request.security() and ensures accurate real-time HTF representation.
FEATURES
Dual HTF Display : Visualize two higher timeframes simultaneously (e.g., 4H and 1D).
Dynamic PVSRA Coloring : Volume-weighted candle colors reveal bullish or bearish dominance.
Customizable Layout : Adjust candle width, spacing, offset, and color schemes.
Candle Outlines : Highlight the forming HTF candle to monitor developing structure.
Symbol Override : Display HTF candles from another instrument for cross-analysis.
SETTINGS
HTF 1 & HTF 2 : enable/disable, set timeframes, choose label colors, show/hide outlines.
Number of Candles : choose how many HTF candles to plot (1–10).
Offset Position : distance to the right of the current price where HTF candles begin.
Spacing & Width : adjust separation and scaling of candle groups.
Show Wicks/Borders : toggle wick and border visibility.
PVSRA Colors : enable or disable volume-based coloring.
Symbol Override : use a secondary ticker for HTF data if desired.
USAGE TIPS
Set the indicator’s visual order to “Bring to front.”
Always choose HTFs higher than your active chart timeframe.
Use PVSRA colors to identify strong momentum and potential reversals.
Adjust candle spacing and width for your chart layout.
Outlines are not shown on chart timeframes below 5 minutes.
TRADING STRATEGY
Strategy Overview : Combine HTF structure and PVSRA volume signals to
• Identify zones of high institutional activity and potential reversals.
• Wait for confirmation through consolidation or a pullback to key levels.
• Trade in alignment with dominant higher-timeframe structure rather than chasing volatility.
Setup :
• Chart timeframe: lower (5m, 15m, 1H)
• HTF 1: 4H or 1D
• HTF 2: 1D or 1W
• PVSRA Colors: enabled
• Outlines: enabled
Entry Concept :
High-volume candles (green or red) often indicate market-maker activity , such zones often reflect liquidity absorption by larger players and are not necessarily ideal entry points.
Wait for the next consolidation or pullback toward a support or resistance level before acting.
Bullish scenario :
• After a high-volume or rejection candle near a low, price consolidates and forms a higher low.
• Enter long only when structure confirms strength above support.
Bearish scenario :
• After a high-volume or rejection candle near a top, price consolidates and forms a lower high.
• Enter short once resistance holds and momentum weakens.
Exit Guidelines :
• Exit when next HTF candle shifts in color or momentum fades.
• Exit if price structure breaks opposite to your trade direction.
• Always use stop-loss and take-profit levels.
Additional Tips :
• Never enter directly on strong green/red high-volume candles, these are usually areas of institutional absorption.
• Wait for market structure confirmation and volume normalization.
• Combine with RSI, moving averages, or support/resistance for timing.
• Avoid trading when HTF candles are mixed or low-volume (unclear bias).
• Outlines hidden below 5m charts.
Risk Management :
• Use stop-loss and take-profit on all positions.
• Limit risk to 1–2% per trade.
• Adjust position size for volatility.
FINAL NOTES
This script helps traders synchronize lower-timeframe execution with higher-timeframe momentum and volume dynamics.
Test it on demo before live use, and adjust settings to fit your trading style.
DISCLAIMER
This script is for educational purposes only and does not constitute financial advice.
SUPPORT & UPDATES
Future improvements may include alert conditions and additional visualization modes. Feedback is welcome in the comments section.
CREDITS & LICENSE
Created by @seoco — open source for community learning.
Licensed under Mozilla Public License 2.0 .
Fair Value Lead-Lag Model [BackQuant]Fair Value Lead-Lag Model
A cross-asset model that estimates where price "should" be relative to a chosen reference series, then tracks the deviation as a normalized oscillator. It helps you answer two questions: 1) is the asset rich or cheap vs its driver, and 2) is the driver leading or lagging price over the next N bars.
Concept in one paragraph
Many assets co-move with a macro or sector driver. Think BTC vs DXY, gold vs real yields, a stock vs its sector ETF. This tool builds a rolling fair value of the charted asset from a reference series and shows how far price is above or below that fair value in standard deviation units. You can shift the reference forward or backward to test who leads whom, then use the deviation and its bands to structure mean-reversion or trend-following ideas.
What the model does
Reference mapping : Pulls a reference symbol at a chosen timeframe, with an optional lead or lag in bars to test causality.
Fair value engine : Converts the reference into a synthetic fair value of the chart using one of four methods:
Ratio : price/ref with a rolling average ratio. Good when the relationship is proportional.
Spread : price minus ref with a rolling average spread. Good when the relationship is additive.
Z-Score : normalizes both series, aligns on standardized units, then re-projects to price space. Good when scale drifts.
Beta-Adjusted : rolling regression style. Uses covariance and variance to compute beta, then builds a fair value = mean(price) + beta * (ref − mean(ref)).
Deviation and bands : Computes a z-scored deviation of price vs fair value and plots sigma bands (±1, ±2, ±3) around the fair value line on the chart.
Correlation context : Shows rolling correlation so you can judge if deviations are meaningful or just noise when co-movement is weak.
Visuals :
Fair value line on price chart with sigma envelopes.
Deviation as a column oscillator and optional line.
Threshold shading beyond user-set upper and lower levels.
Summary table with reference, deviation, status, correlation, and method.
Why this is useful
Mean reversion framework : When correlation is healthy and deviation stretches beyond your sigma threshold, probability favors reversion toward fair value. This is classic pairs logic adapted to a driver and a target.
Trend confirmation : If price rides the fair value line and deviation stays modest while correlation is positive, it supports trend persistence. Pullbacks to negative deviation in an uptrend can be buyable.
Lead-lag discovery : Shift the reference forward by +N bars. If correlation improves, the reference tends to lead. Shift backward for the reverse. Use the best setting for planning early entries or hedges.
Regime detection : Large persistent deviations with falling correlation hint at regime change. The relationship you relied on may be breaking down, so reduce confidence or switch methods.
How to use it step by step
Pick a sensible reference : Choose a macro, index, currency, or sector driver that logically explains the asset’s moves. Example: gold with DXY, a semiconductor stock with SOXX.
Test lead-lag : Nudge Lead/Lag Periods to small positive values like +1 to +5 to see if the reference leads. If correlation improves, keep that offset. If correlation worsens, try a small negative value or zero.
Select a method :
Start with Beta-Adjusted when the relationship is approximately linear with drift.
Use Ratio if the assets usually move in proportional terms.
Use Spread when they trade around a level difference.
Use Z-Score when scales wander or volatility regimes shift.
Tune windows :
Rolling Window controls how quickly fair value adapts. Shorter equals faster but noisier.
Normalization Period controls how deviations are standardized. Longer equals stabler sigma sizing.
Correlation Length controls how co-movement is measured. Keep it near the fair value window.
Trade the edges :
Mean reversion idea : Wait for deviation beyond your Upper or Lower Threshold with positive correlation. Fade back toward fair value. Exit at the fair value line or the next inner sigma band.
Trend idea : In an uptrend, buy pullbacks when deviation dips negative but correlation remains healthy. In a downtrend, sell bounces when deviation spikes positive.
Read the table : Deviation shows how many sigmas you are from fair value. Status tells you overvalued or undervalued. Correlation color hints confidence. Method tells you the projection style used.
Reading the display
Fair value line on price chart: the model’s estimate of where price should trade given the reference, updated each bar.
Sigma bands around fair value: a quick sense of residual volatility. Reversions often target inner bands first.
Deviation oscillator : above zero means rich vs fair value, below zero means cheap. Color bins intensify with distance.
Correlation line (optional): scale is folded to match thresholds. Higher values increase trust in deviations.
Parameter tips
Start with Rolling Window 20 to 30, Normalization Period 100, Correlation Length 50.
Upper and Lower Threshold at ±2.0 are classic. Tighten to ±1.5 for more signals or widen to ±2.5 to focus on outliers.
When correlation drifts below about 0.3, treat deviations with caution. Consider switching method or reference.
If the fair value line whipsaws, increase Rolling Window or move to Beta-Adjusted which tends to be smoother.
Playbook examples
Pairs-style reversion : Asset is +2.3 sigma rich vs reference, correlation 0.65, trend flat. Short the deviation back toward fair value. Cover near the fair value line or +1 sigma.
Pro-trend pullback : Uptrend with correlation 0.7. Deviation dips to −1.2 sigma while price sits near the −1 sigma band. Buy the dip, target the fair value line, trail if the line is rising.
Lead-lag timing : Reference leads by +3 bars with improved correlation. Use reference swings as early cues to anticipate deviation turns on the target.
Caveats
The model assumes a stable relationship over the chosen windows. Structural breaks, policy shocks, and index rebalances can invalidate recent history.
Correlation is descriptive, not causal. A strong correlation does not guarantee future convergence.
Do not force trades when the reference has low liquidity or mismatched hours. Use a reference timeframe that captures real overlap.
Bottom line
This tool turns a loose cross-asset intuition into a quantified, visual fair value map. It gives you a consistent way to find rich or cheap conditions, time mean-reversion toward a statistically grounded target, and confirm or fade trends when the driver agrees.
NY 4H Wyckoff State Machine [CHE] NY 4H Wyckoff State Machine — Full (Re-Entry, Breakout, Wick, Re-Accum/Distrib, Dynamic Table) — One-Candle Wyckoff Re-Entry (OCWR)
Summary
OCWR operationalizes a one-candle session workflow: mark the first four-hour New York candle, fix its high and low as the session range when the window closes, and drive entries through a Wyckoff-style state machine on intraday bars. The script adds an ATR-scaled buffer around the range and requires multi-bar acceptance before treating breaks or re-entries as valid. Optional wick-cluster evidence, a proximity retest, and simple volume or RSI gates increase selectivity. Background tints expose regimes, shapes mark events, a dynamic table explains the current state, and hidden plots supply alert payloads. The design reduces random flips and makes state transitions auditable without higher-timeframe calls.
Origin and name
Method name: One-Candle Wyckoff Re-Entry (OCWR)
Transcript origin: The source idea is a “stupid simple one-candle scalping” routine: mark the first New York four-hour candle (commonly between one and five in the morning New York time), drop to five minutes, observe accumulation inside, wait for a manipulation move outside, then trade the re-entry back inside. Stops go beyond the excursion extreme; targets are either a fixed reward multiple or the opposite side of the range. Preference is given to several manipulation candles. This indicator codifies that workflow with explicit states, acceptance counters, buffers, and optional quality filters. Any external performance claims are not part of the code.
Motivation: Why this design?
Session levels are widely respected, yet single-bar breaches around them are noisy. OCWR separates range discovery from trade logic. It locks the range at the end of the window, applies an ATR-scaled buffer to ignore marginal oversteps, and requires acceptance over several bars for breaks and re-entries. Wick evidence and optional retest proximity help confirm that an excursion likely cleared liquidity rather than launched a trend. This yields cleaner transitions from test to commitment.
What’s different vs. standard approaches?
Baseline: Static session lines or one-shot Wyckoff tags without process control.
Architecture: Dual long and short state machines; ATR-buffered edges; multi-bar acceptance for breaks and re-entries; optional wick dominance and cluster checks; optional retest tolerance; direct and opposite breakout paths; cooldown after fires; distribution timeout; dynamic table with highlighted row.
Practical effect: Fewer single-bar head-fakes, clearer hand-offs, and on-chart explanations of the machine’s view.
Wyckoff structure by example — OCWR on five minutes
One-candle setup:
On the four-hour chart, mark the first New York candle’s high and low, then switch to five minutes. Solid lines show the fixed range; dashed lines show ATR-buffered edges.
Long path (verbal mapping):
Phase A, Stopping Action: Price stabilizes inside the range.
Phase B, Consolidation: Sustained balance while the window is closed and after the range is fixed.
Phase C, Test (Spring): Excursion below the buffered low with preference for several outside bars and dominant lower wicks, then a return inside.
Re-entry acceptance: A required run of inside bars validates the test.
Phase D, Breakout to Markup: Long signal fires; stop beyond the excursion extreme; objective is the opposite range or a fixed reward multiple.
Phase E, Trend (Markup) and Re-Accumulation: Advance continues until target, stop, confirmation back against the box, or timeout. A pause inside trend may register as re-accumulation.
Short path mirrors the above: A UTAD-style move forms above the buffered high, then re-entry leads to Markdown and possible re-distribution.
Variant map (verbal):
Accumulation after a downtrend: with Spring and Test, or without Spring; both proceed to Markup and may pause in Re-Accumulation.
Distribution after an uptrend: with UTAD and Test, or without UTAD; both proceed to Markdown and may pause in Re-Distribution.
Note: Phases A through E occur within each variant and are not separate variants.
How it works (technical)
Session window: A configurable four-hour New York window records its high and low. At window end, the bounds are fixed for the session.
ATR buffer: A margin above and below the fixed range discourages triggers from tiny oversteps.
Inside and outside: Users choose close-based or wick-based detection. Overshoot requirements are expressed verbally as a fraction of the range with an optional absolute minimum.
Manipulation tracking: The machine counts bars spent outside and records the side extreme.
Re-entry acceptance: After a return inside, a specified number of inside bars must print before acceptance.
Direct and opposite breakouts: Direct breakouts from accumulation and opposite breakouts after manipulation are supported, subject to acceptance and optional filters.
Targets and exits: Choose the opposite boundary or a fixed reward multiple. Distribution ends on target, stop, confirmation back against the range, or timeout.
Context filters (optional): Volume above a scaled SMA, RSI thresholds, and a trend SMA for simple regime context.
Diagnostics: Background tints for regimes; arrows for re-entries; triangles for breakouts; table with row highlights; hidden plots for alert values.
Central table (Wyckoff console)
The table sits top-right and explains the machine’s stance. Columns: Structure label, plain-English description, active state pair for long and short, and human phase tags. Rows: Start and range building; accumulation branch with Spring and Test as well as direct breakout; Markup and re-accumulation; distribution branch with UTAD and Test as well as direct short breakout; Markdown and re-distribution. Only the active state cell is rewritten each last bar, for example “L_ACCUM slash S_ACCUM”. Row highlighting is context-aware: accumulation, Spring or UTAD, breakout, Markup or Markdown, and re-accumulation or re-distribution checks can highlight independently so users see simultaneous conditions. The table is created once, updated only on the last bar for efficiency, and functions as a read-only console to audit why a signal fired and where the path currently sits.
Parameter Guide
Session window and time zone: First four hours of New York by default; time zone “America/New_York”.
ATR length and buffer factor: Control buffer size; larger reduces sensitivity, smaller reacts faster.
Minimum overshoot (fraction and absolute): Demand meaningful extension beyond the buffer.
Break mode: Close-based is stricter; wick-based is more reactive.
Acceptance counts: Separate counts for break, re-entry, and opposite breakout; higher values reduce noise.
Minimum bars outside: Ensures manipulation is not a single spike.
Wick detection and clusters (optional): Dominance thresholds and cluster size within a short window.
Retest required and tolerance (optional): Gate re-entry by proximity to the buffered edge.
Volume and RSI filters (optional): Simple gates on activity and momentum.
TP mode and reward multiple: Opposite range or fixed multiple.
Cooldown and distribution timeout: Rate-limit signals and prevent endless distribution.
Visualization toggles: Background phases, labels, table, and helper lines.
Reading & Interpretation
Solid lines are the fixed session bounds; dashed lines are buffers. Backgrounds tint accumulation, manipulation, and distribution. Arrows show accepted re-entries; triangles show direct or opposite breakouts. Labels can summarize entry, stop, target, and risk. The table highlights the active row and the current state pair.
Practical Workflows & Combinations
OCWR baseline: Each morning, mark the New York four-hour candle, move to five minutes, prefer multi-bar manipulation outside, then wait for a qualified re-entry inside. Stop beyond the excursion extreme. Target the opposite range for conservative management or a fixed multiple for uniform sizing.
Trend following: Favor direct breakouts with trend alignment and no contradictory wick evidence.
Quality control: When noise rises, increase acceptance, raise the buffer factor, enable retest, and require wick clusters.
Discretionary confluences: Fair-value gaps and trend lines can be added by the user; they are not computed by this script.
Behavior, Constraints & Performance
Closed-bar confirmation is recommended when you require finality; live-bar conditions can change until close. The script does not call higher-timeframe data. It uses arrays, lines, labels, boxes, and a table; maximum bars back is five thousand; table updates are last-bar only. Known limits include compressed buffers in quiet sessions, unreliable wick evidence in thin markets, and session misalignment if the platform time zone is not New York.
Sensible Defaults & Quick Tuning
Start with ATR length fourteen, buffer factor near zero point fifteen, overshoot fraction near zero point ten, acceptance counts of two, minimum outside duration three, retest required on.
Too many flips: increase acceptance, raise buffer, enable retest, and tighten wick thresholds.
Too slow: reduce acceptance, lower buffer, switch to wick-based breaks, disable retest.
Noisy wicks: increase minimum wick ratio and cluster size, or disable wick detection.
What this indicator is—and isn’t
A session-anchored visualization and signal layer that formalizes a Wyckoff-style re-entry and breakout workflow derived from a single four-hour New York candle. It is not predictive and not a complete trading system. Use with structure analysis, risk controls, and position management.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino
Dollar Volume Ownership GaugePurpose:
DVOG tracks the real money moving through a ticker by converting share volume into dollar volume (price × volume). It helps identify when institutional-sized players enter, defend, or unload positions — information that plain volume bars often hide.
How it works:
Each bar represents 4-minute aggregated dollar volume.
Green bars = moderate sponsorship ($400 K–$1 M per 4 min).
Red bars = heavy sponsorship ($1 M+ per 4 min).
Black bars = normal retail flow (under $400 K).
Optional horizontal guides mark both thresholds for quick reference.
Alerts:
Green Bar Alert: fires every time a bar exceeds $400 K, signaling fresh institutional activity.
Cross Alerts: trigger once when dollar volume crosses the $400 K or $1 M levels, perfect for automation or notifications.
Why it’s useful:
DVOG visually confirms when a breakout, knife-and-reclaim, or coil is being driven by real capital rather than low-liquidity noise.
It turns abstract volume into a direct measure of who’s actually in control.
Recommended use:
Run it in a separate pane below price. Combine with your normal structure analysis — higher lows, double bottoms, coils, etc. — and act only when structure and sponsorship line up.