Mac Sessions High And Low v.1This indicator is mainly for session highs and lows
Just a easy way to see if price sweeps a sessions high or low
Analisi fondamentale
Apebox COTversion 0.1, pine script 6
dependency: Tradingview cotlib/4
shows the Commitments of Traders (COT) **legacy** report data as published by the CFTC, in absolute value or as a percentage of the OI.
A simple tool, mostly untested.
📊 Multi-Timeframe High/Low Strategy Pro v40.0📊 Multi-Timeframe High/Low Strategy Pro v40.0 (Mustang Algo)
🎯 OVERVIEW
Advanced trading strategy that identifies and trades breakouts of key support and resistance levels across multiple timeframes. Features intelligent pyramiding, ATR-based risk management, and comprehensive backtesting capabilities. Now upgraded to Pine Script v6 for enhanced performance and compatibility.
✨ KEY FEATURES
📈 Multi-Timeframe Levels:
- Yesterday's High/Low
- Today's High/Low (intraday)
- Last Week's High/Low
- Last Month's High/Low
- Last Year's High/Low
🔥 Advanced Position Management:
- Pyramiding up to 100 simultaneous positions
- Configurable equity allocation per trade (0.1% - 100%)
- Daily trade limiter to control overtrading
- Smart position sizing with percentage-based allocation
🎯 Flexible Entry Signals:
- 10 Long entry options (breakouts above key levels)
- 10 Short entry options (breakdowns below key levels)
- Mix and match any combination of signals
- Real-time alerts for all level breaks
🛡️ Risk Management:
- ATR-based or Percentage-based Stop Loss
- ATR-based or Percentage-based Take Profit
- Time-based exits (exit after X bars)
- Precise price-based exits using limit/stop orders
- Entry price calculation for accurate TP/SL placement
📊 Visual Features:
- Clean, modern design with color-coded levels
- Customizable labels with emojis for easy identification
- ATR bands and histogram visualization
- Real-time position information panel
- Adjustable line lookback period (10-500 bars)
⚙️ HOW TO USE
1️⃣ Enable Strategy:
• Check "▶️ Enable Strategy" in Backtesting Settings
• Optionally set date range filter for testing specific periods
2️⃣ Select Entry Signals:
• Choose which level breaks trigger Long entries (⬆️)
• Choose which level breaks trigger Short entries (⬇️)
• Can combine multiple signals for complex strategies
3️⃣ Configure Exits:
• Enable Take Profit and/or Stop Loss
• Choose between Percentage or ATR-based calculations
• Set percentage values (e.g., 10% TP, 5% SL)
• Optionally enable time-based exit (bars)
4️⃣ Advanced Options:
• Enable Pyramiding for multiple concurrent positions
• Set max number of trades per day (1-1000)
• Adjust position sizing per trade (0.1-100%)
📋 CONFIGURATION PARAMETERS
Visual Settings:
- Toggle individual levels on/off
- Line lookback length (10-500 bars)
- Label size (large/normal/small/tiny)
- Label color customization
- Label positioning offset (0-50)
ATR Settings:
- ATR Period (default: 14, range: 1-200)
- ATR Multiplier (default: 2.0, range: 0.1-10.0)
- Optional ATR bands visualization
- Optional ATR histogram display
Entry Signals:
- 10 Long entry triggers (crossover signals)
- 10 Short entry triggers (crossunder signals)
- Individual activation for each signal
Exit Settings:
Take Profit:
- Enable/Disable TP
- Type: Percent (0.1-100%) or ATR (0.1-20x)
- Percent: 0.1% to 100% gain target
- ATR: 0.1 to 20 ATR multipliers
Stop Loss:
- Enable/Disable SL
- Type: Percent (0.1-100%) or ATR (0.1-20x)
- Percent: 0.1% to 100% loss limit
- ATR: 0.1 to 20 ATR multipliers
Time Exit:
- 0-1000 bars (0 = disabled)
Multi-Trade Settings:
- Enable/Disable Pyramiding
- Max concurrent trades (1-100)
- Equity % per trade (0.1-100%)
Daily Limit:
- Enable/Disable daily trade limit
- Max trades per day (1-1000)
Backtesting:
- Date range filtering
- From/To Year, Month, Day selection
🎨 VISUAL DESIGN
Modern, clean interface featuring:
- Color-coded levels with transparency:
- 📗📕 Yesterday (bright green/red)
- 🟢🔴 Today (cyan/magenta)
- 🔵🟠 Last Week (blue/orange)
- 🟣🔷 Last Month (purple/light blue)
- 🟤🟫 Last Year (brown)
- Different line styles per timeframe
- Compact emoji labels (Y-High, T-Low, W-High, M-Low, Yr-High)
- Dynamic info panel showing active settings
- Semi-transparent fills for ATR zones
⚡ PERFECT FOR
- Breakout trading strategies
- Multi-timeframe analysis
- Systematic algorithmic trading
- Range breakout systems
- Support/Resistance trading
- Scalping with pyramiding
- Day trading with level breaks
📊 BACKTESTING ENGINE
Comprehensive backtesting with:
- Date range filtering for precise periods
- Accurate entry/exit execution
- Multiple position management
- Detailed performance metrics
- Trade-by-trade analysis
- Pyramiding simulation
🔔 ALERTS AVAILABLE
Set custom alerts for:
- Any level breakout (10 different levels)
- Crossover and crossunder events
- All timeframe combinations
- Entry and exit signals
- Position management events
🆕 VERSION 40.0 UPDATES
- Upgraded to Pine Script v6
- Enhanced compatibility and performance
- Improved input system (input.bool, input.int, input.float)
- Updated security function (request.security)
- Fixed ta.barssince calculations
- Optimized strategy.close implementation
- Shorter title for TradingView compliance
⚠️ IMPORTANT TECHNICAL NOTES
- Uses precise limit/stop prices for TP/SL (not ticks)
- Entry price-based calculations (not current close)
- Pyramiding controlled via strategy declaration
- Daily trade counter resets at midnight
- ATR calculated on each bar for consistency
- Works best on intraday timeframes for daily levels
- Time-based exits use global scope calculations
💡 USAGE TIPS
- Start with single signal testing to understand behavior
- Use percentage-based exits for consistent risk/reward ratios
- Enable daily limit to prevent overtrading volatile days
- Combine ATR-based stops with percentage targets
- Test different level combinations for your specific asset
- Lower pyramiding percentage for safer multi-position trading
- Consider market volatility when setting ATR multipliers
📈 STRATEGY LOGIC EXPLANATION
The strategy identifies critical support/resistance levels from multiple timeframes (yesterday, today, week, month, year) and generates trading signals when price breaks through these levels.
**Entry Logic:**
- LONG: Price crosses above selected high/low levels
- SHORT: Price crosses below selected high/low levels
**Exit Logic:**
- Take Profit: Fixed percentage or ATR-based target
- Stop Loss: Fixed percentage or ATR-based stop
- Time Exit: Maximum bars in position
**Position Management:**
- Pyramiding allows building multiple positions
- Daily limiter prevents excessive trading
- Per-trade allocation controls risk per entry
🎓 BEST PRACTICES
1. **Risk Management:** Never risk more than 1-2% per trade
2. **Pyramiding:** Use smaller percentages (0.5-2%) when enabled
3. **Daily Limits:** Set realistic limits based on market volatility
4. **TP/SL Ratio:** Aim for minimum 1:1.5 risk/reward ratio
5. **Backtesting:** Test thoroughly across different market conditions
6. **Timeframes:** Use appropriate timeframes for your trading style
7. **Level Selection:** Choose relevant levels for your asset class
📊 RECOMMENDED SETTINGS
**Conservative (Low Risk):**
- Pyramiding: Disabled
- TP: 5% or 3 ATR
- SL: 2% or 1.5 ATR
- Daily Limit: 3-5 trades
- Signals: Week/Month highs only
**Moderate (Balanced):**
- Pyramiding: Enabled (max 3)
- Per Trade: 2%
- TP: 3% or 2.5 ATR
- SL: 1.5% or 1 ATR
- Daily Limit: 5-10 trades
- Signals: Yesterday + Week levels
**Aggressive (High Risk):**
- Pyramiding: Enabled (max 5)
- Per Trade: 1%
- TP: 2% or 2 ATR
- SL: 1% or 0.75 ATR
- Daily Limit: 10-20 trades
- Signals: All levels enabled
⚠️ RISK DISCLAIMER
This indicator is for educational and informational purposes only. Trading involves substantial risk of loss and is not suitable for every investor. Past performance does not guarantee future results. Always:
- Test thoroughly in paper trading first
- Use proper risk management
- Never risk more than you can afford to lose
- Understand the strategy before live trading
- Consider transaction costs and slippage
- Consult a financial advisor if needed
🔧 TROUBLESHOOTING
- **No trades executing:** Check if "Enable Strategy" is ON
- **Too many trades:** Reduce signals or enable daily limit
- **TP/SL not working:** Verify percentage/ATR settings
- **Pyramiding not working:** Check max trades and % per trade
- **Labels not showing:** Ensure "Show Labels" is enabled
📞 SUPPORT & FEEDBACK
For questions, suggestions, bug reports, or feature requests:
- Comment below this indicator
- Contact the author through TradingView
- Report any issues with specific examples
🌟 FEATURES SUMMARY
✅ Multi-timeframe level detection
✅ Customizable breakout signals
✅ ATR and percentage-based exits
✅ Advanced pyramiding system
✅ Daily trade limiting
✅ Time-based exits
✅ Modern visual design
✅ Comprehensive backtesting
✅ Real-time alerts
✅ Pine Script v6 compatible
📚 VERSION HISTORY
- v40.0 - Pine Script v6 upgrade + bug fixes
- v39.3 - Fixed TP/SL with limit/stop prices
- v39.2 - Entry price-based calculations
- v39.1 - Fixed daily trade counter
- v39.0 - Pyramiding + daily limiter
- v38.0 - Multi-trade capability (100 positions)
- v37.0 - ATR-based exits
- v36.0 - Backtesting integration
- v35.0 - Added yearly levels
🚀 GET STARTED
1. Add indicator to your chart
2. Open settings panel
3. Enable "▶️ Enable Strategy"
4. Select your preferred entry signals
5. Configure TP/SL settings
6. Run backtest on historical data
7. Optimize parameters for your asset
8. Set up alerts for live trading
Happy Trading! 🎯💰📈
---
© 2025 Multi-Timeframe High/Low Strategy Pro
Built with precision. Tested with care. Trade with confidence.
Live P&L IndicatorThis script gives you a simple, no-nonsense way to see your live profit and loss right on your chart. It stays fixed in the center (slightly offset for balance), updating automatically as price moves — so you always know where you stand without checking your account tab.
You can manually set your entry, clear it, or let the script freeze once your take-profit target is hit — perfect for keeping emotions in check when the trade’s already done its job.
Everything’s built to look clean and professional — no clutter, no distractions, just a sleek overlay.
Ethereum Sleepy Wallets – 6-Month DormancyWhat This Indicator Does
It measures how many Ethereum addresses have been completely inactive for at least 6 months (≥ 180 days) — using official Glassnode and CryptoQuant on-chain metrics.
This reveals deep conviction among long-term ETH holders
Core Concept: Direct 6-Month Dormancy
The indicator uses two precise on-chain signals:
Total Unique ETH Addresses
From GLASSNODE:ETH_ADDRESSES or CRYPTOQUANT:ETH_TOTAL_ADDRESSES
Counts every address ever used on Ethereum
Addresses Inactive ≥ 180 Days
From GLASSNODE:ETH_ADDRESSES_GREATER_THAN_180_DAYS
Counts every address that has not sent or received ETH in 6+ months
Sleepy ETH = Dormant ≥ 180 Days
Sleepy Ratio % = (Sleepy / Total) × 100
This is not an estimate — it’s direct, real dormancy.
Why 6-Month Dormancy Matters
Short-term activity (7-day) = noise from DeFi, NFTs, trading
180-day inactivity = true HODLing — coins untouched through entire market cycles
Historically:
Rising dormancy → supply drying up → bullish pressure
Falling dormancy → long-term holders selling → bearish warning
How It Works (Step-by-Step)
Fetches daily data from Glassnode (Pro+) or CryptoQuant (free)
Selects real data if available; otherwise uses robust fallback
Calculates raw sleepy wallets = addresses inactive ≥ 180 days
Smooths the signal with a 21-day simple moving average (SMA) to filter noise
Computes Sleepy Ratio % for instant conviction reading
Displays live info table with exact values on every bar
How to Use It
Signal
Interpretation
Suggested Action
Sleepy Ratio > 75% and rising
Extreme long-term HODLing
Strong accumulation — buy/hold
Smooth Sleepy trending up
Dormancy growing over 21 days
Bullish supply shock forming
Sleepy Ratio < 68% and falling
Long-term coins re-entering circulation
Caution — possible distribution
Smooth Sleepy dropping fast
HODLers breaking after 6+ months
Bearish warning — consider exits
Use on Daily (D) or Weekly (W) charts for clean, reliable signals.
Pro+ vs Free Mode
Mode
Data Source
Accuracy
Pro+ (Glassnode ON)
Real 180-day dormancy metric
100% precise
Free (Glassnode OFF)
CryptoQuant + price-scaled estimate
~80% historical correlation
Toggle in settings: Use Glassnode Data
What Makes This Indicator Original
First open-source script to directly plot Ethereum’s 6-month dormancy using official ADDRESSES_GREATER_THAN_180_DAYS
No fake math — uses true inactivity, not active address subtraction
Dual-source logic ensures usability on any TradingView plan
Dual output: raw sleepy count + 21-day SMA for precision and trend
Live info table shows real-time values and data source
Earnings CountdownAdd to a chart to show a text box with how long to next earnings.
Being updated to add functionality from original open source Pine script
R Dominant Range [CRT] by Sergi SernaR Dominant Range identifies the most influential R range located to the left of the current price action. It highlights the dominant zone that still impacts market behavior, helping traders understand which range is controlling the current structure.
Roboquant RP Profits NY Open Retest StrategyRoboquant RP Profits NY Open Retest Strategy A good strategy for CL
10 Moving Average ExponentialHaving the possibility to add multiple Moving Average Exponential up to 10 with one indicator
Macro Valuation Oscillator (MVO)Macro Valuation Oscillator (MVO) is a macro-relative-strength indicator that compares the current valuation of an asset against three key benchmarks: Gold, USD, and Bond. It helps visualize how the asset performs in relative macro terms over time.
When the MVO line for Gold (yellow) moves below the neutral zone (0), it reflects relative weakness against gold. When it rises above +80, it indicates relative strength or potential overheating compared to gold. The same concept applies to USD (blue) and Bond (purple) lines.
The indicator highlights macro-rotation behavior, showing periods when assets outperform (green) or underperform (red) in relative value. It is mainly intended for daily charts, providing a clear visual framework for assessing long-term macro relationships and timing within broader market cycles.
Sector Analysis [SS]Introducing the most powerful sector analysis tool/indicator available, to date, in Pine!
This is a whopper indicator, so be sure to read carefully to ensure you understand its applications and uses!
First of all, because this is a whopper, let's go over the key functional points of the indicator.
The indicator compares the 11 main sector ETFs against whichever ticker you are looking at.
The functions include the following:
Ability to pull technicals from the sectors, such as RSI, Stochastic and Z-Score;
Ability to look at the correlation of the sector ETF to the current ticker you are looking at.
Ability to calculate the R2 value between the ticker you are looking at and each sector.
The ability to run a Two Tailed T-Test against the log returns of the Ticker of interest and the Sector (to analyze statistically significant returns between sectors/tickers).
The ability to analyze the distribution of returns across all sector ETFs.
The ability to pull buying and selling volume across all sector ETFs.
The ability to create an integrated moving average using a sector ETF to predict the expected close range of a ticker of interest.
These are the highlight functions. Below, I will go more into them, what they mean and how to use them.
Pulling Technicals
This is pretty straight forward. You can pull technicals, such as RSI, Stochastic and Z-Score from all the sector ETFs and view them in a table.
See below for the example:
Pulling Correlation
In order to see which sector your ticker of interest follows more closely, we need to look first at correlation and then at R2.
The correlation will look at the immediate relationship over a specified time. A highly positive value, indicates a strong, symbiotic relationship, which the sector and the ticker follow each other. This would be represented by a correlation of 0.8 or higher.
A strong negative correlation, such as -0.8 or lower, indicates that the sector and the ticker are completely opposite. When one goes up, the other goes down and vice versa.
You can adjust your correlation assessment length directly in the settings menu:
If you want to use a sector ETF to find the expected range for a ticker of interest, it is important to locate the highest, POSITIVE, correlation value. Here are the results for MSFT at a correlation lookback of 200:
In this example, we can see the best relationship is with the ETF XLK.
Analysis of R2
R2 is an important metric. It essentially measures how much of the variance between 2 tickers are explained by a simple, linear relationship.
A high R2 means that a huge degree of variance can be explained between the 2 tickers. A low R2 means that it cannot and that the 2 tickers are likely not integrated or closely related.
In general, if you want to use the sector ETF to find the mean and trading range and identify over-valuation/over-extension and under-extension statistically, you need to see both a high correlation and a high R-Squared. These 2 metrics should be analyzed together.
Let's take a look at MSFT:
Here, despite the correlation implying that XLK was the ticker we should use to analyze, when we look at the R Squared, we see actually, we should be using XLI.
XLI has a strong positive relationship with MSFT, albeit a bit less than XLK, but the R2 is solid, > 0.9, indicating the XLI explains much of MSFT's variance.
Two Tailed T-Test
A two tailed T-test analyzes whether there is a statistically significant difference between 2 different groups, or in our case, tickers.
The T-Test is conducted on the log returns of the ticker of interest and the sector. You then can see the P value results, whether it is significant or not. Let's look at MSFT again:
Looking at this, we can see there is no statistically significant difference in returns between MSFT and any of the sectors.
We can also see the SMA of the log returns for more detailed comparison.
If we were to observe a significant finding on the T-Test metrics, this would indicate that one sector either outperforms or underperforms your ticker to a statistically significant degree! If you stumble upon this, you would check the average log returns to compare against the average returns of your ticker of interest, to see whether there is better performance or worse performance from the sector ETF vs. your ticker of interest.
Analyzing the Distribution
The indicator will also analyze the distribution of returns.
This is an interesting option as it can help you ascertain risk. Normally distributed returns imply mean reverting behavviour. Deviations from that imply trending behaviour with higher risk expectancy. If we look at the distribution statistics currently over the last 200 trading days, here are the results:
Here, we can see all show signs of trending, as none of the returns are normally distributed. The highest risk sectors are XLK and XLY.
Why are they the highest risk?
Because the indicator has found a heavy right tailed distribution, indicated sudden and erratic mean reversion/losses are possible.
Creating an MA
Now for the big bonus of the indicator!
The indicator can actually create a regression based range from closely correlated sectors, so you can see, in sectors that are strongly correlated to your ticker, whether your ticker is over-bought, oversold or has mean reverted.
Let's look at MSFT using XLI, our previously identified sector with a high correlation and high R2 value:
The results are pretty impressive.
You can see that MSFT has rode the mean of the sector on the daily timeframe for quite some time. Each time it over extended itself above the sector implied range, it mean reverted.
Currently, if you were to trade based on Pairs or statistics, MSFT is no trade as it is currently trading at its sector mean.
If you are a visual person, you can have the indicator plot the mean reversion points directly:
Green represents a bullish mean reversion and red a bearish mean reversion.
Concluding Remarks
If you like pair trading, following the link between sectors and tickers or want a more objective way to determine whether a ticker is over-bought or oversold, this indicator can help you.
In addition to doing this, the indicator can provide risk insights into different sectors by looking at the distribution, as well as identify under-performing sectors or tickers.
It can also shed light on sectors that may be technically over-bought or oversold by looking at Z-Score, stochastics and RSI.
Its a whopper and I really hope you find it helpful and useful!
Thanks everyone for reading and checking this out!
Safe trades!
Sesiones Globales 🌍 Londres / Wall Street / Tokio / SydneyA clean visualization of the four main trading sessions — all shown in Argentina time (UTC−3) for easier global market tracking.
🕒 Sessions covered:
London 🇬🇧 — 05:00 to 13:30
Wall Street 🇺🇸 — 11:30 to 18:00
Tokyo 🇯🇵 — 21:00 to 03:00
Sydney 🇦🇺 — 20:00 to 02:00
✨ Features:
Soft background colors for each market session (non-intrusive and chart-friendly)
“OPEN” and “CLOSE” labels in matching session colors
Correct weekend handling — Tokyo and Sydney extend into early Saturday mornings (no false sessions shown)
Works on any asset — BTC, SP500, FX, or indices
Designed for dark charts and visual clarity
🎯 Why use it:
See where global liquidity overlaps, detect volatility zones, and plan your trades around real session activity — especially helpful for BTC and SP500 traders following institutional flow.
💡 Tip: All times are set to Argentina (UTC−3) by default. Adjust manually if you prefer another timezone.
Multi-Day SMAmade this script due to the frustration of not having the 5 day SMA added with the 10 20 and 50. I need the 5 SMA for my type of trading to determine when to sell with stocks showing exponential growth.
so heres this: Multi SMA
5 day SMA pink
10 day SMA white
20 day SMA blue
50 day SMA red
200 day SMA green
Crypto Futures Basis Tracker (Annualized)🧩 What is Basis Arbitrage
Basis arbitrage is a market-neutral trading strategy that exploits the price difference between a cryptocurrency’s spot and its futures markets.
When futures trade above spot (called contango), traders can buy spot and short futures, locking in a potential yield.
When futures trade below spot (backwardation), the reverse applies — short spot and go long futures.
The yield earned (or cost paid) by holding this position until expiry is called the basis. Expressing it as an annualized percentage allows comparison across different contract maturities.
⚙️ How the Indicator Works
This tool calculates the annualized basis for up to 10 cryptocurrency futures against a chosen spot price.
You select one spot symbol (e.g., BITSTAMP:BTCUSD) and up to 10 futures symbols (e.g., DERIBIT:BTCUSD07X2025, DERIBIT:BTCUSD14X2025, etc.).
The script automatically computes the days-to-expiry (DTE) and the annualized basis for each future.
A table displays for each contract: symbol, expiry date, DTE, last price, and annualized basis (%) — making it easy to compare the forward curve across maturities.
⚠️ Risks and Limitations
While basis arbitrage is often considered low-risk, it’s not risk-free:
Funding and financing costs can erode returns, especially when borrowing or using leverage.
Exchange or counterparty risk — if one leg of the trade fails (e.g., exchange default, margin liquidation), the hedge breaks.
Execution and timing risk — the basis can tighten or invert before both legs are opened.
Liquidity differences — thin futures may have large bid-ask spreads or slippage.
Use this indicator for analysis and monitoring, not as an automated trading signal.
Disclaimer: Please remember that past performance may not be indicative of future results. Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting. This post and the script don't provide any financial advice.
Purchasing Power vs Gold, Stocks, Real Estate, BTC (1971 = 100)Visual comparison of U.S. dollar purchasing power versus major assets since 1971, when the U.S. ended the gold standard. Each asset is normalized to 100 in 1971, showing how real value has shifted across gold, real estate, stocks, and Bitcoin over time.
Source: FRED (CPIAUCSL, SP500, MSPUS) • OANDA (XAUUSD) • TradingView (INDEX:BTCUSD/BLX)
Visualization by 3xplain
Stablecoin Liquidity Delta (Aggregate Market Cap Flow)Hi All,
This indicator visualizes the bar-to-bar change in the aggregate market capitalization of major stablecoins, including USDT, USDC, DAI, and others. It serves as a proxy for monitoring on-chain liquidity and measuring capital inflows or outflows across the crypto market.
Stablecoins are the primary liquidity layer of the crypto economy. Their combined market capitalization acts as a mirror of the available fiat-denominated liquidity in digital markets:
🟩 An increase in the total stablecoin market capitalization indicates new issuance (capital entering the market).
🟥 A decrease reflects redemption or burning (liquidity exiting the system).
Tracking these flows helps anticipate macro-level liquidity trends that often lead overall market direction, providing context for broader price movements.
All values are derived from TradingView’s public CRYPTOCAP tickers, which represent the market capitalization of each stablecoin. While minor deviations can occur due to small price fluctuations around the $1 peg, these figures serve as a proxy for circulating supply and net issuance across the stablecoin ecosystem.
US/SPY- Financial Regime Index Swing Strategy Credits: concept inspired by EdgeTools Bloomberg Financial Conditions Index (Proxy)
Improvements: eight component basket, inverse volatility weights, winsorization option( statistical technique used to limit the influence of outliers in a dataset by replacing extreme values with less extreme ones, rather than removing them entirely), slope and price gates, exit guards, table and gradients.
Summary in one paragraph
A macro regime swing strategy for index ETFs, futures, FX majors, and large cap equities on daily calculation with optional lower time execution. It acts only when a composite Financial Conditions proxy plus slope and an optional price filter align. Originality comes from an eight component macro basket with inverse volatility weights and winsorized return z scores that produce a portable yardstick.
Scope and intent
Markets: SPY and peers, ES futures, ACWI, liquid FX majors, BTC, large cap equities.
Timeframes: calculation daily by default, trade on any chart.
Default demo: SPY on Daily.
Purpose: convert broad financial conditions into clear swing bias and exits.
Originality and usefulness
Unique fusion: return z scores for eight liquid proxies with inverse volatility weighting and optional winsorization, then slope and price gates.
Failure mode addressed: false starts in chop and early shorts during easy liquidity.
Testability: all knobs are inputs and the table shows components and weights.
Portable yardstick: z scores center at zero so thresholds transfer across symbols.
Method overview in plain language
Base measures
Return basis: natural log return over a configurable window, standardized to a z score. Winsorization optional to cap extremes.
Components
EQ US and EQ GLB measure equity tone.
CREDIT uses LQD over HYG. Higher credit quality outperformance is risk off so sign is flipped after z score.
RATES2Y uses two year yield, sign flipped.
SLOPE uses ten minus two year yield spread.
USD uses DXY, sign flipped.
VOL uses VIX, sign flipped.
LIQ uses BIL over SPY, sign flipped.
Each component is smoothed by the composite EMA.
Fusion rule
Weighted sum where weights are equal or inverse volatility with exponent gamma, normalized to percent so they sum to one.
Signal rule
Long when composite crosses up the long threshold and its slope is positive and price is above the SMA filter, or when composite is above the configured always long floor.
Short when composite crosses down the short threshold and its slope is negative and price is below the SMA filter.
Long exit on cross down of the long exit line or on a fresh short signal.
Short exit on cross up of the short exit line or on a fresh long signal, or when composite falls below the force short exit guard.
What you will see on the chart
Markers on suggestion bars: L for long, S for short, LX and SX for exits.
Reference lines at zero and soft regime bands at plus one and minus one.
Optional background gradient by regime intensity.
Compact table with component z, weight percent, and composite readout.
Table fields and quick reading guide
Component: EQ US, EQ GLB, CREDIT, RATES2Y, SLOPE, USD, VOL, LIQ.
Z: current standardized value, green for positive risk tone where applicable.
Weight: contribution percent after normalization.
Composite: current index value.
Reading tip: a broadly green Z column with slope positive often precedes better long context.
Inputs with guidance
Setup
Calc timeframe: default Daily. Leave blank to inherit chart.
Lookback: 50 to 1500. Larger length stabilizes regimes and delays turns.
EMA smoothing: 1 to 200. Higher smooths noise and delays signals.
Normalization
Winsorize z at ±3: caps extremes to reduce one off shocks.
Return window for equities: 5 to 260. Shorter reacts faster.
Weighting
Weight lookback: 20 to 520.
Weight mode: Equal or InvVol.
InvVol exponent gamma: 0.1 to 3. Higher compresses noisy components more.
Signals
Trade side: Long Short or Both.
Entry threshold long and short: portable z thresholds.
Exit line long and short: soft exits that give back less.
Slope lookback bars: 1 to 20.
Always long floor bfci ≥ X: macro easy mode keep long.
Force short exit when bfci < Y: macro stress guard.
Confirm
Use price trend filter and Price SMA length.
View
Glow line and Show component table.
Symbols
SPY ACWI HYG LQD VIX DXY US02Y US10Y BIL are defaults and can be changed.
Realism and responsible publication
No performance claims. Past is not future.
Shapes can move intrabar and settle on close.
Execution is on standard candles only.
Honest limitations and failure modes
Major economic releases and illiquid sessions can break assumptions.
Very quiet regimes reduce contrast. Use longer windows or higher thresholds.
Component proxies are ETFs and indexes and cannot match a proprietary FCI exactly.
Strategy notice
Orders are simulated on standard candles. All security calls use lookahead off. Nonstandard chart types are not supported for strategies.
Entries and exits
Long rule: bfci cross above long threshold with positive slope and optional price filter OR bfci above the always long floor.
Short rule: bfci cross below short threshold with negative slope and optional price filter.
Exit rules: long exit on bfci cross below long exit or on a short signal. Short exit on bfci cross above short exit or on a long signal or on force close guard.
Position sizing
Percent of equity by default. Keep target risk per trade low. One percent is a sensible starting point. For this example we used 3% of the total capital
Commisions
We used a 0.05% comission and 5 tick slippage
Legal
Education and research only. Not investment advice. Test in simulation first. Use realistic costs.
Gold THB per Baht (XAU -> Thai baht gold)What it does
This indicator converts international gold prices (XAU) into Thai retail “baht gold” price (THB per 1 baht gold weight) in real time. It multiplies the XAU price (per troy ounce) by USD/THB and converts ounces to Thai baht-weight using the exact gram ratios.
Formula
THB per baht gold = XAU (USD/oz) × USDTHB × (15.244 / 31.1035) × (1 + Adjustment%) + FlatFeeTHB
1 troy ounce = 31.1035 g
1 Thai baht gold = 15.244 g
Conversion factor ≈ 0.490103
Simple FloatFloat Display Indicator
A simple, clean indicator that displays the current float (shares outstanding float) for any stock directly in your indicator status line at the top left of the chart.
Features:
- Shows the float value with automatic K/M formatting for thousands and millions
- No chart clutter - value only appears in the status line, nothing plotted on the chart
- Works on any stock that has float data available
- Lightweight and efficient
Perfect for traders who want quick access to float information without switching between windows or cluttering their charts.
Note: Float data availability depends on TradingView's financial data for the specific ticker. Some tickers may not have this data available.
Vwap Daily By SamsungTitle
Daily VWAP with Historical Lookback (Logic Fix)
Description
This script calculates and plots the daily Volume-Weighted Average Price (VWAP), an essential tool for intraday traders.
What makes this indicator special is its robust plotting logic. Unlike many simple VWAP scripts that struggle to show data for previous days, this version includes a crucial fix that allows you to reliably display historical VWAP lines for as many days back as you need. This allows for more comprehensive backtesting and analysis of how price has interacted with the VWAP on previous trading days.
This is an indispensable tool for traders who use VWAP as a dynamic level of support/resistance, a benchmark for trade execution quality, or a gauge of the day's trend.
Key Features
Historical VWAP Display: Easily plot VWAP for multiple past days on your chart. Simply set the number of lookback days in the settings.
Accurate Daily Calculation: The VWAP calculation correctly resets at the beginning of each new trading session (00:00 server time).
Fully Customizable: You have full control over the appearance of the VWAP line, including its color, width, and style (Solid or Stepped).
Robust Plotting Engine: This script solves the common Pine Script issue where conditionally plotted historical lines fail to render. It works reliably on all intraday timeframes.
Built-in Debug Mode: For advanced users or those curious about the inner workings, a comprehensive debug mode can be enabled to display raw VWAP values, cumulative volume, and timeframe warnings.
How to Use
Add the "Daily VWAP with Historical Lookback" indicator to your chart.
IMPORTANT: Make sure you are on an intraday timeframe (e.g., 1H, 30M, 15M, 5M, 1M). This indicator is designed for intraday analysis and will display a warning if used on a daily or higher timeframe.
Open the indicator's settings.
In the "VWAP Settings" tab, adjust the "Lookback Days to Display" to set how many previous days of VWAP you want to see. (e.g., 0 for today only, 1 for today and yesterday, 10 for the last 10 days).
Customize the line's appearance in the "Line Style" tab.
The "Logic Fix" Explained (For Developers)
A common challenge in Pine Script is conditionally plotting data for historical bars. Many scripts attempt this by dynamically changing the plot color to na (transparent) for bars that shouldn't be displayed. This method is often unreliable and can result in the entire plot failing to render.
This script employs a more robust and standard approach: manipulating the data series itself.
The Problem: plot(vwap, color = shouldPlot ? color.red : na) can be buggy.
The Solution: plot(shouldPlot ? vwap : na, color = color.red) is reliable.
Instead of changing the color, we create a new data series (plotVwap). This series contains the vwapValue only on the bars that meet our date criteria. On all other bars, its value is na (Not a Number). The plot() function is designed to handle na values by simply "lifting the pen," creating a clean break in the line. This ensures that the VWAP is drawn only for the selected days, with 100% reliability across all historical data.
Settings Explained
Lookback Days to Display: Sets the number of past days (from the last visible bar) for which to display the VWAP.
Line Color, Width, and Style: Standard cosmetic settings for the VWAP line.
Enable Debug Mode (Master Switch): Toggles all debugging features on or off. It is enabled by default to help new users.
Display Debug: Cumulative Volume: When enabled, it shows the daily cumulative volume in a gray area on a separate pane.
Display Debug: Raw VWAP Value: When enabled, it plots the raw, unfiltered VWAP calculation for all days on the chart, helping to verify the core logic.
This script is provided for educational and informational purposes. Trading involves significant risk. Always conduct your own research and analysis before making any trading decisions.
If you find this script useful, a 'Like' is always appreciated! Happy trading
negative/possitive day counterSimple script to find how many days were in profit and loss to get the probability edge. only for fundamental analysis
GL
Squeeze Momentum ProSQUEEZE MOMENTUM PRO - Enhanced Visual Dashboard
A modernized version of the TTM Squeeze Momentum indicator, designed for cleaner visual interpretation and faster decision-making.
═══════════════════════════════════════════
📊 WHAT IS THE SQUEEZE?
═══════════════════════════════════════════
The "squeeze" occurs when Bollinger Bands contract inside Keltner Channels, indicating extremely low volatility. This compression typically precedes explosive directional moves - the tighter the squeeze, the bigger the potential breakout.
John Carter's TTM Squeeze concept (from "Mastering the Trade") combines this volatility compression with momentum direction to identify high-probability setups.
═══════════════════════════════════════════
✨ WHAT'S NEW IN THIS VERSION
═══════════════════════════════════════════
🎯 VISUAL STATUS BAR
- Real-time squeeze state with clear labels
- Color-coded backgrounds (Red = Building, Green = Fired Bullish, Orange = Fired Bearish)
- Squeeze duration counter to gauge compression time
📊 ENHANCED HISTOGRAM
- 4-color momentum gradient (Strong Bull/Weak Bull/Weak Bear/Strong Bear)
- Instantly shows both direction AND strength
- Background shading for current market state
🔥 SQUEEZE INTENSITY GAUGE
- 5-dot pressure indicator showing compression tightness
- Percentage display of squeeze strength
- Only appears during active squeezes
📈 REAL-TIME METRICS PANEL
- Current momentum value
- Direction indicator (increasing/decreasing)
- Strength assessment (strong/weak)
🔔 COMPREHENSIVE ALERTS
- Squeeze started
- Squeeze fired (bullish/bearish)
- Momentum crossovers
═══════════════════════════════════════════
🎮 HOW TO USE
═══════════════════════════════════════════
1. WAIT FOR SQUEEZE
• Red status bar appears
• Intensity dots show compression level
• Longer duration = potentially bigger move
2. WATCH FOR RELEASE
• Status changes to "FIRED - BULLISH" or "FIRED - BEARISH"
• Histogram color confirms momentum direction
• Background highlights the event
3. MANAGE POSITION
• Monitor momentum strength in metrics panel
• Exit when histogram changes color (momentum reversal)
• Use with trend/volume confirmation
═══════════════════════════════════════════
⚙️ CUSTOMIZATION
═══════════════════════════════════════════
- Toggle status bar, metrics, intensity dots independently
- Adjustable BB/KC parameters
- Custom color schemes
- Show/hide squeeze duration
═══════════════════════════════════════════
🙏 CREDITS
═══════════════════════════════════════════
Original TTM Squeeze concept: John F. Carter
Original indicator code: LazyBear (@LazyBear)
This builds on LazyBear's excellent implementation of the TTM Squeeze Momentum indicator, adding modern visual elements and real-time dashboards for improved usability.
Original indicator: "Squeeze Momentum Indicator "
═══════════════════════════════════════════
⚠️ DISCLAIMER
═══════════════════════════════════════════
This indicator is for educational purposes. Always use proper risk management and combine with other forms of analysis. No indicator guarantees profitable trades.
═══════════════════════════════════════════
Best used on: Day trading timeframes (1m-15m) for momentum plays
Combine with: Volume analysis, trend filters, support/resistance levels
Automated Z-scoring - [JTCAPITAL]Automated Z-Scoring - is a modified way to use statistical normalization through Z-Scores for analyzing price deviations, volatility extremes, and mean reversion opportunities in financial markets.
The indicator works by calculating in the following steps:
Source Selection
The indicator begins by selecting a user-defined price source (default is the Close price). Traders can modify this to use any indicator that is deployed on the chart, for accurate and fast Z-scoring.
Mean Calculation
A Simple Moving Average (SMA) is calculated over the selected length period (default 3000). This represents the long-term equilibrium price level or the “statistical mean” of the dataset. It provides the baseline around which all price deviations are measured.
Standard Deviation Measurement
The script computes the Standard Deviation of the price series over the same period. This value quantifies how far current prices tend to stray from the mean — effectively measuring market volatility. The larger the standard deviation, the more volatile the market environment.
Z-Score Normalization
The Z-Score is calculated as:
(Current Price − Mean) ÷ Standard Deviation .
This normalization expresses how many standard deviations the current price is away from its long-term average. A Z-Score above 0 means the price is above average, while a negative score indicates it is below average.
Visual Representation
The Z-Score is plotted dynamically, with color-coding for clarity:
Bullish readings (Z > 0) are showing positive deviation from the mean.
Bearish readings (Z < 0) are showing negative deviation from the mean.
Make sure to select the correct source for what you exactly want to Z-score.
Buy and Sell Conditions:
While the indicator itself is designed as a statistical framework rather than a direct buy/sell signal generator, traders can derive actionable strategies from its behavior:
Trend Following: When the Z-Score crosses above zero after a prolonged negative period, it suggests a return to or above the mean — a possible bullish reversal or trend continuation signal.
Mean Reversion: When the Z-score is below for example -1.5 it indicates a good time for a DCA buying opportunity.
Trend Following: When the Z-Score crosses below zero after being positive, it may indicate a momentum slowdown or bearish shift.
Mean Reversion: When the Z-score is above for example 1.5 it indicates a good time for a DCA sell opportunity
Features and Parameters:
Length – Defines the period for both SMA and Standard Deviation. A longer length smooths the Z-Score and captures broader market context, while a shorter length increases responsiveness.
Source – Allows the user to choose which price data is analyzed (Close, Open, High, Low, etc.).
Fill Visualization – Highlights the magnitude of deviation between the Z-Score and the zero baseline, enhancing readability of volatility extremes.
Specifications:
Mean (Simple Moving Average)
The SMA calculates the average of the selected source over the defined length. It provides a central value to which the price tends to revert. In this indicator, the mean acts as the equilibrium point — the “zero” reference for all deviations.
Standard Deviation
Standard Deviation measures the dispersion of data points from their mean. In trading, it quantifies volatility. A high standard deviation indicates that prices are spread out (volatile), while a low value means they are clustered near the average (stable). The indicator uses this to scale deviations consistently across different market conditions.
Z-Score
The Z-Score converts raw price data into a standardized value measured in units of standard deviation.
A Z-Score of 0 = Price equals its mean.
A Z-Score of +1 = Price is one standard deviation above the mean.
A Z-Score of −1 = Price is one standard deviation below the mean.
This allows comparison of deviation magnitudes across instruments or timeframes, independent of price level.
Length Parameter
A long lookback period (e.g., 3000 bars) smooths temporary volatility and reveals long-term mean deviations — ideal for macro trend identification. Shorter lengths (e.g., 100–500) capture quicker oscillations and are useful for short-term mean reversion trades.
Statistical Interpretation
From a probabilistic perspective, if the distribution of prices is roughly normal:
About 68% of price observations lie within ±1 standard deviation (Z between −1 and +1).
About 95% lie within ±2 standard deviations.
Therefore, when the Z-Score moves beyond ±2, it statistically represents a rare event — often corresponding to price extremes or potential reversal zones.
Practical Benefit of Z-Scoring in Trading
Z-Scoring transforms raw price into a normalized volatility-adjusted metric. This allows traders to:
Compare instruments on a common statistical scale.
Identify mean-reversion setups more objectively.
Spot volatility expansions or contractions early.
Detect when price action significantly diverges from long-term equilibrium.
By automating this process, Automated Z-Scoring - provides traders with a powerful analytical lens to measure how “stretched” the market truly is — turning abstract statistics into a visually intuitive and actionable form.
Enjoy!






















