AI Adaptive Trend Navigator Strategy Echo EditionAI Adaptive Trend Navigator Strategy
This is a professional long-only automated strategy optimized for Taiwan Index Futures (TX). Based on the LuxAlgo clustering framework, this version features advanced logic iteration for institutional-grade backtesting and execution.
1. Realistic Cost Modeling To ensure backtest reliability, this strategy is pre-configured with:
Slippage: 2 ticks (Approx. 400 TWD per side).
Commission: 100 TWD per side.
Total Cost: 500 TWD per side. This provides a rigorous stress test for real-world trading environments.
2. State Consistency & Logic Continuity Optimized the underlying array handling to ensure "State Persistence." This eliminates the logic gaps common in real-time script execution, ensuring that historical signals are 100% consistent with live alerts.
3. Adaptive AI Clustering Utilizes K-means clustering to dynamically select the optimal ATR factors based on current market volatility, allowing the strategy to "evolve" as market regimes shift.
🧠 開發理念:追求實戰一致性的量化策略 本策略旨在為台指期(TX)提供一套具備真實參考價值的自動化系統。
✨ Echo 版核心優化點
數據連續性迭代:修正底層邏輯,確保訊號在即時盤勢中穩定不跳斷。
真實交易成本模擬:預設 2 點滑價 與 單邊 100 TWD 手續費,單邊總成本對標 500 TWD,拒絕虛假神單,挑戰最嚴苛的回測環境。
台指期專屬參數調校:融入針對台灣市場波動特性的預設參數與過濾邏輯。
🛡️ 進階實戰過濾
空間緩衝區 (Buffer Strategy):價格需有效突破緩衝區才觸發,精準過濾盤整雜訊。
AI 信心評分系統:只有當動能穩定度達標時才會發進場訊號。
冷卻保護機制:有效抑制訊號在洗盤區間過度頻繁跳動。
⚠️ Disclaimer: Backtest results do not guarantee future performance.
Portfolio management
3-Daumen-Regel mit 4 Daumen, YTD-Linie, SMA200 und ATR
The script calculates the following values and displays them in a table:
- YTD line
- SMA
- ATR and ATR
- Difference to YTD
- Difference to SMA200
The table also includes a four-point rating for:
- the first 5 trading days of the year
- price relative to SMA
- price relative to YTD line
- the first month of the trading year
Universe_PRMP (Universe_Professional Risk Management Panel)Description
Universe_PRMP (Universe_Professional Risk Management Panel)
This comprehensive tool is designed to bring institutional-grade risk discipline to retail traders. Managing risk is the most critical part of trading, especially in high-leverage environments. This script automates the complex calculations of position sizing and profit/loss projection.
How to Use:
Initial Setup: When you add the script to your chart, it will prompt you to select two price levels. The first click sets your Stop Loss (SL) and the second sets your Take Profit (TP).
Account Configuration: Open the script settings (the gear icon) to input your Account Balance and the Percentage of Risk you are willing to take per trade (standard is 1% or 2%).
Market Conditions: Enter your broker's current Spread in pips to ensure the lot size calculation accounts for the cost of entry.
Active Monitoring:
Suggested Lot: The dashboard will immediately show the exact lot size you should enter in your trading platform.
Real-Time Projection: As price moves, the dashboard tracks whether your trade is active, hit the target, or stopped out.
Visual Labels: Red (SL) and Green (TP) labels on the chart provide clear visual cues for your exit points.
Key Features:
Dynamic Position Sizing: Automatically adjusts lot size based on the distance between entry and SL.
Spread Integration: Protects your capital by including transaction costs in the risk calculation.
Ticker Sensitivity: The panel recognizes symbol changes to prevent calculation errors across different pairs.
Visual Status Indicators: Color-coded status alerts to keep you emotionally detached and strategically focused.
DISCLAIMER:
This script is an educational and utility tool designed for risk calculation purposes only. It does not provide trading signals or investment advice. Past performance is not indicative of future results. Use this tool at your own risk.
Sharpe Ratio [Alpha Extract]A sophisticated risk-adjusted return measurement system that calculates annualized Sharpe Ratio with dynamic color-coded visualization distinguishing return quality across positive and negative performance regimes. Utilizing rolling period calculations with smoothed moving average comparison, this indicator delivers institutional-grade performance assessment with overbought/oversold threshold detection for extreme risk-adjusted return conditions. The system's four-tier color classification combined with histogram fills and background highlighting provides comprehensive visual feedback on whether current returns justify their volatility risk across varying market cycles.
🔶 Advanced Sharpe Ratio Calculation Engine
Implements classic Sharpe Ratio methodology measuring mean daily return divided by return standard deviation with annualization factor for consistent interpretation. The system calculates daily percentage returns, computes rolling mean and standard deviation over configurable periods, applies square root of 365 scaling for annualized comparison, and generates unbounded ratio values where higher positive readings indicate superior risk-adjusted performance.
// Core Sharpe Ratio Framework
Daily_Return = close / close - 1
Mean_Return = ta.sma(Daily_Return, Period)
StdDev_Return = ta.stdev(Daily_Return, Period)
Sharpe_Ratio = (Mean_Return / StdDev_Return) * sqrt(365)
🔶 Dynamic Four-Tier Color Classification
Features sophisticated color logic distinguishing between strong positive returns (green), weakening positive returns (yellow), weakening negative returns (orange), and strong negative returns (red) based on relationship to smoothed average. The system compares current Sharpe against SMA-smoothed baseline, applying green when positive and accelerating, yellow when positive but decelerating, orange when negative but improving, and red when negative and deteriorating for nuanced regime assessment.
🔶 Smoothed Baseline Comparison Framework
Implements SMA smoothing of Sharpe Ratio with configurable period to establish momentum reference line for trend determination within risk-adjusted returns. The system calculates simple moving average of raw Sharpe values, uses this smoothed line as directional benchmark, and determines whether current risk-adjusted performance is strengthening or weakening relative to recent average for color classification logic.
🔶 Extreme Threshold Detection System
Provides overbought and oversold level identification with configurable upper and lower bounds marking exceptional risk-adjusted return extremes. The system defaults to +4.3 for overbought threshold (extremely favorable risk-return profile) and -2.3 for oversold threshold (severely unfavorable risk-return profile), applying dashed horizontal reference lines and background highlighting when Sharpe breaches these statistical extremes requiring attention.
🔶 Histogram Fill Visualization Architecture
Creates gradient-filled histogram between Sharpe Ratio line and zero baseline using dynamic color matching with 30% transparency for intuitive positive/negative return distinction. The system fills area above zero with bullish colors (green/yellow) and below zero with bearish colors (orange/red), providing immediate visual confirmation of whether returns are compensating for volatility risk or destroying risk-adjusted value.
🔶 Background Zone Highlighting Framework
Implements subtle background coloring when Sharpe enters extreme overbought or oversold zones, alerting traders to statistically significant risk-adjusted return conditions. The system applies semi-transparent red background when ratio exceeds +4.3 (exceptionally strong risk-adjusted returns potentially unsustainable) and green background when below -2.3 (severely poor risk-adjusted returns potentially reversionary), creating visual alerts without obscuring price action.
🔶 Annualization Methodology Integration
Utilizes standard square root of time scaling (sqrt(365)) to convert rolling period Sharpe calculations into annualized format for cross-temporal comparison. The system applies this mathematical transformation ensuring Sharpe values represent expected annual risk-adjusted returns regardless of calculation period length, enabling consistent interpretation whether using 100-day or 200-day rolling windows.
🔶 Zero-Line Reference System
Provides critical zero-line plot serving as boundary between positive risk-adjusted returns (capital allocation justified by return/risk profile) and negative risk-adjusted returns (strategy destroying value on risk-adjusted basis). The system emphasizes this threshold as decision point where values above zero suggest continuation while values below zero indicate reconsideration of exposure.
🔶 Momentum-Based Color
Transitions Implements intelligent color switching logic that considers both absolute Sharpe value and its momentum relative to smoothed average, creating four distinct regimes for granular performance assessment. The system enables identification of bullish acceleration (green), bullish deceleration (yellow), bearish improvement (orange), and bearish acceleration (red) for nuanced position management beyond simple positive/negative classification.
🔶 Configurable Period Optimization
Features adjustable calculation period and smoothing length enabling optimization across different trading timeframes and volatility regimes. The system defaults to 150-period calculation (approximately 6-7 months of daily data) with 30-period smoothing, but allows customization from short-term tactical assessment to long-term strategic evaluation based on investment horizon and strategy requirements.
🔶 Performance Optimization Framework
Employs efficient rolling calculations with streamlined daily return processing and optimized standard deviation computation for smooth real-time updates. The system includes minimal computational overhead through single-pass mean and variance calculations, enabling consistent performance across extended historical periods while maintaining accuracy of risk-adjusted return measurements.
This indicator delivers sophisticated risk-adjusted return analysis through classic Sharpe Ratio methodology with enhanced visual classification distinguishing return quality and momentum. Unlike simple return-focused indicators, Sharpe Ratio penalizes volatility ensuring traders evaluate whether returns justify the risk undertaken. The system's four-tier color coding, smoothed baseline comparison, and extreme threshold detection make it essential for portfolio managers and systematic traders seeking objective performance assessment beyond raw price gains. High positive Sharpe values indicate efficient return generation relative to volatility risk, while negative values signal value destruction on risk-adjusted basis requiring strategy reassessment. The indicator excels at identifying periods when risk-taking is rewarded (green zones) versus periods when volatility exceeds returns (red zones) across cryptocurrency, forex, and equity markets for optimal capital allocation decisions.
Position Size FTWhy you should use this indicator:
It gives you the exact position size in seconds, based on your equity, your risk %, and your real stop location, so you don’t guess.
It keeps your risk consistent even when the stop is wider or tighter, so one “normal” trade can’t become a big loss.
It blocks stupid mistakes like reusing the last size, moving the stop, or oversizing when you feel confident.
It makes drawdown control automatic: drop from 1% to 0.5% or 0.25% and the tool enforces it without you negotiating with yourself.
This tool is your “no excuses” position sizer.
You tell it your account size and how much you’re willing to lose on one trade. Then, for every chart, it calculates the position size that matches your stop distance. So your risk stays the same even when the stop is wide or tight.
If you use it on every chart, you stop doing the two things that destroy accounts: guessing size and oversizing.
Account Equity ($)
Set this to your current account value. Update it at least once a week, or after a big win or loss. If this number is wrong, every size it prints will be wrong.
Risk per Trade (%)
This is the percent you are willing to lose if the stop gets hit.
My recommendation if you trade my system
0.25% if you’re new, or if you’re not consistent yet. This keeps you alive while you learn.
0.5% as your normal size when you’re trading well.
1% only when your account is at an all time high and the market is clean.
0.25% when you are in a drawdown (especially if you are down more than 10%) and the market feels messy.
Max Position Size (%)
This is a safety cap. Even if the math says you can take a huge position, the tool will limit it.
I recommend 25%.
It stops you from loading too much into one trade, especially on tight stops where position size can explode.
LOD/HOD Lookback Bars
This tells the tool which low or high to use for the stop reference.
Use 1 if you are using the current day Low of Day or High of Day.
Use 2 if you are using the previous day Low of Day or High of Day.
If you switch between those two in your strategy, you should switch this setting to match the setup. Otherwise the sizing will be off.
Table Position, Text Size, Text Color
This is just display.
Pick a corner that doesn’t block your chart.
Keep Text Size on Normal.
Use black text if your chart background is light, and white text if your background is dark.
My clean default setup
Account Equity = your real number
Risk per Trade = 0.5%
Max Position Size = 25%
Lookback Bars = 1 most of the time, 2 when the setup calls for previous day levels
Table Position = anywhere you like, keep it out of the way
The simple rule
If the tool is on the chart, sizing becomes automatic. If sizing is automatic, discipline gets easier. And if discipline gets easier, you stop donating money to the market.
Relative Strength Scatter PlotThis is a modication to the indicator ably coded by LOAMEX but with some minor modifications and uses Australian Stock Exchange indices instead of US. This makes it easier for those to use in other countries becasue it has the template for adding indices and the benchmark.
Refer to the LOAMEX indicator for information or the text in this open source pinescript.
The plot shows the relative strength of various indices to a benchmark index, in this case, the ASX XJO200. Indices or sectors located close to the top right hand quadrant are showing the best out performance and thus make up the best source to create your watchlist.
Similarly, you can put stocks in your portfolio into the indicator and see which ones are closest to the upper right of the plot. Those residing in the bottom left quadrant need to be pruned from your portfolio or watched more carefully with closer stop losses.
Titan V40.0 Optimal Portfolio ManagerTitan V40.0 Optimal Portfolio Manager
This script serves as a complete portfolio management ecosystem designed to professionalize your entire investment process. It is built to replace emotional guesswork with a structured, mathematically driven workflow that guides you from discovering broad market trends to calculating the exact dollar amount you should allocate to each asset. Whether you are managing a crypto portfolio, a stock watchlist, or a diversified mix of assets, Titan V40.0 acts as your personal "Portfolio Architect," helping you build a scientifically weighted portfolio that adapts dynamically to market conditions.
How the 4-Step Workflow Operates
The system is organized into four distinct operational modes that you cycle through as you analyze the market. You simply change the "Active Workflow Step" in the settings to progress through the analysis.
You begin with the Macro Scout, which is designed to show you where capital is flowing in the broader economy. This mode scans 15 major sectors—ranging from Technology and Energy to Gold and Crypto—and ranks them by relative strength. This high-level view allows you to instantly identify which sectors are leading the market and which are lagging, ensuring you are always fishing in the right pond.
Once you have identified a leading sector, you move to the Deep Dive mode. This tool allows you to select a specific target sector, such as Semiconductors or Precious Metals, and instantly scans a pre-loaded internal library of the top 20 assets within that industry. It ranks these assets based on performance and safety, allowing you to quickly cherry-pick the top three to five winners that are outperforming their peers.
After identifying your potential winners, you proceed to the Favorites Monitor. This step allows you to build a focused "bench" of your top candidates. by inputting your chosen winners from the Deep Dive into the Favorites slots in the settings, you create a dedicated watchlist. This separates the signal from the noise, letting you monitor the Buy, Hold, or Sell status of your specific targets in real-time without the distraction of the rest of the market.
The final and most powerful phase is Reallocation. This is where the script functions as a true Portfolio Architect. In this step, you input your current portfolio holdings alongside your new favorites. The script treats this combined list as a single "unified pool" of candidates, scoring every asset purely on its current merit regardless of whether you already own it or not. It then generates a clear Action Plan. If an asset has a strong trend and a high score, it issues a BUY or ADD signal with a specific target dollar amount based on your total equity. If an asset is stable but not a screaming buy, it issues a MAINTAIN signal to hold your position. If a trend has broken, it issues an EXIT signal, advising you to cut the position to zero to protect capital.
Smart Logic Under the Hood
What makes Titan V40.0 unique is its "Regime Awareness." The system automatically detects if the broad market is in a Risk-On (Bull) or Risk-Off (Bear) state using a global proxy like SPY or BTC. In a Risk-On regime, the system is aggressive, allowing capital to be fully deployed into high-performing assets. In a Risk-Off regime, the system automatically forces a "Cash Drag," mathematically reducing allocation targets to keep a larger portion of your portfolio in cash for safety.
Furthermore, the scoring engine uses Risk-Adjusted math. It does not simply chase high returns; it actively penalizes volatility. A stock that is rising steadily will be ranked higher than a stock that is wildly erratic, even if their total returns are similar. This ensures that your "Maintenance" positions—assets you hold that are doing okay but not spectacular—still receive a proper allocation target, preventing you from being forced to sell good assets prematurely while ensuring you are effectively positioned for the highest probability of return.
Asset Drift ModelThis Asset Drift Model is a statistical tool designed to detect whether an asset exhibits a systematic directional tendency in its historical returns. Unlike traditional momentum indicators that react to price movements, this indicator performs a formal hypothesis test to determine if the observed drift is statistically significant, economically meaningful, and structurally stable across time. The result is a classification that helps traders understand whether historical evidence supports a directional bias in the asset.
The core question the indicator answers is simple: Has this asset shown a reliable tendency to move in one direction over the past three years, and is that tendency strong enough to matter?
What is drift and why does it matter
In financial economics, drift refers to the expected rate of return of an asset over time. The concept originates from the geometric Brownian motion model, which describes asset prices as following a random walk with an added drift component (Black and Scholes, 1973). If drift is zero, price movements are purely random. If drift is positive, the asset tends to appreciate over time. If negative, it tends to depreciate.
The existence of drift has profound implications for trading strategy. Eugene Fama's Efficient Market Hypothesis (Fama, 1970) suggests that in efficient markets, risk-adjusted drift should be minimal because prices already reflect all available information. However, decades of empirical research have documented persistent anomalies. Jegadeesh and Titman (1993) demonstrated that stocks with positive past returns continue to outperform, a phenomenon known as momentum. DeBondt and Thaler (1985) found evidence of long-term mean reversion. These findings suggest that drift is not constant and can vary across assets and time periods.
For practitioners, understanding drift is fundamental. A positive drift implies that long positions have a statistical edge over time. A negative drift suggests short positions may be advantageous. No detectable drift means the asset behaves more like a random walk, where directional strategies have no inherent advantage.
How professionals use drift analysis
Institutional investors and hedge funds have long incorporated drift analysis into their systematic strategies. Quantitative funds typically estimate drift as part of their alpha generation process, using it to tilt portfolios toward assets with favorable expected returns (Grinold and Kahn, 2000).
The challenge lies not in calculating drift but in determining whether observed drift is genuine or merely statistical noise. A naive approach might conclude that any positive average return indicates positive drift. However, financial returns are noisy, and short samples can produce misleading estimates. This is why professional quants rely on formal statistical inference.
The standard approach involves testing the null hypothesis that expected returns equal zero against the alternative that they differ from zero. The test statistic is typically a t-ratio: the sample mean divided by its standard error. However, financial returns often exhibit serial correlation and heteroskedasticity, which invalidate simple standard errors. To address this, practitioners use heteroskedasticity and autocorrelation consistent standard errors, commonly known as HAC or Newey-West standard errors (Newey and West, 1987).
Beyond statistical significance, professional investors also consider economic significance. A statistically significant drift of 0.5 percent annually may not justify trading costs. Conversely, a large drift that fails to reach statistical significance due to high volatility may still inform portfolio construction. The most robust conclusions require both statistical and economic thresholds to be met.
Methodology
The Asset Drift Model implements a rigorous inference framework designed to minimize false positives while detecting genuine drift.
Return calculation
The indicator uses logarithmic returns over non-overlapping 60-day periods. Non-overlapping returns are essential because overlapping returns introduce artificial autocorrelation that biases variance estimates (Richardson and Stock, 1989). Using 60-day horizons rather than daily returns reduces noise and captures medium-term drift relevant for position traders.
The sample window spans 756 trading days, approximately three years of data. This provides 12 independent observations for the full sample and 6 observations per half-sample for structural stability testing.
Statistical inference
The indicator calculates the t-statistic for the null hypothesis that mean returns equal zero. To account for potential residual autocorrelation, it applies a simplified HAC correction with one lag, appropriate for non-overlapping returns where autocorrelation is minimal by construction.
Statistical significance requires the absolute t-statistic to exceed 2.0, corresponding to approximately 95 percent confidence. This threshold follows conventional practice in financial econometrics (Campbell, Lo, and MacKinlay, 1997).
Power analysis
A critical but often overlooked aspect of hypothesis testing is statistical power: the probability of detecting drift when it exists. With small samples, even substantial drift may fail to reach significance due to high standard errors. The indicator calculates the minimum detectable effect at 95 percent confidence and requires observed drift to exceed this threshold. This prevents classifying assets as having no drift when the test simply lacks power to detect it.
Robustness checks
The indicator applies multiple robustness checks before classifying drift as genuine.
First, the sign test examines whether the proportion of positive returns differs significantly from 50 percent. This non-parametric test is robust to distributional assumptions and verifies that the mean is not driven by outliers.
Second, mean-median agreement ensures that the mean and median returns share the same sign. Divergence indicates skewness that could distort inference.
Third, structural stability splits the sample into two halves and requires consistent signs of both means and t-statistics across sub-periods. This addresses the concern that drift may be an artifact of a specific regime rather than a persistent characteristic (Andrews, 1993).
Fourth, the variance ratio test detects mean-reverting behavior. Lo and MacKinlay (1988) showed that if returns follow a random walk, the variance of multi-period returns should scale linearly with the horizon. A variance ratio significantly below one indicates mean reversion, which contradicts persistent drift. The indicator blocks drift classification when significant mean reversion is detected.
Classification system
Based on these tests, the indicator classifies assets into three categories.
Strong evidence indicates that all criteria are met: statistical significance, economic significance (at least 3 percent annualized drift), adequate power, and all robustness checks pass. This classification suggests the asset has exhibited reliable directional tendency that is both statistically robust and economically meaningful.
Weak evidence indicates statistical significance without economic significance. The drift is detectable but small, typically below 3 percent annually. Such assets may still have directional tendency but the magnitude may not justify concentrated positioning.
No evidence indicates insufficient statistical support for drift. This does not prove the asset is driftless; it means the available data cannot distinguish drift from random variation. The indicator provides the specific reason for rejection, such as failed power analysis, inconsistent sub-samples, or detected mean reversion.
Dashboard explanation
The dashboard displays all relevant statistics for transparency.
Classification shows the current drift assessment: Positive Drift, Negative Drift, Positive (weak), Negative (weak), or No Drift.
Evidence indicates the strength of evidence: Strong, Weak, or None, with the specific reason for rejection if applicable.
Inference shows whether the sample is sufficient for analysis. Blocked indicates fewer than 10 observations. Heuristic indicates 10 to 19 observations, where asymptotic approximations are less reliable. Allowed indicates 20 or more observations with reliable inference.
The t-statistics for full sample and both half-samples show the test statistics and sample sizes. Double asterisks denote significance at the 5 percent level.
Power displays OK if observed drift exceeds the minimum detectable effect, or shows the MDE threshold if power is insufficient.
Sign Test shows the z-statistic for the proportion test. An asterisk indicates significance at 10 percent.
Mean equals Median indicates agreement between central tendency measures.
Struct(m) shows structural stability of means across half-samples, including the standardized level deviation.
Struct(t) shows whether t-statistics have consistent signs across half-samples.
VR Test shows the variance ratio and its z-statistic. An asterisk indicates the ratio differs significantly from one.
Econ. Sig. indicates whether drift exceeds the 3 percent annual threshold.
Drift (ann.) shows the annualized drift estimate.
Regime indicates whether the asset exhibits mean-reverting behavior based on the variance ratio test.
Practical applications for traders
For discretionary traders, the indicator provides a quantitative foundation for directional bias decisions. Rather than relying on intuition or simple price trends, traders can assess whether historical evidence supports their directional thesis.
For systematic traders, the indicator can serve as a regime filter. Trend-following strategies may perform better on assets with detectable positive drift, while mean-reversion strategies may suit assets where drift is absent or the variance ratio indicates mean reversion.
For portfolio construction, drift analysis helps identify assets where long-only exposure has historical justification versus assets requiring more balanced or tactical positioning.
Limitations
This indicator performs retrospective analysis and does not predict future returns. Past drift does not guarantee future drift. Markets evolve, regimes change, and historical patterns may not persist.
The three-year sample window captures medium-term tendencies but may miss shorter regime changes or longer structural shifts. The 60-day return horizon suits position traders but may not reflect intraday or weekly dynamics.
Small samples yield heuristic rather than statistically robust results. The indicator flags such cases but users should interpret them with appropriate caution.
References
Andrews, D.W.K. (1993) Tests for parameter instability and structural change with unknown change point. Econometrica, 61(4).
Black, F. and Scholes, M. (1973) The pricing of options and corporate liabilities. Journal of Political Economy, 81(3).
Campbell, J.Y., Lo, A.W. and MacKinlay, A.C. (1997) The econometrics of financial markets. Princeton: Princeton University Press.
DeBondt, W.F.M. and Thaler, R. (1985) Does the stock market overreact? Journal of Finance, 40(3).
Fama, E.F. (1970) Efficient capital markets: a review of theory and empirical work. Journal of Finance, 25(2).
Grinold, R.C. and Kahn, R.N. (2000) Active portfolio management. 2nd ed. New York: McGraw-Hill.
Jegadeesh, N. and Titman, S. (1993) Returns to buying winners and selling losers. Journal of Finance, 48(1).
Lo, A.W. and MacKinlay, A.C. (1988) Stock market prices do not follow random walks. Review of Financial Studies, 1(1).
Newey, W.K. and West, K.D. (1987) A simple, positive semi-definite, heteroskedasticity and autocorrelation consistent covariance matrix. Econometrica, 55(3).
Richardson, M. and Stock, J.H. (1989) Drawing inferences from statistics based on multiyear asset returns. Journal of Financial Economics, 25(2).
Mission Control Dashboard (AI, Crypto, Liquidity) FASTCONCEPT Price is a lagging indicator. Liquidity is a leading indicator. "Mission Control Dashboard (AI, Crypto, Liquidity) FAST" is a sophisticated macroeconomic dashboard designed to audit the "plumbing" of the financial system in real-time. Unlike standard indicators that rely solely on price action, this tool pulls data from the Federal Reserve (FRED), Treasury Statements, Corporate Financials (10-K/10-Q), and On-Chain Stablecoin metrics to visualize the structural flows driving the market.
THE "UNIFIED FIELD" SOLVER One of the hardest challenges in cross-asset scripting is "Time Dilation"—synchronizing 24/7 Crypto markets (Bitcoin) with Mon-Fri Traditional markets (Stocks/Bonds).
Standard scripts fail on weekends, showing mismatched data.
This engine uses a Weekly Anchor system. It calculates all momentum and liquidity metrics based on "Week-to-Date" or "Month-Ago" anchors. This ensures that a "Liquidity Drain" looks identical whether you are viewing a Bitcoin chart on Saturday or an Apple chart on Monday.
THE CHRONOS LOGIC The dashboard is sorted by Time Sensitivity (Speed of impact), from fast-twitch tactical signals to slow-moving structural fundamentals.
1. TACTICAL (Reacts in 24–48h)
Stablecoin Flight: Measures the immediate flow of capital from Volatile Assets to Stablecoins (USDT/USDC). A spike (>0.5%) indicates fear/sidelining.
Liquidity Alpha: Calculates the efficiency of capital. It subtracts "Friction" (Dollar Strength + Yields) from "Flow" (Liquidity Beta). High Alpha means money is flowing easily into risk assets.
Alt Euphoria: Tracks the overheating of the Altcoin market (TOTAL3). Green indicates sustainable growth; Red (>45%) warns of a "blow-off top."
Retail FOMO: A sentiment gauge comparing Coinbase Stock ( NASDAQ:COIN ) performance vs. Bitcoin ( CRYPTOCAP:BTC ). When Retail outperforms the Asset, local tops often follow.
2. LIQUIDITY & MACRO (Reacts in 1–4 Weeks)
Debt Wall (10Y): The Rate-of-Change of the US 10-Year Treasury Yield. Spiking yields act as gravity on risk assets.
Liquidity Beta: The raw "Quantity of Money." Tracks the 4-week change in Net Liquidity (Fed Balance Sheet - TGA + Stablecoins).
TGA Balance: The Critical Monitor. Tracks the Treasury General Account. When the TGA rises (Red), the government is draining liquidity from the banking system. When it falls (Green), it releases cash.
Note: This script includes an auto-scaler to handle TGA data in both Billions and Millions.
3. STRUCTURAL (Reacts in 3–12 Months)
AI Capex (YoY & QoQ): The "Floor" of the 2025/2026 cycle. Tracks the Capital Expenditure of the Hyperscalers (MSFT, GOOGL, AMZN, META). As long as this remains high (>30%), the infrastructure boom supports the tech narrative.
PMI Manufacturing: Tracks the ISM Manufacturing cycle. Contraction (<50) often forces Fed intervention.
Micron Inventory: A lead indicator for the hardware cycle.
HOW TO USE
Status Colors: The traffic light system helps you assess risk at a glance.
🟢 GREEN (Healthy): Flow is positive, friction is low, fundamentals are strong.
🔴 RED (Danger): Liquidity is draining (TGA spike), yields are shock-rising, or FOMO is excessive.
Zero Configuration: The script auto-detects asset classes and scales units (Billions/Trillions) automatically.
DATA SOURCES
Federal Reserve Economic Data (FRED)
Daily Treasury Statement (DTS)
CryptoCap (TradingView)
Nasdaq/Corporate Financials
Disclaimer: This tool is for informational purposes only and does not constitute financial advice. Macro data feeds are subject to reporting delays.
BTC Fundamental Value Hypothesis [OmegaTools]BTC Fundamental Value Hypothesis is a macro-valuation and regime-detection model designed to contextualize Bitcoin’s price through relative market-cap comparisons against major capital reservoirs: Gold, Silver, the Altcoin market, and large-cap equities. Instead of relying on traditional on-chain metrics or purely technical signals, this tool frames BTC as an asset competing for global liquidity and “store-of-value mindshare”, then estimates an implied fair value based on how BTC historically coexists (or diverges) from these benchmark universes.
Core concept: relative market-cap anchoring
The indicator builds a reference-based fair price by translating external market capitalizations into implied BTC valuation using a dominance framework. In practice, you choose one or more reference universes (Gold, Silver, Altcoins, Stocks). For each selected universe, the script computes how large BTC “should be” relative to that universe (dominance ratio), and converts that into an implied BTC price. The final fair price is the average of the implied prices from the enabled universes.
Two dominance modes: automatic vs manual
1. Automatic Dominance % (default)
When enabled, the model estimates dominance ratios dynamically using a 252-period simple moving average of BTC market cap divided by each reference market cap. This produces an adaptive baseline that follows structural changes over time and reduces sensitivity to short-term spikes.
2. Manual Dominance %
If you prefer a discretionary macro thesis, you can directly input dominance parameters for each reference universe. This is useful when you want to stress-test scenarios (e.g., “BTC should converge toward X% of Gold’s market cap”) or align the model with a specific long-term adoption narrative.
Reference universes and data construction
- BTC market cap: pulled from CRYPTOCAP:BTC.
- Gold and Silver market caps: derived from the corresponding futures symbols (GC1!, SI1!) multiplied by an assumed total above-ground quantity (constant tonnage converted to troy ounces). This provides a practical and tradable proxy for spot valuation context.
- Altcoin market cap: pulled from CRYPTOCAP:TOTAL2 (total crypto market excluding BTC).
- Stocks market cap proxy (Σ3): a deliberately conservative equity benchmark built from three mega-cap stocks (AAPL, MSFT, AMZN) using total shares outstanding (request.financial) multiplied by price. This avoids index licensing complexity while still tracking a meaningful slice of global equity beta/liquidity.
Valuation output: overvalued vs undervalued (log-based)
The valuation readout is expressed as a percentage derived from the logarithmic distance between BTC price and the model’s fair price. This choice makes valuation comparable across long time horizons and reduces distortion during exponential growth phases. A positive valuation indicates BTC trading below the model’s implied value (undervalued), while a negative valuation indicates trading above it (overvalued).
Oscillator: relative momentum and regime confirmation
In addition to fair value, the indicator includes a momentum differential oscillator built from RSI(50):
- BTC RSI is compared to the average RSI of the selected reference universes.
- The oscillator highlights when BTC strength is leading or lagging the broader macro benchmarks.
- Color is rendered through a gradient to provide immediate regime readability (risk-on vs risk-off behavior, expansion vs contraction phases).
Visualization and UI components
- Fair Price overlay: the computed fair price is plotted directly on the BTC chart for immediate comparison with spot price action.
- Valuation shading: the area between price and fair price is filled to visually emphasize dislocation and potential mean-reversion zones.
- Oscillator panel: a zero-centered oscillator with filled bands helps you identify persistent trend regimes versus transitional conditions.
- Summary table: a right-side table displays the current valuation (over/under) and, when Automatic mode is enabled, the live dominance ratios used in the model (BTC/GOLD, BTC/SILVER, BTC/ALTC, BTC/STOCKS).
How to use it (practical workflows)
- Macro valuation context: use fair price as a structural anchor to assess whether BTC is trading at a premium or discount relative to external liquidity baselines.
- Regime filtering: combine valuation with the oscillator to distinguish “cheap but weak” from “cheap and strengthening” (and the inverse for tops).
- Mean-reversion mapping: large, persistent deviations from fair value often highlight speculative extremes or capitulation zones; this can support systematic entries/exits, position sizing, or hedging decisions.
- Scenario analysis: switch to Manual Dominance % to model adoption outcomes, policy-driven shifts, or multi-year re-rating assumptions.
Important notes and limitations (read before use)
- This is a hypothesis-driven macro model, not a literal intrinsic value calculation. Results depend on dominance assumptions, proxies, and data availability.
- Gold/Silver market caps are approximations based on futures pricing and fixed supply constants; real-world supply dynamics, above-ground estimates, and spot/futures basis can differ.
- The Stocks (Σ3) benchmark is a proxy and intentionally not “the whole market”. It is designed to represent a large-cap liquidity reference, not total equity capitalization.
- Always validate signals with additional context (market structure, volatility regime, risk management rules). This indicator is best used as a macro layer in a broader decision framework.
Designed for clarity, macro discipline, and repeatability
BTC Fundamental Value Hypothesis by OmegaTools is built for traders and investors who want a clean, data-driven way to interpret BTC through the lens of competing asset classes and capital flows. It is particularly effective on higher timeframes (Daily/Weekly) where macro relationships are more stable and valuation signals are less noisy.
© OmegaTools, Eros
Time Anchored FX LevelFX-Anchored Price Level
This indicator anchors a historical price at a specific date and time, and optionally links that anchor to a secondary FX rate to create a dynamic, currency-aware price level.
Thus, e.g. one visualize a past BTCEUR price on a BTCUSD chart now.
At the selected timestamp, the script captures the chart price using the chosen timeframe and price source.
If a secondary ticker is provided (for example, an FX rate), the anchored value is fixed in that secondary currency and then converted back to the chart currency on every bar. The result is a moving level that reflects changes in the exchange rate over time.
If no secondary ticker is set, the indicator behaves as a classic time-anchored price level and plots a constant historical price.
Key features
* Anchor a price to an exact date and time (string input with optional hour offset)
* Optional secondary ticker for FX or cross-rate conversion
* Dynamic level plotted as a series (updates like a moving average)
* User-selectable calculation timeframe and price source (Open, Close, etc.)
* Visual anchor marker at the original timestamp
* Last-bar price label for clear readability
Typical use cases
* FX buyback or re-entry levels after converting proceeds into another currency
* Evaluating historical prices in constant-currency terms
* Comparing past executions to current market conditions
* Anchoring risk or valuation levels across time and exchange rates
This tool is designed for traders who need precise, time-anchored reference levels that remain meaningful as currencies and markets evolve.
Reflation Proxy: (QQQ/GSG) vs QQQ (Base-100)This indicator builds a single “reflation impulse” line by standardizing the QQQ/GSG ratio (growth equities vs commodities) and comparing it to QQQ over the same Base-100 lookback window. The result highlights when commodities are catching up to or outperforming growth (reflation/broadening impulse) versus when growth is dominating real assets (disinflation/duration regime). The main line is smoothed with a user-defined EMA and includes three configurable control EMAs (21/50/100 by default). Rising readings generally reflect growth leadership; a rollover into a sustained decline tends to mark reflation pressure building under the surface.
Manual PNL TrackerEnter your USD position size, direction and entry price to track it realtime in the chart without needing to use TV brokers for it.
Sigmoid Allocation Indicator & DashboardTL;DR This sigmoid-based allocation indicator tells you percentage of your portfolio to invest based on how much the market has dropped.
Market at all-time high? → Stay defensive, invest less (e.g., 30%)
Market crashed hard? → Get aggressive, invest more (e.g., 100%)
The "sigmoid" part just means the transition between these two extremes follows a smooth S-shaped curve.
Description
This indicator is a sigmoid-based allocation system that dynamically adjusts a portfolio exposure based on market drawdown.
It compares multiple steepness curves (K values) to find your optimal risk profile for leveraged ETF strategies, but it can also be used to scale in-out from stocks, crypto and to understand whether to use leverage or not.
The Sigmoid Allocation Dashboard helps you to dynamically adjust a portfolio allocation based on how much a market has dropped from its all-time high.
I've implemented it using a sigmoid (S-curve) function, that dynamically calculates the optimal allocation percentages. Depending on the market conditions, the S curves transition between defensive and aggressive allocations.
The Math Behind It (if you are a geek like me)
This indicator uses the sigmoid function to create smooth S-curve transitions:
α(D) = α_min + (α_max - α_min) × σ(k × (D - D_mid))
Where:
σ(x) = 1 / (1 + e^(-x)) ← Standard sigmoid function
You can also check it here:
// Sigmoid function: σ(x) = 1 / (1 + e^(-x))
sigmoid(float x) =>
1.0 / (1.0 + math.exp(-x))
// Alpha calculation: α(D) = α_min + (α_max - α_min) × σ(k × (D - D_mid))
calcAlpha(float drawdown, float k, float a_min, float a_max, float d_midpoint) =>
sig_input = k * (drawdown - d_midpoint) / 100.0
a_min + (a_max - a_min) * sigmoid(sig_input)
User parameters (you can tweak this):
Allocation Min (%): Your baseline allocation when markets are at ATH (default: 30%)
Allocation Max (%): Your maximum allocation during deep drawdowns (default: 100%)
D_mid (%): The drawdown level where you want to be at the midpoint (default: 25%)
Why do I like sigmoid and not a linear line?
Unlike linear models, the sigmoid creates "floors" and "ceilings" for your allocation. It transitions smoothly, no sudden jumps, and you never exceed your defined min/max bounds.
Understand the K Values (Steepness)
The K parameter controls how quickly your allocation shifts from defensive to aggressive.
Lower K (for example K=5) will give you a gradual transition, but at 0% drawdown you are already at a 46% allocation.
A higher like (like K=40) will give you a sharp transition, but at 0% drawdown you are close to the minimum allocation. On the other hand, a higher K will give close to 100% allocation when the markets are at new lows.
The example below illustrates this well, then the S&P 500 reached new lows in October 2022:
Different K values will affect the sigmoid curves (and you allocations differently). The chart below illustrates well how K affects the sigmoid curves:
Read the Dashboard
The main dashboard shows:
Current drawdown from ATH
Allocation % for each K value
Suggested action (Defensive → MAX LONG)
Use the Reference Chart
The static reference panel shows what your allocation would be at various drawdown levels (0%, 10%, 20%, 30%, 40%, 50%), helping you plan ahead.
Identify Zones
The color-coded chart background shows:
- 🟢 Green Zone: Aggressive positioning - "Buy the Dip"
- 🟡 Yellow Zone: Transition zone - Scaling in/out
- 🔴 Red Zone: Defensive positioning - Protect ya gains
Use Cases
Use case 1: Leveraged ETF Portfolio Management (this is my main use case)
When holding leveraged ETFs like TQQQ or UPRO, volatility makes it important to:
- Reduce exposure near all-time highs (when crashes hurt most)
- Increase exposure during drawdowns (when recovery potential is highest)
Example Strategy:
- At ATH: Hold 30% TQQQ, 70% cash/bonds or other uncorrelated assets
- At 25% drawdown: Hold 65% TQQQ, 35% cash/bonds
- At 40%+ drawdown: Hold 100% TQQQ
Use case 2: Diversified Leveraged Portfolio
Compare different K values for different assets:
- Use K = 10 for broad market (QQQ/SPY exposure via TQQQ/UPRO)
- Use K = 25 for sector bets (TECL, SOXL, TMF) that you want to scale into faster
Use case 3: Systematic Rebalancing Signals
Use the alerts to trigger rebalancing:
- Alert when K3 allocation crosses above 90% (time to add)
- Alert when drawdown exceeds your D_mid threshold
- Alert when market returns to within 5% of ATH
Tips for Best Results
It works best in longer time frames
Adjust the ATR lookback window
Match your risk tolerance level
I use this for index investing and stocks and haven't tried with crypto
Thanks for using the indicator and let me know if you have any feedback :)
- Henrique Centieiro
BTC - Standard of Living BenchmarkerOVERVIEW
Most traders track their wealth in USD or EUR — currencies that are structurally designed to lose value. This is a "Money Illusion." To understand if you are truly becoming wealthier, you must measure your Bitcoin not against fiat, but against the Standard of Living assets you eventually want to buy.
The Standard of Living Benchmarker is a macro-ratio engine that swaps the denominator of your chart. It answers the only question that matters for long-term wealth: "Is my Bitcoin stack gaining ground against the real world?"
THE "Stuff" BENCHMARKS
I have pre-selected four critical pillars of a high standard of living (that can be switched/cycled in the settings window):
• Gold: The historical baseline for "Hard Money" (TVC:GOLD).
• Equities: The primary engine of global productivity (S&P 500).
• Real Estate: Measured via the Vanguard Real Estate ETF (VNQ).
• Energy: The fundamental cost of human progress (Crude Oil).
THE CORE CALCULATION
The calculation is a simple, non-manipulated ratio:
• The Formula: Ratio = BTC_Price / Asset_Price
• This means: We are looking at the direct barter-rate between Bitcoin and the asset. For example, when the "Energy" mode is selected, the chart doesn't show dollars; it shows exactly how many Barrels of Oil one single Bitcoin can buy at today's close.
THE LIFESTYLE BASKET (The 5th Denominator)
Individual ratios tell you how Bitcoin is doing against one asset, but life isn't lived in a single asset. To solve this, I introduced the Lifestyle Basket .
What is a "Lifestyle Share"? A synthetic "Life Token" that represents a diversified slice of human prosperity. It is an equal-weighted basket consisting of:
• 25% Gold (Inflation Hedge)
• 25% S&P 500 (Global Growth)
• 25% Real Estate (Shelter)
• 25% Crude Oil (Energy/Consumption)
HOW TO READ THE CHART
• How to interpret the ratio: If the dashboard shows that 1 BTC buys 50 Lifestyle Shares , it means your Bitcoin stack has the purchasing power to acquire 50 equal units of the world's most critical assets.
• The Purchasing Power Line (Orange): When this line moves UP, Bitcoin is outperforming the real world. You are getting "wealthier" in a tangible sense. When it moves DOWN, your Bitcoin is losing purchasing power against that specific asset class.
• The Opportunity Zones: We plot a 200-day Mean with Standard Deviation bands.
• Upper Band (Red): Bitcoin is historically "Expensive" compared to the asset. This has historically been a high-probability zone to swap BTC for "Stuff" (Real Estate, Gold, etc.).
• Lower Band (Green): Bitcoin is "Cheap" compared to the asset. This is the zone where "Stuff" should be sold to acquire more Bitcoin.
WHY THIS IS "FRESH"
Unlike standard indicators that use RSI or MACD to find price momentum, this is a Macro-Audit . It ignores the noise of the US Dollar and focuses on the Ratio of Reality . It allows the "Infinite Hodler" to know when they are overextended in Bitcoin and when it is mathematically time to diversify into hard real-world assets.
DISCLAIMER
This script is for educational and macro-analytical purposes only. It does not constitute financial advice. Benchmarks are proxies for asset classes and may not reflect individual local prices (e.g., local real estate).
Tags: bitcoin, macro, gold, realestate, oil, benchmark, purchasing power, wealth, satoshi, Rob Maths, robmaths, Rob_Maths
Risk Management◼ Turtle Trading Risk Management
This script helps you size your position and manage your risk, using volatility, based on Turtle Trading Strategy.
If volatility is high, size will be smaller, if volatility is low, size will be larger.
It uses N=20 days, daily ATR (customisable), to calculate volatility.
If the account is in drawdown, reduces risk amount as per Turtle Trading rules.
You can display the full table, or a smaller compact table
Calculadora CFDs v1.2 - 2026MT5 Lot & Margin Calculator for CFDs (Multi-Asset)
General Description
This tool is designed for CFD traders using platforms like MetaTrader 5 who need a fast and accurate way to calculate lot size (volume) before entering the market. The calculator solves the issue of varying contract sizes across different assets (Oil, Natural Gas, Gold, Forex, etc.) and precisely calculates the margin withheld by the broker.
Key Features:
Customizable Database: Pre-configure up to 20 different assets with their respective Contract Sizes. Once set, the script automatically detects the chart's ticker and applies the saved parameters.
Note: To find the correct Contract Size, go to MT5, right-click on the asset, select "Specification," and look for the "Contract Size" value.
Exact Margin Management: Calculate exactly how many lots to enter in MT5 based on the specific USD amount you want the broker to set aside as collateral (Margin). This value is fully adjustable in the settings.
Smart Leverage Logic: Includes automated logic for standard 2026 industry leverage levels (1:50 Forex, 1:10 Energies/Metals, 1:15 Cash Indices, 1:2 Crypto), with a manual override option.
High-Contrast Visualization: A clean and professional table interface with adjustable positioning on the chart (Top Right/Left, Bottom Right/Left).
Real-Time Data: All calculations are performed using the live price and data source of the ticker currently displayed on your chart.
Instructions for Use:
In the "Inputs" tab, enter your frequent tickers (e.g., XTIUSD, NAT.GAS) and their contract sizes according to your broker's specifications.
Define the "Margin to Retain" (the amount in USD you wish to use as collateral for the trade).
The indicator will instantly display the MT5 LOT size to enter into your trading terminal.
Use the "Save as Default" option in the settings to ensure your 20 assets remain saved for future sessions.
Indian Equities Theme Tracker [EWT] - Sector Rotation HeatmapIdentify where the "Smart Money" is flowing in the Indian Markets.
The Indian Equities Theme Tracker is a powerful visual dashboard designed for NSE traders and investors to monitor sector rotation and relative strength in real-time. By tracking the most liquid Exchange Traded Funds (ETFs), this tool provides a birds-eye view of the Indian economy—from core benchmarks like Nifty 50 and Nifty 500 to high-growth themes like Defence, EV, Tourism, and Energy.
In modern markets, capital doesn't move into all stocks at once; it rotates between sectors. This script helps you spot the leaders and laggards across five different timeframes, ensuring you are always positioned in the strongest themes.
🚀 Key Features :
23+ Essential Themes: Tracks Broad Market, Market Caps (Mid/Small), Sectors (IT, Bank, Auto, Metal), and Narratives (Defence, Tourism, EV, Energy).
Dynamic Performance Sorting: Automatically reorders the table based on your selected lookback (1 Day, 1 Week, 1 Month, 3 Months, or YTD).
Heatmap Logic: Intuitive color coding helps you instantly identify extreme bullishness or bearishness across the board.
Liquidity Focused: Uses the most liquid NSE ETFs (BeES and equivalent) to ensure the data is accurate and reflects tradeable prices.
Pro UI Design: A clean, professional dashboard that can be positioned anywhere on your chart without cluttering your price action analysis.
📊 Themes Included :
Benchmarks: Nifty 500, Nifty 50, Nifty Next 50.
Market Caps: Midcap 150, Smallcap 250.
Sectors: Private & PSU Banks, IT, Pharma, Healthcare, FMCG, Auto, Metals, Infra, Realty.
Thematic/Narratives: Defence, Tourism, Energy, EV & New Age Automotive, Consumption.
Safe Havens: Gold & Silver.
🛠️ How to use :
Timeframe: Switch to the Daily (D) timeframe for the best results.
Settings: Use the inputs to change the table position (Top/Middle/Bottom) and the sorting criteria.
Strategy: Look for themes that are consistently at the top of the "1 Month" and "3 Month" lists—these are your structural leaders. Use "1 Day" to spot quick tactical bounces.
Disclaimer: This indicator is for educational and informational purposes only and does not constitute financial advice. Always perform your own due diligence.
TASC 2026.02 Portfolio Diversification█ OVERVIEW
This indicator is a simplified framework for analyzing hypothetical portfolios, based on the concepts in the February 2026 edition of the TASC Traders' Tips , "Foundational Portfolio Design, Not Stock-Picking”. It requests datasets for spread symbols that represent weighted combinations of user-selected or predefined instruments, compares the returns in the data to those of a selected benchmark, and calculates risk-related metrics.
█ CONCEPTS
One of the core concepts of portfolio design is diversification. A diversified portfolio distributes market exposure across multiple, ideally uncorrelated, instruments to reduce potential risks. Investors often diversify their portfolios by allocating capital to instruments from different classes, sectors, or regions rather than investing in only a single instrument or multiple related instruments.
As described in the article, the motivation behind creating diversified portfolios is simple:
"No single position should have the capacity to sink the entire portfolio."
This indicator estimates a portfolio's performance by requesting combined price data for spread symbols from user inputs or predefined options, and then analyzing the data's annual arithmetic returns alongside those of a specified benchmark instrument. It displays the returns of the spread and the benchmark in a table at the bottom left.
The indicator also displays the following metrics described in the article in a table at the bottom right of the pane for additional performance information:
Max drawdown: The maximum drop in the portfolio's value from a local peak.
Standard deviation: The dispersion of portfolio values relative to their mean.
Sharpe ratio: The ratio of excess returns in an investment compared to a hypothetical risk-free rate of return.
Pain index: A measure of risk based on the depth, duration, and frequency of losses. The metric in this script considers only the bars where drawdown is nonzero.
Ulcer index: A measure of downside risk based on the root mean square of drawdowns. The metric in this script considers only the bars where drawdown is nonzero.
Correlation: The Pearson correlation coefficient between the returns of the hypothetical portfolio and those of a selected benchmark.
The first five metrics are direct risk measures. The correlation metric helps assess whether the hypothetical portfolio closely follows the broader market. High correlation with a broad benchmark might indicate an elevated sensitivity to systematic risk.
█ USAGE
Users can select a combination of up to 10 symbols with specific weights to construct a hypothetical portfolio to analyze. Alternatively, users can select a predefined combination of symbols and weights based on the article's examples of optimized portfolios for different levels of risk tolerance.
The script plots the calculated returns from the selected combination and the benchmark instrument for visual comparison. It also generates tables to compare returns and display risk metrics.
Note: This indicator is intended to provide a simplified demonstration of portfolio concepts, and some metric calculations differ slightly from those in the article. The script does not produce any signals, and the calculated metrics are estimates intended for EOD timeframes such as 1D. If the hypothetical portfolio consists of instruments with different sessions, we recommend using 1W or a higher timeframe.
█ INPUTS
Benchmark: The symbol of the instrument to compare against the hypothetical portfolio.
Portfolio Type: Choose between named options for predefined portfolio configurations based on risk profiles outlined in the article. To create a custom portfolio from up to 10 symbols, select "Custom" and adjust the 10 sets of inputs below.
Risk-free rate: The hypothetical annual risk-free rate for the Sharpe ratio.
Periods per year: If not zero, the script uses the value as the number of bars per year for annualization, which affects Sharpe ratio and standard deviation metrics.
Display Toggles: The display for the returns and metrics tables can be toggled on or off.
Theme TrackerTheme Tracker is a clean, at-a-glance theme rotation dashboard built to help you quickly identify where money is flowing—and where it’s leaving—across the market’s most important macro, sector, and industry themes.
Instead of bouncing between dozens of charts, Theme Tracker tracks a curated basket of 40 major theme ETFs and displays their relative performance across multiple timeframes, so you can instantly spot leadership, momentum shifts, and early rotation.
What it shows
For each theme ETF, the table displays performance over:
1 Day
1 Week
1 Month
3 Months
Year to Date (YTD)
Themes are ranked automatically by the timeframe you choose, allowing you to focus on what matters most in the current market regime—short-term momentum, intermediate rotation, or longer-term trend leadership.
Why it’s useful
Market leaders change. Rotation happens quietly at first, then suddenly.
Theme Tracker helps you:
Find the strongest themes fast (the “winners” attracting capital)
Spot weakening themes early (distribution and risk-off rotation)
Confirm market tone by comparing offensive vs defensive leadership
Generate trade ideas by focusing on the themes that are already being bid up
Avoid laggards by seeing what’s consistently underperforming across timeframes
When a theme is strong across multiple timeframes, that’s often where momentum traders and institutions are concentrating exposure. When it’s weak across timeframes, that’s often where capital is exiting.
How to use it
1) Choose your sort timeframe
Use the Sort setting (1D / 1W / 1M / 3M / YTD) to rank themes based on your trading horizon.
2) Look for alignment
Strong across all columns = sustained leadership
Strong short-term, weak long-term = potential bounce / rotation attempt
Weak short-term, strong long-term = possible pullback in a leader
Weak across the board = consistent capital outflow
3) Pair with your chartwork
Use the strongest themes as a shortlist for deeper chart analysis, setups, and relative strength confirmation.
Visual design
The table uses clear formatting and heat-style shading to make it easy to read quickly. Green tones highlight strength; red tones highlight weakness—so you can interpret rotation in seconds without overthinking.
If you trade momentum, relative strength, or market structure, Theme Tracker gives you one of the simplest edges available: knowing what’s leading right now. Track the best-performing themes, identify emerging rotation, and stay aligned with the areas of the market where capital is actually moving.
Momentum Screener: 1M/3M/52W HighThis script is a specialized momentum-tracking tool designed to identify "Stage 2" breakout candidates and high-growth stocks. It filters for three specific technical strengths simultaneously, ensuring you are only looking at tickers with both short-term explosive growth and long-term trend confirmation.
AuditLens - Profit Quality Analyzer📊 AuditLens - Profit Quality Analyzer
Ever wonder if a company's profits are real or just accounting tricks?
This indicator helps you spot potential earnings manipulation by analyzing the gap between reported profits and actual cash generation.
━━━━━━━━━━━━━━━━━━━━━━━━
🔍 WHAT IT DOES
━━━━━━━━━━━━━━━━━━━━━━━━
Calculates the "Divergence Ratio":
(Net Income - Operating Cash Flow) / Total Assets
• Positive divergence = Profits NOT backed by cash (risky)
• Negative divergence = Cash exceeds profits (healthy "cash cow")
━━━━━━━━━━━━━━━━━━━━━━━━
🚦 SIGNAL GUIDE
━━━━━━━━━━━━━━━━━━━━━━━━
🔴 RED FLAG (>10%): High risk - possible aggressive revenue recognition
🟠 ORANGE: Divergence trending up for 3+ quarters
🟡 YELLOW: Divergence trending up for 2+ quarters
🟢 GREEN (<-5%): "Cash Cow" - strong cash generation
✅ HEALTHY (0 to -5%): Normal profit quality
━━━━━━━━━━━━━━━━━━━━━━━━
📈 HOW TO USE
━━━━━━━━━━━━━━━━━━━━━━━━
1. Add to any stock chart
2. Check the summary table (top right)
3. Look for RED FLAGS before buying
4. Prefer stocks with negative divergence (cash cows)
━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ FAMOUS EXAMPLES
━━━━━━━━━━━━━━━━━━━━━━━━
• Enron (2001): Showed profits but burned cash → Bankruptcy
• Wirecard (2020): €1.9B "cash" that didn't exist → Fraud
• Luckin Coffee (2020): Fake revenue, no cash backing → Delisted
This indicator would have flagged all of them.
━━━━━━━━━━━━━━━━━━━━━━━━
🔗 FULL VERSION
━━━━━━━━━━━━━━━━━━━━━━━━
Want more detailed analysis with:
• 6 advanced audit rules
• Historical trend analysis
• Receivables & Inventory checks
• Detailed reports for any stock
👉 Try the full version FREE: auditlens-check.netlify.app
━━━━━━━━━━━━━━━━━━━━━━━━
📚 THE LOGIC
━━━━━━━━━━━━━━━━━━━━━━━━
Based on forensic accounting principles:
- Companies can manipulate earnings (accruals)
- But cash flow is harder to fake
- Big gap between the two = potential red flag
This is NOT financial advice. Always do your own research.
━━━━━━━━━━━━━━━━━━━━━━━━
Built by AuditLens team 🔍
Questions? DM or comment below.






















