VWMA Cross Buy SignalCore Components & Logic
1. The Entry Engine (VWMA + Filters)
The strategy triggers a long signal when a Volume Weighted Moving Average (VWMA) crossover occurs.
Unlike a standard Simple Moving Average, the VWMA gives more weight to bars with higher volume. This ensures the indicator responds faster to "Smart Money" moves and slower to low-volume noise.
It uses a secondary Trend Filter (defaulting to the 200 EMA). By only buying when the price is above this line, the indicator forces you to stay on the right side of the primary market trend.
It requires volume to be higher than its recent average (e.g., 1.1× or 10% higher). This prevents entries on weak, low-conviction price moves.
2. The Dynamic Exit System
You have two distinct ways to manage your risk and targets, toggleable in the settings:
ATR Based (Volatility Adjusted): It calculates the Average True Range (ATR) to determine how volatile the stock is. By setting your Stop Loss at 2.0×ATR, you avoid getting "shaken out" by normal daily price fluctuations. The Take Profit is set at 4.4×ATR to capture large trend extensions.
Fixed % (Static): A more rigid approach where you set a hard percentage target (e.g., 10% gain / 5% loss).
3. The Performance Analytics Table
The grey minimalist table in the bottom-right corner uses cumulative percentage-based math to show:
Realized RRR: The actual Reward-to-Risk ratio based on your closed trades.
Break-Even Win Rate: The minimum win rate you need to stay profitable with your current RRR. It uses the formula:
BE WR=1+RRR1
Current Win Rate: Highlighted in Green if you are beating the Break-Even rate, or Red if the strategy is currently losing money on that specific stock.
Max Drawdown %: The most important metric for risk. It shows the largest peak-to-trough decline in your equity curve, letting you know how much losing streak can hurt your equity.
Strategic Use Case
This indicator is optimized for Stock Screening. When you flip through your watchlist, the table updates instantly.
If you see a stock with a high Win Rate and a Max Drawdown under 10%, you have found a ticker where the VWMA crossover logic is highly compatible with that stock's specific volatility. If the Win Rate cell is Red, you know the strategy is "un-tuned" for that asset and needs adjustment.
Statistics
Adaptive Market Regime Engine - AMR [1.2.0]An analysis and decision framework for traders who want to understand what their strategy can truly deliver in real market conditions.
Note: This script loads in a neutral state.
Performance depends entirely on the selected setup and market regime.
From Backtest to Market Reality
Many traders are familiar with the same situation:
In backtesting, a strategy appears stable – smooth equity curve, clean metrics.
In live trading, drawdowns, uncertainty, and emotional decisions follow.
Then the strategy gets optimized, replaced, or abandoned – often exactly when the market would have started to adapt again.
The problem is rarely the strategy itself.
It is the missing market context in which it is applied.
AMR was developed to close this gap:
Trading ideas are not viewed in isolation, but systematically classified into market regimes and market phases – with a realistic view on risk, drawdowns, and capital impact.
Market as a Regime – Not a State
The market is not a static environment.
It continuously shifts between different regimes, each placing different demands on strategies.
AMR continuously classifies the market into structured phases, including:
Squeeze – low volatility, transition and buildup phases
Strong Trend (Bull / Bear) – clear directional movement with statistical edge
Weak Trend – directional bias with increased pullbacks
Range – sideways markets with limited opportunity
Neutral – transition phases without a clear advantage
All trades, metrics, and evaluations are always viewed within the context of these phases.
This creates understanding of:
why trades occur or are deliberately avoided
why drawdowns happen
why a setup may temporarily underperform without being fundamentally flawed
Four Analysis Modes – Four Perspectives on the Same Setup
Setup Mode – The Strategy Itself
In Setup Mode, you develop and analyze your trading idea independently of account size.
Here you define and test, among other things:
Entry and exit logic
ATR-based exits, trailing stops, fixed take-profits, breakeven rules
Re-entry concepts for trend continuation
phase-dependent parameters
Core question:
Is this trading idea logical, consistent, and technically robust?
Portfolio Mode – Capital Reality
Portfolio Mode translates a setup into a realistic account simulation.
It visualizes:
equity curve development
maximum drawdown (absolute and percentage)
capital exposure
risk development over time
Core question:
How does this setup actually affect my capital?
Heatmap Mode – The Time Test
Heatmap Mode evaluates performance over time, not just as an aggregate result.
It shows:
strong and weak months
recurring drawdown phases
periods without trades
recovery phases after losing streaks
Core question:
Which weak phases are structurally part of this setup – and what must a trader be able to endure during these periods?
Live Mode – Understanding the Current Market Environment
Live Mode analyzes the market in real time.
It shows:
the current market regime
active or inactive setup conditions
concrete reasons for “no-trade” phases
re-entry status and timing logic
Goal:
Not just seeing trades, but understanding why trades are taken – or consciously avoided.
Position Sizing & Kelly Reference
Many traders optimize entries and exits but underestimate the impact of position sizing.
AMR integrates the Kelly principle as a reference model to:
contextualize expectancy and risk
compare fixed position sizes with dynamic weighting
identify whether drawdowns stem from the strategy or from position sizing
Kelly is neither a recommendation nor a requirement, but an analytical tool to evaluate one’s own risk management.
Validated Starter Setups & Private Community
At launch, every AMR subscriber receives three validated and currently live-traded setups.
These setups include:
complete parameter configurations
clear market phase classification
defined risk and exit structures
They serve as real-world references for how a robust setup is constructed.
Additionally, all users gain access to a private Telegram group.
This group is not a signal service.
It is intended as a shared workspace and exchange environment.
Every trader favors different markets and timeframes and brings individual account sizes, time horizons, and mental resilience.
What does not fit one trader may be ideal for another.
From this context emerges a rich and continuously growing pool of real, field-tested trading setups, from which each trader can select the strategies that best fit their style, capital, and mental strength.
Technical Integrity & Data Stability
AMR operates with:
non-repainting signals
realistic costs (fees & slippage)
stable backtests
Who AMR Is Designed For
AMR is built for traders who:
systematically develop their own strategies
actively incorporate market phases into decision-making
seek to understand drawdowns instead of reacting emotionally
aim for long-term consistency
Guiding Principle
You design your strategy.
AMR shows how it behaves across real market phases – and what those decisions mean for your trading account.
Past performance ≠ future results.
Sri - Auto Swing Fib Plus (Trend-Aware | Custom TF Labels)📌 Sri – Auto Swing Fib Plus (Trend-Aware | Custom TF Labels)
Advanced Automatic Swing-Based Fibonacci Tool With Multi-Timeframe Trend Awareness
Sri – Auto Swing Fib Plus is a next-generation swing-based Fibonacci mapping tool designed for professional price-action traders.
Unlike classical static Fibonacci drawings, this indicator automatically detects true market swings, adapts to timeframe conditions, and labels Fibonacci levels dynamically using non-repainting pivot logic.
This is not a simple Fib drawing.
It uses a unique trend-aware swing engine that updates levels only when a confirmed pivot forms on the selected timeframe (CTF).
Because this logic is proprietary and significantly different from the hundreds of open-source Fibonacci scripts, this version is protected.
🔍 What This Indicator Does
✔ 1. Automatic Swing Detection (Non-Repainting)
The script uses:
ta.pivothigh() and ta.pivotlow()
executed on a custom timeframe via request.security()
with lookahead_off to ensure fully non-repainting behaviour.
Only the most recent CONFIRMED swing high and low are stored and used for fib calculations.
This eliminates “floating” or repainting Fib levels that many other indicators suffer from.
✔ 2. Auto-Timeframe (CTF) System
The indicator includes a full automatic timeframe engine:
Chart TF Auto CTF Selected
≤ 1D 1D
1D 1W
1W 1M
>1W 1M
This ensures Fib swings are always taken from a higher timeframe than the chart for:
Clean structure
Reduced noise
Better major swing detection
You can also switch to Manual Mode to choose any TF.
✔ 3. Trend-Aware Fibonacci Mapping
Trend direction is identified by comparing:
The bar index of last confirmed high
The bar index of last confirmed low
This creates:
Uptrend Fib map (low → high)
Downtrend Fib map (high → low)
The Fib levels included:
0%
38.2%
50%
61.8%
78.6%
100%
These levels update automatically as soon as a new pivot confirms.
✔ 4. Auto-Labeling System
Each Fibonacci level is labeled with:
Tiny label size
Color coding
Automatic directional placement
Furthermore, if the user sets a negative label offset, the label orientation reverses automatically (right/left).
This prevents overlapping labels on various chart layouts.
🎯 What Makes This Script Unique
There are hundreds of Fibonacci scripts on TradingView, but this script is different because it combines:
⭐ MTF Non-Repainting Swing Engine
Most public scripts plot Fib levels on the current timeframe only.
This script extracts swing structure from higher TFs, providing significantly stronger swing reliability.
⭐ Trend-Aware Fib Direction Mapping
Instead of plotting Fib levels blindly, the indicator flips direction based on the actual structure, not just price movement.
⭐ Dynamic Auto-Label Logic With Orientation Handling
Tiny labels, auto clean-ups, reversible layout, and visual consistency make it ideal for minimalistic price action charts.
⭐ Pure Pivot-Based Logic, Not ZigZag or Fractals
ZigZag-based Fibs repaint heavily.
This script uses confirmed pivots only, ensuring stable and trustworthy levels.
⭐ Fast performance with maximum label control
The script refreshes labels every 5 bars only, reducing clutter and improving chart performance.
These features collectively justify keeping the script closed-source.
📘 How to Use
1. Select CTF Mode
Auto Mode (Recommended)
Automatically chooses the best swing timeframe for your chart.
Manual Mode
Choose any timeframe (ex: 1D, 4H, 1W) to control the swing calculation.
2. Look for Major Reversal Points
The indicator highlights the true structure swing used for Fib mapping.
3. Use Fibonacci Levels for:
Pullback entries
Continuation confirmation
Breakout targets
Stop-loss placement
Trend continuation vs reversal identification
4. Combine with Your Strategy
This indicator works exceptionally well with:
Swing trading
Trend following
Liquidity zones
S/R trading
Wave analysis
Market structure tools
⚠ Important Notes
No repainting (confirmed pivots only)
Works on all assets and all timeframes
Labels automatically reverse when negative offset is used
Designed for clean, minimalistic price charts
📌 Final Summary
Sri – Auto Swing Fib Plus gives traders an intelligent, trend-aware Fibonacci plotting system that updates dynamically, respects structure, and adapts to multi-timeframe environments — offering precision far beyond standard Fib tools.
This is a unique, proprietary swing-engine, not a clone of existing public Fibonacci indicators.
Sri - MACD with Smoothed EMA Sri – MACD with Smoothed EMA (Auto-TF, Offset, Sensitivity Engine)
This indicator is an enhanced and more flexible version of the classic MACD, redesigned for traders who want higher-level control, smoother trend detection, and improved readability across different chart timeframes.
Unlike the standard MACD, this version introduces Auto-Timeframe Logic, Sensitivity Scaling, and a Smoothed EMA Envelope around the MACD line, giving traders a more consistent and stable momentum view across intraday and higher-timeframe environments.
✨ What Makes This MACD Unique
This script is not a simple recreation of the open-source MACD.
It adds multiple proprietary layers that change the underlying behaviour:
1. Auto-Timeframe Engine
The indicator automatically switches the MACD timeframe depending on chart conditions:
If the chart is ≤ 15 minutes, the MACD calculation automatically uses 1-Hour (60-min) data.
Otherwise, it uses the chart’s native timeframe.
This makes the signal more stable on low-timeframe charts and reduces noise.
This feature is not available in standard MACD implementations.
2. Sensitivity-Based Scaling (Trend Zoom)
The script includes a Zoom engine that “amplifies or compresses” MACD and Signal values:
Higher sensitivity highlights micro-swings
Lower sensitivity smooths out noise for cleaner macro-signals
This custom scaling approach provides a different look & feel than standard MACD outputs.
3. Hi-Line Offset (Vertical Shift Controller)
Traders can vertically shift the MACD cluster up or down using an offset value.
This is extremely useful when:
Combining multiple oscillators in the same pane
Wanting more visual space
Aligning the indicator with multi-indicator layouts
This is also not found in the standard MACD.
4. Smoothed MACD EMA Overlay (50-EMA Cloud)
The script optionally adds a Smoothed MACD EMA, forming a type of momentum envelope:
Helps track longer-term MACD momentum
Filters fake crossovers
Highlights periods where MACD momentum is flattening or accelerating
This extra smoothed layer provides a proprietary visual trend-tracking component.
5. Color-Coded MACD–Signal Fill
Areas between MACD & signal are shaded:
Blue when MACD is above Signal (bull momentum)
Orange when MACD is below Signal (bear momentum)
This makes momentum direction instantly visible at a glance.
📌 How the Indicator Works (Conceptual Explanation)
Without revealing proprietary code, here is the conceptual flow:
Determine the operative timeframe
A custom auto-TF engine selects a 60-minute MACD for smaller charts or remains native on higher charts.
Compute the MACD and Signal lines
Using user-selected MA types (EMA or SMA).
Apply Sensitivity Scaling
Both MACD and Signal values are zoomed or compressed using a sensitivity factor.
Apply Vertical Offset
The entire MACD structure is shifted up or down using a Hi-Line Offset.
Smooth the MACD using a 50-period EMA
This forms a momentum backbone that helps identify trend continuation vs exhaustion.
Plot MACD, Signal, Smoothed EMA, and Color-Fill
The indicator visually represents trend health, crossovers, divergence behavior, and momentum cycles.
📊 How to Use the Indicator
Trend Direction
MACD > Signal → Bullish momentum
MACD < Signal → Bearish momentum
Trend Strength
Large separation between MACD & Signal → Strong push
Tight clustering → Consolidation or transition zone
Smoothed EMA Interpretation
MACD above Smoothed EMA → Uptrend bias
MACD below Smoothed EMA → Downtrend bias
When Smoothed EMA flattens → Upcoming trend pause or reversal
Sensitivity Settings
Scalpers use higher sensitivity
Swing traders use lower sensitivity
Position traders use default or minimal sensitivity
Offset Use-Cases
Combine with RSI / PMO in the same pane
Manage layout when using multi-oscillator templates
Improve clarity on smaller monitors or laptop screens
Median Anchor Oscillator [ALPHA]ALPHA – Median Anchor Oscillator
A clean, outlier-resistant z-score oscillator built around a rolling median (not mean) and Median Absolute Deviation (MAD) instead of standard deviation.
Key features:
- Green/red histogram shows deviation strength from the median anchor
- Dashed lines at ± threshold (default 2.5 – adjustable)
- Optional purple fill for extreme zones
- Auto-scales perfectly (no price squish on BTC or high-value assets)
Ideal for mean-reversion traders spotting overextension or "gravity" pullbacks.
SHORT = breaching top dashed line (red)
LONG = breaching bottom dashed line (green)
Use with a MACD or RSI for those divergence signal confirmations.
This is ALPHA – early version, still tuning.
Companion overlay suite (medians, pivot, signals, RSI overlay) coming in future, possible standalone update(s).
Feedback / suggestions very welcome!
Tags: z-score, median, oscillator, mean-reversion, BTC, crypto, deviation
Crypto Exhange Rank BTC/ETHShows the rank from 1-5 between the main spot pairs of crypto exchanges. Works for BTC and ETH.
Coinbase PremiumShows the Coinbase Premium over Binance adjusted for USDT peg. Works for ETH and BTC.
Crosses Open Daily (shock points OD)It is an indicator that works to alert you when an asset, during the day, crosses or approaches the daily open again.
Teemo Volume Delta & Market HUDTeemo Volume Delta & Market HUD
Description:
Teemo Volume Delta goes beyond simple volume indicators to provide expert-level analysis of Buy and Sell pressure within the market. It visualizes supply/demand imbalances inside candles and provides an immediate grasp of market control via a real-time HUD.
With the v1.2.0 update, we have removed unnecessary overlays (like EMAs) to focus on Pure Delta Analysis and a flexible Smart Accumulation System, making the tool lighter and more powerful.
🚀 Key Features
1. Dual Calculation Modes Offers two calculation methods tailored to your trading environment and goals:
Estimation: Rapidly estimates buy/sell volume based on candle shape (OHLC) and price range. It features fast loading times and works instantly on all assets.
Intraday: Analyzes lower timeframe data (e.g., 1-minute bars) to calculate the precise delta of the current timeframe. (Loading time may vary depending on TradingView data limits.)
2. Smart Accumulation System Supports strategic analysis beyond simple summation with two distinct modes:
Time Based: Resets the Cumulative Delta to 0 at specific intervals (e.g., every 4 hours, Daily). This is optimized for session-based analysis or day trading.
Infinite: Continuously accumulates data without resetting, ideal for analyzing long-term Divergences between price and delta.
3. Intuitive HUD (Heads-Up Display) Displays critical market data on the chart for instant decision-making:
Delta Panel: Shows real-time Buy/Sell volume and Net Delta for the current candle.
Market HUD: Provides a comprehensive view of Trend Strength (ADX), Momentum (RSI), and the Cumulative Buy/Sell status for the current period.
4. Teemo Design System (v1.2) Provides optimized color themes for visual comfort during long trading sessions:
Teemo Neon: High-contrast Mint/Purple theme optimized for dark backgrounds.
Classic Soft: A calming Soft Green/Red theme designed to reduce eye strain (Recommended for all backgrounds).
⚙️ Settings Guide
Calculation Mode: Choose between Estimation (Speed) or Intraday (Precision).
Accumulation Mode: Choose Time Based (Periodic Reset) or Infinite (Continuous).
Reset Period: Set the reset interval for Time Based mode (e.g., 1D = Daily Reset).
Color Preset: Select between Teemo Neon or Classic Soft themes.
💡 Trading Tips
Delta Divergence: If the price makes a higher high but the Cumulative Delta (HUD) makes a lower high, it signals weakening buying pressure and a potential reversal.
Candle Coloring: A solid Mint (or Green) candle body indicates a price rise accompanied by strong actual buying volume, offering higher reliability than standard candles.
HUD Confluence: Consider trend-following entries when the ADX is above 25 and the Delta is heavily skewed in one direction.
This indicator is for informational purposes only and does not constitute financial advice. The Estimation mode provides approximations based on algorithms, and the Intraday mode's accuracy depends on the quality of the lower timeframe data provided by the exchange.
Developed by Teemo Trading Systems
------------------------------------------------------------------------
Teemo Volume Delta & Market HUD
설명 본문:
Teemo Volume Delta는 단순한 거래량 지표를 넘어, 시장 내부의 매수(Buy)와 매도(Sell) 압력을 정밀하게 분석하는 전문가용 도구입니다. 캔들 내부의 수급 불균형을 시각화하고, 실시간 HUD를 통해 시장의 주도권이 누구에게 있는지 즉각적으로 파악할 수 있도록 돕습니다.
v1.2.0 업데이트를 통해 불필요한 보조지표(EMA)를 제거하고, 순수한 델타 분석과 유연한 누적(Accumulation) 시스템에 집중하여 더욱 가볍고 강력해졌습니다.
🚀 주요 기능 (Key Features)
1. 듀얼 계산 모드 (Dual Calculation Modes) 사용자의 환경과 목적에 맞춰 두 가지 계산 방식을 제공합니다.
Estimation (추정 모드): 캔들의 형태(OHLC)와 가격 변동폭을 기반으로 매수/매도 볼륨을 빠르게 추정합니다. 로딩 속도가 빠르며 모든 자산에 즉시 적용 가능합니다.
Intraday (정밀 분석 모드): 하위 타임프레임(예: 1분봉)의 데이터를 분석하여 상위 타임프레임의 델타를 정밀하게 계산합니다. (TradingView 데이터 제한에 따라 로딩 시간이 소요될 수 있습니다.)
2. 스마트 누적 시스템 (Smart Accumulation) 단순 누적을 넘어, 전략적 분석을 위한 두 가지 모드를 지원합니다.
Time Based: 지정한 주기(예: 4시간, 1일)마다 누적 델타를 **0으로 초기화(Reset)**합니다. 세션별 수급 분석이나 데이 트레이딩에 최적화되어 있습니다.
Infinite: 초기화 없이 데이터를 계속 누적하여, 장기적인 가격과 델타의 **다이버전스(Divergence)**를 분석하는 데 유용합니다.
3. 직관적인 HUD (Heads-Up Display) 차트 우측과 좌측에 핵심 정보를 요약하여 보여줍니다.
Delta Panel: 현재 캔들의 매수/매도 거래량과 순매수(Net Delta) 상태를 실시간으로 표시합니다.
Market HUD: ADX(추세 강도), RSI(모멘텀), 그리고 현재 구간의 누적 매수/매도 현황을 한눈에 볼 수 있습니다.
4. Teemo Design System (v1.2) 장시간 차트를 보는 트레이더를 위해 시인성이 뛰어난 컬러 테마를 제공합니다.
Teemo Neon: 어두운 배경에 최적화된 고대비 민트/퍼플 테마.
Classic Soft: 눈의 피로를 줄여주는 차분한 그린/레드 테마 (밝은/어두운 배경 모두 추천).
⚙️ 설정 가이드 (Settings)
Calculation Mode: Estimation(속도 중심) 또는 Intraday(정확도 중심) 중 선택.
Accumulation Mode: Time Based(주기별 리셋) 또는 Infinite(무한 누적) 선택.
Reset Period: Time Based 모드 사용 시 리셋할 주기 설정 (예: 1D = 매일 리셋).
Color Preset: Teemo Neon 또는 Classic Soft 테마 선택.
💡 활용 팁 (Trading Tips)
델타 다이버전스: 가격은 신고가를 갱신하지만 누적 델타(Cum Delta)는 낮아진다면, 매수세가 약화되고 있다는 강력한 반전 신호입니다.
캔들 컬러링: 캔들의 몸통 색상이 짙은 민트색(또는 그린)이라면 강력한 매수세가 동반된 상승을 의미하며, 신뢰도가 높습니다.
HUD 활용: ADX가 25 이상이면서 델타가 한쪽 방향으로 쏠릴 때 추세 매매를 고려하세요.
이 지표는 정보 제공의 목적으로만 사용되며, 재정적 조언이 아닙니다. Estimation 모드는 근사치를 제공하며, Intraday 모드는 거래소에서 제공하는 하위 데이터의 품질에 따라 정확도가 달라질 수 있습니다.
Apex-Wallet - Risk & Reward Calc (Futures/Prop-Firm)Overview The Apex Risk & Reward Calc is a specialized utility tool designed for Futures traders, particularly those working with Prop Firms (Apex, MyFundedFutures, etc.). It eliminates the need for manual calculations by providing an instant, clear visualization of your Risk/Reward parameters directly on the chart.
How it works Trading Futures (ES, NQ, MES, MNQ) requires knowing exactly how many ticks correspond to your financial target. This script automatically detects the active instrument and calculates the precise number of ticks needed for both your Take Profit (TP) and Stop Loss (SL) based on your desired cash outcome and chosen ratio.
Key Features:
Automatic Ticker Recognition: Supports ES, NQ, MES, and MNQ with built-in tick values.
Cash-Based Planning: Enter your desired profit in dollars (e.g., $50), and the script tells you the required tick move.
Dynamic Ratio Selection: Choose from 9 different R:R ratios (from 1/5 to 5/1) to instantly see the impact on your Stop Loss.
Compact Professional UI: A clean, 3-column dashboard at the bottom-right of your screen showing active lots, ticks, and gross cash values.
Trading Application Perfect for intraday scalpers who need to set their ATM strategies in platforms like Tradovate or NinjaTrader. It ensures your execution remains consistent with your risk management plan.
IVQ - Seasonal Scanner Indices & FX FuturesIVQ - Seasonal Scanner Indices & FX Futures
Scans the Indices & FX Futures market for the strongest seasonal patterns based on historical data. Ranks upcoming seasonal windows by win rate, duration, and time period, and presents all results in clear tables for efficient market selection in TradingView.
invoriaquant.onepage.me
IVQ - Seasonal Scanner Metals & EnergyIVQ - Seasonal Scanner Metals & Energy
Scans the Metals & Energy market for the strongest seasonal patterns based on historical data. Ranks upcoming seasonal windows by win rate, duration, and time period, and presents all results in clear tables for efficient market selection in TradingView.
invoriaquant.onepage.me
IVQ - Seasonal Scanner AgrarIVQ - Seasonal Scanner Agrar
Scans the Agrar market for the strongest seasonal patterns based on historical data. Ranks upcoming seasonal windows by win rate, duration, and time period, and presents all results in clear tables for efficient market selection in TradingView.
invoriaquant.onepage.me
IVQ - Seasonal Scanner Forex Part 2IVQ - Seasonal Scanner Forex Part 2
Scans the Forex market for the strongest seasonal patterns based on historical data. Ranks upcoming seasonal windows by win rate, duration, and time period, and presents all results in clear tables for efficient market selection in TradingView.
invoriaquant.onepage.me
Calculadora CFDs v1.1MT5 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.
IVQ - Seasonal Scanner Forex Part 1IVQ - Seasonal Scanner Forex Part 1
Scans the Forex market for the strongest seasonal patterns based on historical data. Ranks upcoming seasonal windows by win rate, duration, and time period, and presents all results in clear tables for efficient market selection in TradingView.
invoriaquant.onepage.me
IVQ - Pine ScreenerIVQ – Pine Screener
A non-visual screening tool designed exclusively for market scanning. Evaluates hundreds of assets using custom Pine Script logic, combining valuation, supply & demand, price action filters, and optional COT conditions. Delivers a structured list of qualifying markets without plotting charts, enabling efficient and systematic setup identification directly in TradingView.
invoriaquant.onepage.me
IVQ - Valuation Multi-Asset ScannerIVQ – Val Multi-Asset Scanner
Analyzes multiple asset classes using a unified quantitative valuation framework. Compares assets across key reference markets (e.g. USD, Gold, Bonds) and ranks them by relative over- and undervaluation using a combined score. Provides a clear, cross-market overview to identify extremes and relative value opportunities directly in TradingView.
invoriaquant.onepage.me
IVQ - Valuation Forex ScannerIVQ – Val FX Scanner
Scans the Forex market using a quantitative valuation model that compares currencies against key reference assets such as the USD Index, Gold, and US Bonds. Ranks FX pairs by relative over- and undervaluation using a combined score, enabling efficient market selection and contextual analysis directly in TradingView.
invoriaquant.onepage.me
IVQ - Seasonal ChartIVQ – Seasonal Chart
Visualizes the average seasonal performance of an asset based on historical price data. Displays multiple configurable seasonality curves with different lookback periods, highlights recurring annual patterns, and helps identify statistically relevant phases directly in TradingView.
invoriaquant.onepage.me
IVQ - Next Seasonal ScannerIVQ – Next Seasonal Scanner
Automatically identifies upcoming seasonal time windows with a statistical edge based on historical data. Filters setups by win rate, duration, and analysis period, and highlights potential long and short opportunities directly in TradingView.
invoriaquant.onepage.me
Multi Schedules ArrowsYou can enter the date and time of anomaly data as a parameter to display arrows and alerts.
Institutional Portfolio Timeline Suite [JOAT]Institutional Portfolio Timeline Suite is a Pine Script v6 overlay indicator that brings institutional-grade portfolio analytics, risk metrics, and multi-timeframe price levels directly to your TradingView chart. It combines real-time position tracking, quantitative risk analysis, correlation monitoring, and position sizing into one cohesive dashboard system.
Note: This script is published as an invite-only INDICATOR. It does not generate backtesting results or automated trade execution. Access requires authorization through the script's access control settings.
## Why This Script Merits Invite-Only Protection
This indicator integrates multiple analytical dimensions that institutional traders typically access through expensive terminal subscriptions or custom-built systems. The value proposition lies in the specific integration methodology and the quantitative calculations that synthesize:
Real-time portfolio tracking with up to 8 positions across any asset class
Institutional risk metrics including Sharpe Ratio, Portfolio Beta, Value at Risk, and Max Drawdown
Pearson correlation matrix showing relationships between your first 4 positions
Risk-based position sizing calculator with ATR-derived stop suggestions
Multi-timeframe timeline levels showing D/W/M/Y opens and previous highs/lows
Period boundary separators for visual timeframe context
Session-based volatility statistics for intraday analysis
Automatic rebalancing alerts when position weights drift beyond threshold
Premium visual design with metallic gradient headers and glowing color themes
The proprietary elements include the weighted portfolio return calculation methodology, the correlation matrix implementation using Pearson coefficients, the VaR calculation with configurable confidence levels and horizons, and the visual integration that maintains readability while providing comprehensive data. While individual metrics like Sharpe Ratio exist as concepts, their specific implementation for multi-asset portfolios within Pine Script, combined with the visual dashboard system, represents original development work that justifies source code protection.
## How Components Work Together
The indicator's value comes from how its modules interact, not from any single component:
Data Flow:
Portfolio engine fetches real-time prices for all enabled positions using non-repainting request.security calls
Return calculations use confirmed bar data (close with lookahead_on) to prevent repainting
Risk metrics engine calculates weighted portfolio returns based on position values
Correlation matrix computes Pearson coefficients between position return series
Position sizer calculates optimal size based on account risk parameters and current price
Timeline engine fetches D/W/M/Y opens and previous highs/lows with taken-level detection
Session stats track volatility by time-of-day for intraday charts
Integration Logic:
Each module feeds into a unified dashboard system:
Portfolio returns are weighted by position market value, not equal-weighted
Risk metrics use the weighted return series for accurate portfolio-level calculations
Correlation uses individual position returns to identify concentration risk
Rebalancing alerts compare current weights against target weights you define
Timeline levels track whether price has "taken" each level for visual dimming
Why This Integration Matters:
A standard portfolio tracker shows positions. This indicator shows how those positions interact, what risk they collectively represent, and when you need to rebalance. The multi-dimensional analysis separates this from simple position lists that display data without synthesis.
## Core Functionality
This indicator addresses the challenge of managing a portfolio while actively trading. Most traders either use external tools for portfolio analysis or ignore portfolio-level risk entirely. This script brings institutional analytics directly to your chart.
What This Script Does:
Tracks up to 8 positions with symbol, quantity, average cost, and target weight
Calculates real-time PnL in dollars and percentage with color-coded backgrounds
Computes Sharpe Ratio using annualized returns and configurable risk-free rate
Calculates Portfolio Beta against a configurable benchmark (default: SPY)
Estimates Value at Risk at 90%, 95%, or 99% confidence over configurable horizon
Tracks Max Drawdown and High Water Mark for portfolio performance monitoring
Displays correlation matrix showing relationships between your first 4 positions
Provides position sizing calculator based on account size and risk percentage
Draws D/W/M/Y opens and previous highs/lows with configurable lookback
Shows period boundary separators for visual timeframe context
Analyzes session volatility for intraday trading optimization
Alerts when position weights drift beyond your rebalancing threshold
## Technical Architecture
### Portfolio Tracking Engine
The indicator tracks up to 8 positions with comprehensive data for each:
Symbol - Any TradingView symbol (stocks, crypto, forex, futures, indices)
Quantity - Number of shares/units held (supports fractional)
Average Cost - Your cost basis for PnL calculation
Target Weight - Desired portfolio allocation percentage for rebalancing
Currency Override - Optional currency for FX conversion to base currency
Price data is fetched using non-repainting request.security calls with close and lookahead_on to ensure historical accuracy. The portfolio table displays:
Current price with real-time updates
Market value (Qty x Price x FX Rate)
PnL in dollars and percentage
Current weight vs target weight
Visual highlighting when weight drift exceeds threshold
### Risk Metrics Engine
The risk panel calculates institutional-grade metrics from your weighted portfolio returns:
Sharpe Ratio
Formula: (Annualized Portfolio Return - Risk-Free Rate) / Annualized Volatility
Portfolio return is value-weighted across all positions
Annualized by multiplying daily return by 252 and volatility by sqrt(252)
Color-coded: Green >= 1.5, Yellow >= 0.5, Red < 0.5
Requires minimum 20 data points for calculation
Portfolio Beta
Formula: Covariance(Portfolio, Benchmark) / Variance(Benchmark)
Configurable benchmark symbol (default: SPY)
Measures systematic risk relative to market
Color-coded: Green < 0.7 (defensive), Neutral 0.7-1.3, Red > 1.3 (aggressive)
Value at Risk (VaR)
Formula: Z-score x Portfolio Volatility x sqrt(Horizon Days)
Z-scores: 90% = 1.282, 95% = 1.645, 99% = 2.326
Configurable confidence level and time horizon
Represents maximum expected loss at confidence level
Color-coded: Green < 2.5%, Yellow 2.5-5%, Red > 5%
Max Drawdown
Formula: (High Water Mark - Current Value) / High Water Mark x 100
Tracks largest peak-to-trough decline since tracking began
High Water Mark updates when portfolio reaches new highs
Color-coded: Green < 10%, Yellow 10-20%, Red > 20%
### Correlation Matrix
The correlation panel displays Pearson correlation coefficients between your first 4 active positions:
Uses configurable lookback period (default: 60 bars, capped at risk lookback)
Color-coded cells for quick visual interpretation
Red for high positive correlation (> 0.7) indicating concentration risk
Green for negative correlation (< -0.3) indicating diversification benefit
Neutral for low correlation (-0.3 to 0.3)
Diagonal shows 1.00 (perfect self-correlation)
High positive correlations between positions mean they tend to move together, amplifying both gains and losses. The matrix helps identify when your portfolio is concentrated in correlated assets.
### Position Sizer
The position sizing panel calculates optimal position size based on your risk parameters:
Account Size - Your total account value
Risk Per Trade - Percentage of account to risk (default: 1%)
Stop Loss % - Your stop loss percentage from entry
Risk Amount - Dollar amount at risk (Account x Risk %)
Position Size - Calculated units: Risk Amount / (Price x Stop %)
Position Value - Total position value and percentage of account
ATR Stop Suggestion - 2x ATR(14) as alternative stop reference
Color-coded position size: Green < 15% of account, Yellow 15-25%, Red > 25%.
### Multi-Timeframe Timeline Levels
The timeline engine draws institutional price levels across multiple timeframes:
Daily Levels - D Open, Previous D High, Previous D Low
Weekly Levels - W Open, Previous W High, Previous W Low
Monthly Levels - M Open, Previous M High, Previous M Low
Yearly Levels - Y Open, Previous Y High, Previous Y Low
Each timeframe has configurable:
Enable/disable toggle
Custom color
Lookback period for line extension
Taken Level Detection: When price crosses through a level, it becomes "taken" and is visually dimmed with a dotted line style. This resets at the start of each new period.
### MTF Separators
Visual period boundary lines mark the start of each timeframe period:
Daily separators - Dotted lines at day boundaries
Weekly separators - Dashed lines at week boundaries
Monthly separators - Thicker dashed lines at month boundaries
Yearly separators - Solid lines at year boundaries
Each separator type has configurable color, enable toggle, and lookback limit.
### Time-of-Day Statistics
For intraday charts, the session stats panel analyzes volatility by time of day:
Tracks bar range (High - Low) as percentage of close
Groups data into 6 sessions: Asia Late, London Pre, London, NY Open, NY Close, After Hours
Displays average volatility percentage for each session
Shows bar count for statistical significance
Highlights current session with subtle background color
Color-coded by relative volatility: Red = highest, Yellow = medium, Green = lowest
This helps identify which trading sessions offer the most movement for your instrument.
## Visual Design
Theme Presets:
Neon Dark - Deep blue-black background with vibrant cyan/pink accents
Neon Light - Light background with softer accent colors
Calm Dark - Muted dark theme with softer color palette
Calm Light - Muted light theme for reduced eye strain
Custom - Full control over all colors
Visual Features:
Metallic gradient headers for premium appearance
Color-coded values based on thresholds (green/yellow/red)
Smooth color blending for PnL backgrounds
Consistent typography across all panels
Configurable panel positions (9 positions available)
Three text size options: tiny, small, normal
## Complete Configuration Reference
### Core Settings Group
Portfolio Table (default: true) - Toggle main portfolio display
Timeline Levels (default: true) - Toggle D/W/M/Y price levels
MTF Separators (default: true) - Toggle period boundary lines
Time-Of-Day Stats (default: false) - Toggle session statistics (intraday only)
Risk Metrics Panel (default: true) - Toggle institutional risk analytics
Correlation Matrix (default: true) - Toggle position correlation grid
Position Sizer (default: true) - Toggle position sizing calculator
### Theme Settings Group
Preset (default: Neon Dark) - Theme selection
Blend (default: 0.65, range: 0.0-1.0) - Color blending intensity
Vividness (default: 0.90, range: 0.0-1.0) - Color saturation level
Metallic Headers (default: true) - Gradient header styling
Panel Background - Custom background color (Custom theme only)
Panel Frame - Custom frame color (Custom theme only)
Bull/Bear/Neutral - Custom accent colors (Custom theme only)
### Risk Metrics Settings Group
Risk Lookback (default: 252, range: 20-500) - Bars for calculations. 252 = ~1 trading year
Risk-Free Rate % (default: 4.5, range: 0-20) - Annual rate for Sharpe calculation
VaR Confidence (default: 95%) - Options: 90%, 95%, 99%
VaR Horizon (default: 1, range: 1-30) - Days for VaR projection
Benchmark Symbol (default: AMEX:SPY) - Reference for Beta calculation
Rebalance Alert % (default: 5.0, range: 1-20) - Weight drift threshold
### Position Sizer Settings Group
Account Size (default: 100,000, min: 1,000) - Your account value
Risk Per Trade % (default: 1.0, range: 0.1-10) - Risk percentage per trade
Stop Loss % (default: 2.0, range: 0.1-20) - Stop loss for sizing calculation
### Portfolio Settings Group
Slots (default: 8, range: 1-8) - Number of positions to display
Pricing Timeframe (default: 1D) - Timeframe for price requests
FX Convert (default: false) - Enable currency conversion
Base Currency (default: USD) - Target currency for conversion
Preload Disabled Slots (default: false) - Pre-fetch disabled position data
Position (default: top_right) - Table position on chart
Text Size (default: small) - Options: tiny, small, normal
Show Weights (default: true) - Display weight percentage column
### Per-Position Settings (8 slots)
Enable - Toggle position on/off
Symbol - TradingView symbol (e.g., NASDAQ:AAPL, BINANCE:BTCUSDT)
Qty - Quantity held (supports decimals)
Avg - Average cost basis
Ccy - Currency override (optional, hidden by default)
Tgt% - Target weight percentage for rebalancing alerts
### Timeline Settings Group
Right Offset (default: 20, range: 1-300) - Bars to extend levels right
Labels (default: true) - Show level labels
Opens (default: true) - Show period open prices
Prev High/Low (default: true) - Show previous period highs/lows
Dim Taken Levels (default: true) - Fade levels when price crosses through
D/W/M/Y Enable - Toggle each timeframe
D/W/M/Y Color - Custom color per timeframe
D/W/M/Y Lookback - Line extension bars per timeframe
### Separators Settings Group
D/W/M/Y Enable - Toggle each separator type
D/W/M/Y Color - Custom color per separator
D/W/M/Y Lookback - Maximum bars to show separators
### Stats Settings Group
Position (default: bottom_center) - Stats table position
Lookback (days) (default: 20, range: 5-200) - Days for session averaging
## Alert System
The script includes two alert conditions:
Rebalance Alert - Fires when any position weight drifts beyond your threshold from its target weight. Message: "Portfolio weights have drifted beyond threshold - rebalancing recommended"
Drawdown Alert - Fires when max drawdown exceeds 15%. Message: "Portfolio drawdown exceeds 15%"
Alerts fire once per bar at bar close.
## Technical Implementation Notes
Pine Script v6 compliant with all latest syntax features
All price requests use close with lookahead_on to prevent repainting
Risk calculations only update on confirmed bars (barstate.isconfirmed)
Arrays manage portfolio returns with automatic size limiting
Resource limits respected: max_lines_count=500, max_labels_count=500, max_boxes_count=500
Dynamic requests enabled for multi-symbol data fetching
Safe division functions prevent divide-by-zero errors
Color mixing functions for smooth gradient transitions
Persistent state variables (var) for drawdown and high water mark tracking
## Usage Considerations
Asset Class Compatibility: Works with any TradingView symbol including stocks, ETFs, crypto, forex, futures, and indices. FX conversion available for multi-currency portfolios.
Timeframe Selection: Portfolio and risk metrics work on any timeframe. Session stats require intraday charts. Timeline levels are most useful on lower timeframes where D/W/M/Y levels provide context.
Data Requirements: Risk metrics require minimum 20 bars of data for calculation. Full accuracy achieved at 252 bars (1 trading year). Correlation requires sufficient return data for statistical significance.
Performance: The indicator makes multiple request.security calls for portfolio pricing. On slower connections or with many positions enabled, initial load may take a moment.
## Limitations and Compromises
Correlation matrix limited to first 4 positions due to Pine Script calculation constraints
Risk metrics are backward-looking and do not predict future performance
VaR assumes normal distribution of returns which may not hold during market stress
Position sizing is a calculation tool, not a recommendation
Session stats use simplified time zones and may not align perfectly with all markets
FX conversion uses TradingView's currency rate data which may have slight delays
The indicator is designed as an analytical and portfolio management aid. It does not guarantee profitable trades, remove risk, or replace your own analysis and risk management process.
## Disclaimer
This script is provided for informational and educational purposes only and does not constitute financial advice. Trading involves substantial risk of loss. You are solely responsible for your own trading decisions. Past results shown on any chart do not guarantee future performance. Always conduct your own analysis and use appropriate risk management.
-Made with passion by officialjackofalltrades






















