NQ/MNQ Position Sizing
Despite having my own position sizing calculator in an excel sheet, the manual process of having to identify my next trade, switch tabs/screens, input my values into the sheet, go back into TV, input the trade parameters with appropriate contract sizing, has always really gotten to me. I also found that I would often miss ideal entries due to the delay this caused.
I searched TV for position sizing calculators but almost all the ones I found seemed to be similar: based on some form of manual input for the entry and stop parameters, many of which had way more settings and parameters than I needed, also over complicated things.
I just needed something that would allow me to dynamically set my entry and stop levels directly on the chart, and spit out the appropriate contracts I should be using, either on NQ or MNQ, to maintain my desired level of risk, so I could quickly execute the necessary trade.
So, I coded my own and it's been a huge help to me already, so I thought I may as well publish the script as can't imagine there aren't others out there that also hate the manual data entry process of calculating risk.
Upon first load, the script will ask you to set your Entry and Stop levels, before drawing respective lines for these on the chart, and calculating contract sizing based on your risk settings, which you can update directly. The reset values may be buggy, will be easier to just remove the script and re-apply it to your chart if you ever lose track of the levels you've set.
Hope it's useful.
Gestione portafoglio
Prop Firm Guard: Risk & Sizing Tracker by TFTProp Firm Guard: Risk & Sizing Tracker by TFT
Overview:
This script is designed to help prop firm traders stay within risk rules and avoid emotional overtrading. It tracks your max loss limits, daily loss rules, and gives real-time position sizing suggestions based on your account status.
This tool is especially helpful for newer traders navigating prop firm challenges and rules like trailing drawdowns and daily stopouts.
Key Features:
✅ Real-time tracking of max loss and daily loss limits
✅ Supports both Intraday and End-of-Day (EOD) drawdown styles
✅ Calculates remaining “distance” to max/daily loss levels
✅ Automatically locks max loss once it trails up to starting balance
✅ Provides smart, tier-based position sizing suggestions (5%–50%)
✅ Shows profit target progress and live daily P&L
Use Case Example:
Let’s say you’re trading a $50,000 prop account with a $2,000 max drawdown limit.
If you're using Intraday Drawdown:
• You start the day at $50,000.
• During the day, your balance grows to $51,000 (including unrealized profits).
• The drawdown logic will trail this intraday high — so your new max loss limit becomes $49,000 (51K - 2K).
• If your balance drops to $49,400, this tool will show you’re $400 away from breaching the limit.
• Sizing suggestions will adjust accordingly to keep you in a safe range.
If you're using End-of-Day (EOD) Drawdown:
• The same scenario (account grows to $51,000 intraday) won’t affect your max loss limit immediately.
• EOD drawdown is only updated based on your end-of-day closing balance.
• So even if you hit $51K intraday, your max loss limit still remains at $48,000 (50K - 2K) until the trading day closes and updates your best equity.
• This mode offers more flexibility during the day — and the tool reflects this in how it calculates distances and sizing.
📌 It will then suggest a conservative sizing range — maybe 5–10% of your allowed contract size — until you're safer again.
📌 Make sure you update your current balance after each trade and follow your risk settings.
Inputs Explained (with Tips):
• Overall Account Starting Balance: Your full prop account size (e.g., 50000 or 100000, 150000, 300000, so on)
• Day Start Balance: What your balance was when the trading day started
• Daily Max Loss: How much you’re allowed to lose in one day (used only for EOD drawdown)
• Daily Profit Target: Your goal for the day (e.g., 500 or 1000 or so on)
• Allowed Overall Drawdown: Usually 4% for prop firms — like 2000 on 50K, or 6000 on 300K
• Drawdown Mode:
→ Intraday: Includes floating/unrealized profits in drawdown logic
→ EOD: Uses only end-of-day equity for drawdown logic
• Best Day High: Your highest balance to date. If not above your starting balance, this is ignored
• Intraday High (Manual): Optional override if your peak balance isn’t same as equity (used only for intraday drawdown mode)
• Current Equity: Update this during the session to reflect your live balance — everything else updates automatically
What You’ll See on the Chart:
🟩 Equity Section: Start balance, current balance, intraday high, best day high
🟥 Risk Section:
• Max loss limit (based on trailing logic)
• Distance from current balance to that limit
• Daily loss limit and distance (EOD mode only)
🟦 Performance Metrics:
• Daily P&L in $ and %
• Progress to profit target (shows ✅ Accomplished when goal is hit)
📦 Sizing Suggestion:
Based on how close you are to a drawdown breach, and your total drawdown tier.
Ranges from ⚠️ 5–10% to ✅ 40–50% of your max allowed contract size.
Who It's Best For:
• Built and optimized for 50K prop firm accounts
• Works well with 100K, 150K, or even 300K — but the sizing logic is most precise at 50K
• Best suited for futures or forex prop firm traders using account challenge-style rules
Manual Input Required:
Due to TradingView limitations, we cannot read your actual trades or live balance.
You'll need to update the Current Equity field yourself — but the rest is auto-calculated from there.
Most inputs (like overall balance and drawdown) are set once and rarely changed.
Beta Notice:
This tool is currently in beta and under testing. It's free for now and designed to help the trading community — but accuracy may vary.
Please send feedback if you'd like to suggest improvements or report bugs.
Disclaimer:
This tool is for educational purposes only and does not provide trading advice or signal any trades.
Always trade according to your firm’s rules. The author is not responsible for losses resulting from use of this script.
Lot Size TableLot Size Table Indicator – Pine Script (v5)
This TradingView script, “Lot Size Table,” creates a dynamic on-chart table that helps forex traders quickly calculate position sizes (lot sizes) for different capital and risk settings across various stop-loss (SL) pip scenarios.
🔧 Key Features:
📊 Real-time Forex Price Integration
Retrieves daily forex prices from OANDA for accurate lot size adjustments.
Instruments supported: USDJPY, USDCHF, AUDUSD, GBPUSD, NZDUSD, USDCAD, EURUSD.
🧠 Smart Lot Size Adjustments
Custom function adjustLotSize() adjusts lot sizes based on:
The currency of the instrument (e.g., JPY, GBP, AUD, etc.).
Special multiplier for symbols like US30 (e.g., ×8.5).
🧾 Flexible Capital & Risk Inputs
Supports 3 customizable capital groups, each with its own:
Capital amount
Risk percentage
📉 Multiple Stop-Loss (SL) Scenarios
Users input a comma-separated list of SL pip values (e.g., "20,25,30,...").
For each SL value, lot sizes are calculated for all 3 capital/risk combinations.
📋 Formatted On-Chart Table
Displays in a user-selected corner of the chart.
Customizable size, background color, and border.
Header row includes capital values and risk % (formatted to "k" if over 1,000).
Remaining rows show calculated lot sizes for each SL pip value.
📐 How It Works:
User Inputs: Capital, risk %, SL pip list, and table styling.
Calculation:
Lot size = (capital × risk%) / (SL pips × 10)
Adjusted based on instrument’s currency.
Display:
Table shows all SL pip scenarios and the corresponding adjusted lot sizes for each capital group.
Drawdown Visualizer v1.0Drawdown Visualizer
The Drawdown Visualizer tracks the percentage decline from all-time highs, providing valuable insights into market corrections and potential buying opportunities.
Key Features:
1) Real-Time Drawdown Tracking: The indicator continuously calculates and displays the current percentage drawdown from the all-time high price, color-coded from green (minimal drawdown) to red (severe drawdown) for instant visual feedback.
2) Maximum Drawdown Detection: Permanently tracks and displays the maximum historical drawdown encountered during the analyzed period, helping traders understand worst-case scenarios.
3) Statistical Analysis: Calculates and displays three important statistical measures:
* Average Drawdown: The mean value of all drawdowns recorded
* Median Drawdown: The middle value in the sorted list of all drawdowns, providing insight
into typical decline patterns
* Normal Drawdown Range: Visualizes the expected range of typical drawdowns based on
statistical standard deviation
Practical Applications:
1) Risk Management: Understand typical and extreme drawdowns to set appropriate stop-loss levels
2) Market Context: Gain perspective on whether current corrections are normal or exceptional
3) Entry Point Analysis: Identify potential buying opportunities when drawdowns reach statistical extremes
Portfolio Monitor - DolphinTradeBot1️⃣ Overview
▪️This indicator unifies the value of all your investments—whether stocks, currencies, or cryptocurrencies—in your chosen currency. This tool not only provides a clear snapshot of your overall portfolio performance but also highlights the individual growth of each asset with intuitive visualizations and an easy-to-understand performance report.
2️⃣ What sets this indicator apart
▪️is its ability to convert values from various currency pairs into any currency you choose. This means you can monitor your portfolio's performance against any currency pair you prefer, offering a flexible and comprehensive view of your investments.
3️⃣ How Is It Work ?
🔍The indicator can be analyzed under two main categories: visual representations and tables.
1- Visual representations ;
The indicator includes three different types of lines:
1. 1 - Reference Line → This represents the cost of all assets we hold, based on the selected date.
1. 2 - Total Assets Line → Displays the real-time value of all assets in our possession, including cash value, in the selected trading pair.
The area between the reference line is filled with green and red. The section above the reference line is represented in green, while the section below is shown in red.
1. 3 - Performance Lines → These visualize the performance of the assets, starting from the reference line and taking into account their weights in the portfolio. (Note: The lines are scaled for visualization purposes, so their absolute values should not be considered.)
"The names of the lines are shown in the image below."⤵️
2- Tables
The indicator includes three different types of tables:
2. 1 - Analysis Table : It provides a superficial overview of wallet statistics and values.
▪️TOTAL ASSETS → The current equivalent of all assets in the target currency
▪️CASH VALUE → The current value of the amount "Cash Value", in the target currency.
▪️PORTFOLIO VALUE → The total value of assets excluding Cash, in the target currency.
▪️POSTFOLIO COST → The cost of assets excluding Cash, in the target currency.
▪️PORTFOLIO ABSOLUTE RETURN → It shows the profit or loss relative to the cost of assets
▪️PORTFOLIO RETURN % →It shows the profit or loss relative to the cost of assets on a percentage basis
2. 2 - Performance Table : It displays the names of assets excluding Cash and their profit amounts, sorted from highest to lowest profit. If "Show as Percentage" is selected in the settings, it shows the percentage profit or loss relative to the cost. Profits are represented in green, while losses are represented in red.
"You can see the visual showing the tables below"⤵️
4️⃣How to Use ?
1- Choose the date on which the visualization will begin (📌The start date only affects the exchange rate used for calculating the reference line in the target currency.)
2- If you have cash holdings, enter the amount and specify the currency.
3- Select the currency in which your portfolio value will be displayed.(Default value is USD)
4- To set up your portfolio;
SYMBOLS - QUANTITY - PURCHASE PRICE
Enter the symbols of your assets - the number of units you hold - and their cost levels.
5- If you have cash, be sure to include your cash balance. If you also hold other currencies, enter them as separate assets with their corresponding quantities and purchase prices.
6- If you want to see the percentage returns of the assets in the performance table relative to their cost, select the "Show as Percent" option.
7- If you want to see the performance visuals of the assets, click on the "Show Asset Performance" option.
You can find an image of the settings section where the numbers above are used as references below.⤵️
📌 NOTE → By default, a few assets and their values have been pre-added in the initial settings. This is to ensure that you don’t see an empty screen when adding the indicator to the chart. Please remember to enter your own assets and values. The default settings are only provided as an example.
OverUnder Yield Spread🗺️ OverUnder is a structural regime visualizer , engineered to diagnose the shape, tone, and trajectory of the yield curve. Rather than signaling trades directly, it informs traders of the world they’re operating in. Yield curve steepening or flattening, normalizing or inverting — each regime reflects a macro pressure zone that impacts duration demand, liquidity conditions, and systemic risk appetite. OverUnder abstracts that complexity into a color-coded compression map, helping traders orient themselves before making risk decisions. Whether you’re in bonds, currencies, crypto, or equities, the regime matters — and OverUnder makes it visible.
🧠 Core Logic
Built to show the slope and intent of a selected rate pair, the OverUnder Yield Spread defaults to 🇺🇸US10Y-US2Y, but can just as easily compare global sovereign curves or even dislocated monetary systems. This value is continuously monitored and passed through a debounce filter to determine whether the curve is:
• Inverted, or
• Steepening
If the curve is flattening below zero: the world is bracing for contraction. Policy lags. Risk appetite deteriorates. Duration gets bid, but only as protection. Stocks and speculative assets suffer, regardless of positioning.
📍 Curve Regimes in Bull and Bear Contexts
• Flattening occurs when the short and long ends compress . In a bull regime, flattening may reflect long-end demand or fading growth expectations. In a bear regime, flattening often precedes or confirms central bank tightening.
• Steepening indicates expanding spread . In a bull context, this may signal healthy risk appetite or early expansion. In a bear or crisis context, it may reflect aggressive front-end cuts and dislocation between short- and long-term expectations.
• If the curve is steepening above zero: the world is rotating into early expansion. Risk assets behave constructively. Bond traders position for normalization. Equities and crypto begin trending higher on rising forward expectations.
🖐️ Dynamically Colored Spread Line Reflects 1 of 4 Regime States
• 🟢 Normal / Steepening — early expansion or reflation
• 🔵 Normal / Flattening — late-cycle or neutral slowdown
• 🟠 Inverted / Steepening — policy reversal or soft landing attempt
• 🔴 Inverted / Flattening — hard contraction, credit stress, policy lag
🍋 The Lemon Label
At every bar, an anchored label floats directly on the spread line. It displays the active regime (in plain English) and the precise spread in percent (or basis points, depending on resolution). Colored lemon yellow, neither green nor red, the label is always legible — a design choice to de-emphasize bias and center the data .
🎨 Fill Zones
These bands offer spatial, persistent views of macro compression or inversion depth.
• Blue fill appears above the zero line in normal (non-inverted) conditions
• Red fill appears below the zero line during inversion
🧪 Sample Reading: 1W chart of TLT
OverUnder reveals a multi-year arc of structural inversion and regime transition. From mid-2021 through late 2023, the spread remains decisively inverted, signaling persistent flattening and credit stress as bond prices trended sharply lower. This prolonged inversion aligns with a high-volatility phase in TLT, marked by lower highs and an accelerating downtrend, confirming policy lag and macro tightening conditions.
As of early 2025, the spread has crossed back above the zero baseline into a “Normal / Steepening” regime (annotated at +0.56%), suggesting a macro inflection point. Price action remains subdued, but the shift in yield structure may foreshadow a change in trend context — particularly if follow-through in steepening persists.
🎭 Different Traders Respond Differently:
• Bond traders monitor slope change to anticipate policy pivots or recession signals.
• Equity traders use regime shifts to time rotations, from growth into defense, or from contraction into reflation.
• Currency traders interpret curve steepening as yield compression or divergence depending on region.
• Crypto traders treat inversion as a liquidity vacuum — and steepening as an early-phase risk unlock.
🛡️ Can It Compare Different Bond Markets?
Yes — with caveats. The indicator can be used to compare distinct sovereign yield instruments, for example:
• 🇫🇷FR10Y vs 🇩🇪DE10Y - France vs Germany
• 🇯🇵JP10Y vs 🇺🇸US10Y - BoJ vs Fed policy curves
However:
🙈 This no longer visualizes the domestic yield curve, but rather the differential between rate expectations across regions
🙉 The interpretation of “inversion” changes — it reflects spread compression across nations , not within a domestic yield structure
🙊 Color regimes should then be viewed as relative rate positioning , not absolute curve health
🙋🏻 Example: OverUnder compares French vs German 10Y yields
1. 🇫🇷 Change the long-duration ticker to FR10Y
2. 🇩🇪 Set the short-duration ticker to DE10Y
3. 🤔 Interpret the result as: “How much higher is France’s long-term borrowing cost vs Germany’s?”
You’ll see steepening when the spread rises (France decoupling), flattening when the spread compresses (convergence), and inversions when Germany yields rise above France’s — historically rare and meaningful.
🧐 Suggested Use
OverUnder is not a signal engine — it’s a context map. Its value comes from situating any trade idea within the prevailing yield regime. Use it before entries, not after them.
• On the 1W timeframe, OverUnder excels as a macro overlay. Yield regime shifts unfold over quarters, not days. Weekly structure smooths out rate volatility and reveals the true curvature of policy response and liquidity pressure. Use this view to orient your portfolio, define directional bias, or confirm long-duration trend turns in assets like TLT, SPX, or BTC.
• On the 1D timeframe, the indicator becomes tactically useful — especially when aligning breakout setups or trend continuations with steepening or flattening transitions. Daily views can also identify early-stage regime cracks that may not yet be visible on the weekly.
• Avoid sub-daily use unless you’re anchoring a thesis already built on higher timeframe structure. The yield curve is a macro construct — it doesn’t oscillate cleanly at intraday speeds. Shorter views may offer clarity during event-driven spikes (like FOMC reactions), but they do not replace weekly context.
Ultimately, OverUnder helps you decide: What kind of world am I trading in? Use it to confirm macro context, avoid fighting the curve, and lean into trades aligned with the broader pressure regime.
Blended Net Liquidity CorrelationThis indicator visualizes a customizable net liquidity metric based on key U.S. Federal Reserve and Treasury data from FRED. It allows users to blend two liquidity models:
• With WALCL: Incorporates the Fed’s total balance sheet (WALCL) — ideal for capturing long-term structural liquidity from QE/QT.
• Without WALCL: Excludes the balance sheet and focuses on short-term operational flows like RRP, TGA, BTFP, and commercial lending.
Use the “Weight on WALCL” slider to find your optimal blend. A setting of 1.0 uses only WALCL, 0.0 uses only short-term flows, and any value in between gives a mix.
The indicator also calculates the correlation between net liquidity and price over various timeframes:
• 30D, 60D, 90D, 180D
• 1Y, 1.5Y, 2Y
• A custom length (default 3 years)
Correlation Heatmap█ OVERVIEW
This indicator creates a correlation matrix for a user-specified list of symbols based on their time-aligned weekly or monthly price returns. It calculates the Pearson correlation coefficient for each possible symbol pair, and it displays the results in a symmetric table with heatmap-colored cells. This format provides an intuitive view of the linear relationships between various symbols' price movements over a specific time range.
█ CONCEPTS
Correlation
Correlation typically refers to an observable statistical relationship between two datasets. In a financial time series context, it usually represents the extent to which sampled values from a pair of datasets, such as two series of price returns, vary jointly over time. More specifically, in this context, correlation describes the strength and direction of the relationship between the samples from both series.
If two separate time series tend to rise and fall together proportionally, they might be highly correlated. Likewise, if the series often vary in opposite directions, they might have a strong anticorrelation . If the two series do not exhibit a clear relationship, they might be uncorrelated .
Traders frequently analyze asset correlations to help optimize portfolios, assess market behaviors, identify potential risks, and support trading decisions. For instance, correlation often plays a key role in diversification . When two instruments exhibit a strong correlation in their returns, it might indicate that buying or selling both carries elevated unsystematic risk . Therefore, traders often aim to create balanced portfolios of relatively uncorrelated or anticorrelated assets to help promote investment diversity and potentially offset some of the risks.
When using correlation analysis to support investment decisions, it is crucial to understand the following caveats:
• Correlation does not imply causation . Two assets might vary jointly over an analyzed range, resulting in high correlation or anticorrelation in their returns, but that does not indicate that either instrument directly influences the other. Joint variability between assets might occur because of shared sensitivities to external factors, such as interest rates or global sentiment, or it might be entirely coincidental. In other words, correlation does not provide sufficient information to identify cause-and-effect relationships.
• Correlation does not predict the future relationship between two assets. It only reflects the estimated strength and direction of the relationship between the current analyzed samples. Financial time series are ever-changing. A strong trend between two assets can weaken or reverse in the future.
Correlation coefficient
A correlation coefficient is a numeric measure of correlation. Several coefficients exist, each quantifying different types of relationships between two datasets. The most common and widely known measure is the Pearson product-moment correlation coefficient , also known as the Pearson correlation coefficient or Pearson's r . Usually, when the term "correlation coefficient" is used without context, it refers to this correlation measure.
The Pearson correlation coefficient quantifies the strength and direction of the linear relationship between two variables. In other words, it indicates how consistently variables' values move together or in opposite directions in a proportional, linear manner. Its formula is as follows:
𝑟(𝑥, 𝑦) = cov(𝑥, 𝑦) / (𝜎𝑥 * 𝜎𝑦)
Where:
• 𝑥 is the first variable, and 𝑦 is the second variable.
• cov(𝑥, 𝑦) is the covariance between 𝑥 and 𝑦.
• 𝜎𝑥 is the standard deviation of 𝑥.
• 𝜎𝑦 is the standard deviation of 𝑦.
In essence, the correlation coefficient measures the covariance between two variables, normalized by the product of their standard deviations. The coefficient's value ranges from -1 to 1, allowing a more straightforward interpretation of the relationship between two datasets than what covariance alone provides:
• A value of 1 indicates a perfect positive correlation over the analyzed sample. As one variable's value changes, the other variable's value changes proportionally in the same direction .
• A value of -1 indicates a perfect negative correlation (anticorrelation). As one variable's value increases, the other variable's value decreases proportionally.
• A value of 0 indicates no linear relationship between the variables over the analyzed sample.
Aligning returns across instruments
In a financial time series, each data point (i.e., bar) in a sample represents information collected in periodic intervals. For instance, on a "1D" chart, bars form at specific times as successive days elapse.
However, the times of the data points for a symbol's standard dataset depend on its active sessions , and sessions vary across instrument types. For example, the daily session for NYSE stocks is 09:30 - 16:00 UTC-4/-5 on weekdays, Forex instruments have 24-hour sessions that span from 17:00 UTC-4/-5 on one weekday to 17:00 on the next, and new daily sessions for cryptocurrencies start at 00:00 UTC every day because crypto markets are consistently open.
Therefore, comparing the standard datasets for different asset types to identify correlations presents a challenge. If two symbols' datasets have bars that form at unaligned times, their correlation coefficient does not accurately describe their relationship. When calculating correlations between the returns for two assets, both datasets must maintain consistent time alignment in their values and cover identical ranges for meaningful results.
To address the issue of time alignment across instruments, this indicator requests confirmed weekly or monthly data from spread tickers constructed from the chart's ticker and another specified ticker. The datasets for spreads are derived from lower-timeframe data to ensure the values from all symbols come from aligned points in time, allowing a fair comparison between different instrument types. Additionally, each spread ticker ID includes necessary modifiers, such as extended hours and adjustments.
In this indicator, we use the following process to retrieve time-aligned returns for correlation calculations:
1. Request the current and previous prices from a spread representing the sum of the chart symbol and another symbol ( "chartSymbol + anotherSymbol" ).
2. Request the prices from another spread representing the difference between the two symbols ( "chartSymbol - anotherSymbol" ).
3. Calculate half of the difference between the values from both spreads ( 0.5 * (requestedSum - requestedDifference) ). The results represent the symbol's prices at times aligned with the sample points on the current chart.
4. Calculate the arithmetic return of the retrieved prices: (currentPrice - previousPrice) / previousPrice
5. Repeat steps 1-4 for each symbol requiring analysis.
It's crucial to note that because this process retrieves prices for a symbol at times consistent with periodic points on the current chart, the values can represent prices from before or after the closing time of the symbol's usual session.
Additionally, note that the maximum number of weeks or months in the correlation calculations depends on the chart's range and the largest time range common to all the requested symbols. To maximize the amount of data available for the calculations, we recommend setting the chart to use a daily or higher timeframe and specifying a chart symbol that covers a sufficient time range for your needs.
█ FEATURES
This indicator analyzes the correlations between several pairs of user-specified symbols to provide a structured, intuitive view of the relationships in their returns. Below are the indicator's key features:
Requesting a list of securities
The "Symbol list" text box in the indicator's "Settings/Inputs" tab accepts a comma-separated list of symbols or ticker identifiers with optional spaces (e.g., "XOM, MSFT, BITSTAMP:BTCUSD"). The indicator dynamically requests returns for each symbol in the list, then calculates the correlation between each pair of return series for its heatmap display.
Each item in the list must represent a valid symbol or ticker ID. If the list includes an invalid symbol, the script raises a runtime error.
To specify a broker/exchange for a symbol, include its name as a prefix with a colon in the "EXCHANGE:SYMBOL" format. If a symbol in the list does not specify an exchange prefix, the indicator selects the most commonly used exchange when requesting the data.
Note that the number of symbols allowed in the list depends on the user's plan. Users with non-professional plans can compare up to 20 symbols with this indicator, and users with professional plans can compare up to 32 symbols.
Timeframe and data length selection
The "Returns timeframe" input specifies whether the indicator uses weekly or monthly returns in its calculations. By default, its value is "1M", meaning the indicator analyzes monthly returns. Note that this script requires a chart timeframe lower than or equal to "1M". If the chart uses a higher timeframe, it causes a runtime error.
To customize the length of the data used in the correlation calculations, use the "Max periods" input. When enabled, the indicator limits the calculation window to the number of periods specified in the input field. Otherwise, it uses the chart's time range as the limit. The top-left corner of the table shows the number of confirmed weeks or months used in the calculations.
It's important to note that the number of confirmed periods in the correlation calculations is limited to the largest time range common to all the requested datasets, because a meaningful correlation matrix requires analyzing each symbol's returns under the same market conditions. Therefore, the correlation matrix can show different results for the same symbol pair if another listed symbol restricts the aligned data to a shorter time range.
Heatmap display
This indicator displays the correlations for each symbol pair in a heatmap-styled table representing a symmetric correlation matrix. Each row and column corresponds to a specific symbol, and the cells at their intersections correspond to symbol pairs . For example, the cell at the "AAPL" row and "MSFT" column shows the weekly or monthly correlation between those two symbols' returns. Likewise, the cell at the "MSFT" row and "AAPL" column shows the same value.
Note that the main diagonal cells in the display, where the row and column refer to the same symbol, all show a value of 1 because any series of non-na data is always perfectly correlated with itself.
The background of each correlation cell uses a gradient color based on the correlation value. By default, the gradient uses blue hues for positive correlation, orange hues for negative correlation, and white for no correlation. The intensity of each blue or orange hue corresponds to the strength of the measured correlation or anticorrelation. Users can customize the gradient's base colors using the inputs in the "Color gradient" section of the "Settings/Inputs" tab.
█ FOR Pine Script® CODERS
• This script uses the `getArrayFromString()` function from our ValueAtTime library to process the input list of symbols. The function splits the "string" value by its commas, then constructs an array of non-empty strings without leading or trailing whitespaces. Additionally, it uses the str.upper() function to convert each symbol's characters to uppercase.
• The script's `getAlignedReturns()` function requests time-aligned prices with two request.security() calls that use spread tickers based on the chart's symbol and another symbol. Then, it calculates the arithmetic return using the `changePercent()` function from the ta library. The `collectReturns()` function uses `getAlignedReturns()` within a loop and stores the data from each call within a matrix . The script calls the `arrayCorrelation()` function on pairs of rows from the returned matrix to calculate the correlation values.
• For consistency, the `getAlignedReturns()` function includes extended hours and dividend adjustment modifiers in its data requests. Additionally, it includes other settings inherited from the chart's context, such as "settlement-as-close" preferences.
• A Pine script can execute up to 40 or 64 unique `request.*()` function calls, depending on the user's plan. The maximum number of symbols this script compares is half the plan's limit, because `getAlignedReturns()` uses two request.security() calls.
• This script can use the request.security() function within a loop because all scripts in Pine v6 enable dynamic requests by default. Refer to the Dynamic requests section of the Other timeframes and data page to learn more about this feature, and see our v6 migration guide to learn what's new in Pine v6.
• The script's table uses two distinct color.from_gradient() calls in a switch structure to determine the cell colors for positive and negative correlation values. One call calculates the color for values from -1 to 0 based on the first and second input colors, and the other calculates the colors for values from 0 to 1 based on the second and third input colors.
Look first. Then leap.
CME Price Limits (Futures Prop Firm Rule)This indicator shows the CME Price Limit, combined with a safety distance that is used by several futures prop firms. Trading in the highlighted area means a rule violation for many Futures prop firm accounts.
The levels are calculated from the "Settlement as close" closing price of the previous daily candle.
Live Risk/Reward Lines (Dynamic Update: Tick or Bar Close)This script displays dynamic Risk and Reward target lines directly on the chart.
You can choose whether the updates happen live with each price tick or only once a bar closes.
It supports both long and short trading directions, with customizable risk and reward percentages.
Key Features:
Dynamic live updates (per tick or per bar close).
Choose Long or Short trade direction.
Customize risk and reward percentages individually.
Adjustable line length and color.
Option to show or hide risk and reward lines.
How It Works:
For long trades: Risk = Close Price * (1 - Risk %), Reward = Close Price * (1 + Reward %).
For short trades: Risk = Close Price * (1 + Risk %), Reward = Close Price * (1 - Reward %).
Lines are automatically centered around the current bar.
Why It Is Unique:
Unlike static risk/reward indicators, this script allows traders to see real-time dynamic changes based on the latest tick or bar close.
It offers full flexibility for scalpers and swing traders by allowing manual control over update timing and visualization style.
Usage Instructions:
Select your trade direction (Long or Short) from the settings.
Set your preferred risk and reward percentages.
Choose whether lines should update with every tick or only on bar close.
Optionally adjust the length and colors of the lines.
Important:
The script focuses on visualizing risk and reward directly on the price chart without giving buy or sell signals.
Disclaimer:
This tool is intended for educational and informational purposes only and should not be considered financial advice.
Circuit Breaker - MFFUThis Indicator Is Used To Protect User From Over Trading After Market Hit The Circuit Breakers.
The CME Exchange Usually Halts Trading If Market Hit + or - 7%.
To Protect Users From Extreme Volatile Condition MFFU, Halts Trading If Market Hits + or - 5%.
This Indicator helps us to plot the circuit breaking lines helping us to when to stop trading.
50 EMA Crossover With Monthly DCARecommended Chart Interval = 1W
Overview:
This strategy combines trend-following principles with dollar-cost averaging (DCA), aiming to efficiently deploy capital while minimizing market timing risk.
How It Works:
When the Long Condition is Not Met (i.e., Price < 50 EMA):
- If the price is below the 50 EMA, a fixed DCA amount is added to a cash reserve every month.
- This ensures that capital is consistently accumulated, even when the strategy isn't in a long position.
When the Long Condition is Met (i.e., Price > 50 EMA):
- A long position is opened when the price is above the 50 EMA.
- At this point, the entire capital, including the accumulated cash reserve, is deployed into the market.
- While the strategy is long, a DCA buy order is placed every month using the set DCA amount, continuously investing as the market conditions allow.
Exit Strategy:
If the price falls below the 50 EMA, the strategy closes all positions, and the cash reserve accumulation process begins again.
Key Benefits:
✔ Systematic Investing: Ensures consistent capital deployment while following trend signals.
✔ Cash Efficiency: Accumulates uninvested funds when conditions aren’t met and deploys them at optimal moments.
✔ Risk Management: Exits when the price trend weakens, protecting capital.
Conclusion:
This method allows for efficient capital growth by combining a trend-following approach with disciplined DCA, ensuring risk is managed while capital is deployed systematically at optimal points in the market. 🚀
BB Sidecar CalculatorBB Sidecar Calculator
Visual trade planner and dynamic risk-to-reward tool
Overview
The BB Sidecar Calculator is a precision planning tool designed to help traders visualize risk, reward, and position sizing directly on their charts. By inputting basic trade parameters, the indicator calculates stop-loss distance, potential profit targets in R multiples, and total dollar risk or gain based on the instrument type and lot size. It supports a wide range of assets including futures, forex, and equities.
Features
• Manually input or click-to-place entry and stop levels directly on the chart
• Drag and adjust levels dynamically with real-time updates to targets and risk values
• Automatic detection of long or short direction based on entry vs. stop placement
• Supports optional Max Dollar Risk setting to cap trade risk based on your account limits
• Configurable number of R-multiple targets (1R to 10R)
• Instrument-aware calculations with pip support for forex and point-based logic for stocks and futures
• Adjustable label display with configurable text size, color, and price precision
• Customizable currency symbol to match your account denomination
How to Use
1. When you first add the indicator, click on the chart to place your Entry and Stop levels.
2. The indicator will automatically determine whether the trade is Long or Short.
3. Drag either level up or down to adjust your setup visually.
4. Set your Lot Size and optionally define a Max $ Risk value.
5. The indicator will display:
• Entry line with lot size label
• Stop line with dollar risk and distance
• Up to 10 risk-multiple profit targets (1R, 2R, etc.)
Max Risk Logic
When a value is entered for Max $ Risk, the indicator calculates the maximum price difference you can afford based on your lot size and instrument type. It will then:
• Calculate a stop-loss price that aligns with your risk cap
• Compare this with the user-defined stop price
• Select the more conservative stop (the one with less dollar risk)
• Display updated profit targets based on the selected stop level
For forex pairs, pip value and pip size are accounted for in risk calculations. For stocks and futures, point value is used.
If Max $ Risk is set to 0, the indicator uses your manually defined stop price exclusively.
Notes
• Labels and visuals are rendered only on the latest bar for clarity
• Supports various decimal precision levels for accurate price formatting
• Designed for use in planning, not live trade execution
• Works across multiple timeframes and instrument types
Automated Lot Size Calculator // © Laurent3372
The "Automated Lot Size Calculator" is a sophisticated tool for traders who want to calculate the ideal position size based on their capital, risk, and the asset pair they wish to trade. Here is a detailed description of its features:
1. Language Selector
You can select the interface language (French, English, Spanish, German, or Italian). This makes the tool accessible and understandable to an international audience.
2. User Settings for Risk Calculation
The risk percentage per trade is configurable. The entered percentage is divided by 100 to obtain a fraction (for example, 1% becomes 0.01).
3. Selection of Equity in USD or EUR
The user chooses whether their equity is in US dollars or euros. Based on this choice, the calculation is based on the appropriate value.
A field for entering equity is available for both currencies, with a default initial amount. 4. Stop Loss in Pips
The stop loss can be entered in decimal places (such as 2.8 pips), allowing for high precision in risk calculations.
5. Interface Color Customization
You can configure the text and background colors for headers, values, and other visual elements, allowing you to customize the display.
6. Display Table Position and Size
You can choose the table location (top right, top left, bottom right, bottom left) as well as the display size (extra small, small, normal, large, extra large).
7. Asset Pair Detection and Pip Value
The code automatically detects the financial instrument (currency, crypto, precious metal) and adjusts the pip value according to the asset's characteristics. For example:
For JPY pairs, the pip is 0.01.
For cryptocurrencies, the pip is adjusted to 0.01.
For precious metals such as gold and silver, specific adjustments are also made.
8. Retrieving real-time exchange rates
The script uses the request.security function to retrieve real-time exchange rates for currencies or cryptocurrencies.
The code automatically adapts according to the trading pair and retrieves the appropriate rate (e.g., EUR/GBP, BTC/USD).
9. Calculating the risk amount in USD or EUR
The risk is calculated based on the selected capital (USD or EUR).
If the capital is in euros, it is converted to USD to simplify lot calculations.
10. Calculating position sizes in standard lots
The formula for calculating position sizes varies depending on the asset:
EUR/GBP is calculated with a specific adjustment.
Precious metals and cryptocurrencies have their own adapted formulas.
Exotic currencies incorporate a special conversion factor, taking into account pairs with more than two decimal places. 11. Lot Type Definition
The lot type is automatically adjusted according to the asset: "Micro Lot", "Standard Lot", or "Exotic Lot".
12. Results Display with Dynamic Translation
The results (currency, equity, risk, lot type, and size) are displayed in real time and automatically translated into the selected language.
The left column contains the parameters, and the right column displays the corresponding values.
13. Dynamically Creating the Results Table
The table is dynamically created using the specified position and size options. It contains all essential information, such as currency, equity, risk, and position size in lots.
Conclusion:
This script allows traders to automatically calculate their ideal position size by taking into account the currency, desired risk, and asset-specific parameters (such as cryptocurrencies and metals). Thanks to its customization options and automatic translations, it is suitable for global use, regardless of user profile.
Z-Score Normalized VIX StrategyThis strategy leverages the concept of the Z-score applied to multiple VIX-based volatility indices, specifically designed to capture market reversals based on the normalization of volatility. The strategy takes advantage of VIX-related indicators to measure extreme levels of market fear or greed and adjusts its position accordingly.
1. Overview of the Z-Score Methodology
The Z-score is a statistical measure that describes the position of a value relative to the mean of a distribution in terms of standard deviations. In this strategy, the Z-score is calculated for various volatility indices to assess how far their values are from their historical averages, thus normalizing volatility levels. The Z-score is calculated as follows:
Z = \frac{X - \mu}{\sigma}
Where:
• X is the current value of the volatility index.
• \mu is the mean of the index over a specified period.
• \sigma is the standard deviation of the index over the same period.
This measure tells us how many standard deviations the current value of the index is away from its average, indicating whether the market is experiencing unusually high or low volatility (fear or calm).
2. VIX Indices Used in the Strategy
The strategy utilizes four commonly referenced volatility indices:
• VIX (CBOE Volatility Index): Measures the market’s expectations of 30-day volatility based on S&P 500 options.
• VIX3M (3-Month VIX): Reflects expectations of volatility over the next three months.
• VIX9D (9-Day VIX): Reflects shorter-term volatility expectations.
• VVIX (VIX of VIX): Measures the volatility of the VIX itself, indicating the level of uncertainty in the volatility index.
These indices provide a comprehensive view of the current volatility landscape across different time horizons.
3. Strategy Logic
The strategy follows a long entry condition and an exit condition based on the combined Z-score of the selected volatility indices:
• Long Entry Condition: The strategy enters a long position when the combined Z-score of the selected VIX indices falls below a user-defined threshold, indicating an abnormally low level of volatility (suggesting a potential market bottom and a bullish reversal). The threshold is set as a negative value (e.g., -1), where a more negative Z-score implies greater deviation below the mean.
• Exit Condition: The strategy exits the long position when the combined Z-score exceeds the threshold (i.e., when the market volatility increases above the threshold, indicating a shift in market sentiment and reduced likelihood of continued upward momentum).
4. User Inputs
• Z-Score Lookback Period: The user can adjust the lookback period for calculating the Z-score (e.g., 6 periods).
• Z-Score Threshold: A customizable threshold value to define when the market has reached an extreme volatility level, triggering entries and exits.
The strategy also allows users to select which VIX indices to use, with checkboxes to enable or disable each index in the calculation of the combined Z-score.
5. Trade Execution Parameters
• Initial Capital: The strategy assumes an initial capital of $20,000.
• Pyramiding: The strategy does not allow pyramiding (multiple positions in the same direction).
• Commission and Slippage: The commission is set at $0.05 per contract, and slippage is set at 1 tick.
6. Statistical Basis of the Z-Score Approach
The Z-score methodology is a standard technique in statistics and finance, commonly used in risk management and for identifying outliers or unusual events. According to Dumas, Fleming, and Whaley (1998), volatility indices like the VIX serve as a useful proxy for market sentiment, particularly during periods of high uncertainty. By calculating the Z-score, we normalize volatility and quantify the degree to which the current volatility deviates from historical norms, allowing for systematic entry and exit based on these deviations.
7. Implications of the Strategy
This strategy aims to exploit market conditions where volatility has deviated significantly from its historical mean. When the Z-score falls below the threshold, it suggests that the market has become excessively calm, potentially indicating an overreaction to past market events. Entering long positions under such conditions could capture market reversals as fear subsides and volatility normalizes. Conversely, when the Z-score rises above the threshold, it signals increased volatility, which could be indicative of a bearish shift in the market, prompting an exit from the position.
By applying this Z-score normalized approach, the strategy seeks to achieve more consistent entry and exit points by reducing reliance on subjective interpretation of market conditions.
8. Scientific Sources
• Dumas, B., Fleming, J., & Whaley, R. (1998). “Implied Volatility Functions: Empirical Tests”. The Journal of Finance, 53(6), 2059-2106. This paper discusses the use of volatility indices and their empirical behavior, providing context for volatility-based strategies.
• Black, F., & Scholes, M. (1973). “The Pricing of Options and Corporate Liabilities”. Journal of Political Economy, 81(3), 637-654. The original Black-Scholes model, which forms the basis for many volatility-related strategies.
Z-Score Normalized Volatility IndicesVolatility is one of the most important measures in financial markets, reflecting the extent of variation in asset prices over time. It is commonly viewed as a risk indicator, with higher volatility signifying greater uncertainty and potential for price swings, which can affect investment decisions. Understanding volatility and its dynamics is crucial for risk management and forecasting in both traditional and alternative asset classes.
Z-Score Normalization in Volatility Analysis
The Z-score is a statistical tool that quantifies how many standard deviations a given data point is from the mean of the dataset. It is calculated as:
Z = \frac{X - \mu}{\sigma}
Where X is the value of the data point, \mu is the mean of the dataset, and \sigma is the standard deviation of the dataset. In the context of volatility indices, the Z-score allows for the normalization of these values, enabling their comparison regardless of the original scale. This is particularly useful when analyzing volatility across multiple assets or asset classes.
This script utilizes the Z-score to normalize various volatility indices:
1. VIX (CBOE Volatility Index): A widely used indicator that measures the implied volatility of S&P 500 options. It is considered a barometer of market fear and uncertainty (Whaley, 2000).
2. VIX3M: Represents the 3-month implied volatility of the S&P 500 options, providing insight into medium-term volatility expectations.
3. VIX9D: The implied volatility for a 9-day S&P 500 options contract, which reflects short-term volatility expectations.
4. VVIX: The volatility of the VIX itself, which measures the uncertainty in the expectations of future volatility.
5. VXN: The Nasdaq-100 volatility index, representing implied volatility in the Nasdaq-100 options.
6. RVX: The Russell 2000 volatility index, tracking the implied volatility of options on the Russell 2000 Index.
7. VXD: Volatility for the Dow Jones Industrial Average.
8. MOVE: The implied volatility index for U.S. Treasury bonds, offering insight into expectations for interest rate volatility.
9. BVIX: Volatility of Bitcoin options, a useful indicator for understanding the risk in the cryptocurrency market.
10. GVZ: Volatility index for gold futures, reflecting the risk perception of gold prices.
11. OVX: Measures implied volatility for crude oil futures.
Volatility Clustering and Z-Score
The concept of volatility clustering—where high volatility tends to be followed by more high volatility—is well documented in financial literature. This phenomenon is fundamental in volatility modeling and highlights the persistence of periods of heightened market uncertainty (Bollerslev, 1986).
Moreover, studies by Andersen et al. (2012) explore how implied volatility indices, like the VIX, serve as predictors for future realized volatility, underlining the relationship between expected volatility and actual market behavior. The Z-score normalization process helps in making volatility data comparable across different asset classes, enabling more effective decision-making in volatility-based strategies.
Applications in Trading and Risk Management
By using Z-score normalization, traders can more easily assess deviations from the mean in volatility, helping to identify periods when volatility is unusually high or low. This can be used to adjust risk exposure or to implement volatility-based trading strategies, such as mean reversion strategies. Research suggests that volatility mean-reversion is a reliable pattern that can be exploited for profit (Christensen & Prabhala, 1998).
References:
• Andersen, T. G., Bollerslev, T., Diebold, F. X., & Vega, C. (2012). Realized volatility and correlation dynamics: A long-run approach. Journal of Financial Economics, 104(3), 385-406.
• Bollerslev, T. (1986). Generalized autoregressive conditional heteroskedasticity. Journal of Econometrics, 31(3), 307-327.
• Christensen, B. J., & Prabhala, N. R. (1998). The relation between implied and realized volatility. Journal of Financial Economics, 50(2), 125-150.
• Whaley, R. E. (2000). Derivatives on market volatility and the VIX index. Journal of Derivatives, 8(1), 71-84.
EMA Crossover (Short Focus with Trailing Stop)This strategy utilizes a combination of Exponential Moving Averages (EMA) and Simple Moving Averages (SMA) to generate entry and exit signals for both long and short positions. The core of the strategy is based on the 13-period EMA (short EMA) crossing the 33-period EMA (long EMA) for entering long trades, while a 13-period EMA crossing the 25-period EMA (mid EMA) generates short trade signals. The 100-period SMA and 200-period SMA serve as additional trend indicators to provide context for the market conditions. The strategy aims to capitalize on trend reversals and momentum shifts in the market.
The strategy is designed to execute trades swiftly with an emphasis on entering positions when conditions align in real time. For long entries, the strategy initiates a buy when the 13 EMA is greater than the 33 EMA, indicating a bullish trend. For short entries, the 13 EMA crossing below the 33 EMA signals a bearish trend, prompting a short position. Importantly, the code includes built-in exit conditions for both long and short positions. Long positions are exited when the 13 EMA falls below the 33 EMA, while short positions are closed when the 13 EMA crosses above the 25 EMA.
A key feature of the strategy is the use of trailing stops for both long and short positions. This dynamic exit method adjusts the stop level as the market moves in favor of the trade, locking in profits while reducing the risk of losses. The trailing stop for long positions is based on the high price of the current bar, while the trailing stop for short positions is set using the low price, providing more flexibility in managing risk. This trailing stop mechanism helps to capture profits from favorable market moves while ensuring that positions are exited if the market moves against them.
This strategy works best on the daily timeframe and is optimized for major cryptocurrency pairs. The daily chart allows for the EMAs to provide more reliable signals, as the strategy is designed to capture broader trends rather than short-term market fluctuations. Using it on major crypto pairs increases its effectiveness as these assets tend to have strong and sustained trends, providing better opportunities for the strategy to perform well.
Option Contract Size CalculatorOption Contract Size Calculator
This indicator helps you to figure out the ideal number of contracts for your trade and its only used for options day trading.
The indicator needs to fill the input section in order to give you the information table that includes Contract size .
The input section consists of two sections. The first section requires user entry of the delta of the options contract from the broker chain and the stop loss size on the chart.
The second section allows you to enter your account balance and risk per trade
(2% recommended) .
There is also the option for where you wish to display your table like bottom right , bottom left or top right, top left.
special thanks to @Mohamedawke for the open source script this code is based off
TP/SL Percentage & RR Visual ToolThis tool is designed to help traders visually and statistically assess their trade setup by calculating Stop Loss (SL), Take Profit (TP), and Risk-to-Reward (RR) based on percentage inputs from the current price.
🔧 How It Works:
Uses the current candle’s close price as your entry.
Calculates TP and SL as percentage-based levels (e.g., 1% SL, 1.5% TP).
Displays horizontal lines and labels on the chart for TP and SL (only on the latest candle to reduce clutter).
Shows a compact table in the top-right corner with all key values:
Entry Price
Current Price
TP Price (+%)
SL Price (-%)
TP Distance from current price
RR Ratio (e.g., 1:1.5)
💡 Use Cases:
Quickly validate if a trade setup meets your desired RR profile (e.g., 1:2).
Perfect for scalpers, swing traders, and position traders who rely on structured risk management.
Combine with your entry signal strategy to visualize targets and stops without manual calculations.
⚙️ Inputs:
Stop Loss % – Sets how far your SL is from the entry.
Take Profit % – Sets how far your TP is from the entry.
Metatrader CalculatorThe “ Metatrader Calculator ” indicator calculates the position size, risk, and potential gain of a trade, taking into account the account balance, risk percentage, entry price, stop loss price, and risk/reward ratio. It supports the XAUUSD, XAGUSD, and BTCUSD pairs, automatically calculating the position size (in lots) based on these parameters. The calculation is displayed in a table on the chart, showing the lot size, loss in dollars, and potential gain based on the defined risk.
Dynamic Zone Risk Manager [Algo Seeker]Introduction
The Algo Seeker: Dynamic Zone Risk Manager excels in both ranging and trending market conditions. It merges two critical trading components: a zone identification system that allows traders to anticipate price movement within structured ranges and a dynamic risk assessment table that optimizes position sizing based on account parameters and zone-specific characteristics, while also calculating trade-specific risk and reward.
For traders struggling with consistent risk management and identifying high-probability zones, particularly in challenging ranging market conditions, this tool provides a structured framework that enhances precision in trading decisions and capital allocation — addressing two of the most common challenges in trading.
🟠 Unique Features & Trading Benefits
Advanced Zone Structuring:
🟢 The indicator adapts to different trading styles through Scalp, Swing, and Investor modes. Scalp mode generates tight, precise zones optimized for intraday price movements and quick trades completed within minutes or hours. Swing mode creates intermediate zones calibrated for positions held for the entire day or a few weeks, providing optimal zone structures for medium-term trading approaches. Investor mode establishes broader zones designed specifically for positions spanning a few weeks to a few months, identifying major support and resistance levels for extended holding periods.
🟢 These zones are particularly useful during ranging markets. They define clear price ranges within which movement may oscillate based on the selected trading horizon. Such clarity helps traders anticipate potential bounce areas and manage trades more effectively, even when the market lacks a clear directional trend.
🟢 The system transforms static price levels into comprehensive trading zones with clearly defined boundaries. The multi-dimensional architecture creates actionable entry, exit, and management levels that remain relevant across different market conditions.
Unique Risk Management:
🟢 A dynamic risk table that calculates position sizing based on the trader's actual account size. When traders select Scalp, Swing, or Investor mode, the table automatically computes the optimal capital allocation specifically for that mode and the current zone.
🟢 The table provides exact dollar amounts for both risk and potential reward based on current price position within the zone. If price is already moving through a zone, the table dynamically updates to show how much of the potential reward remains available.
🟢 This precise risk management system gives traders a clear, quantified understanding of exactly how much capital to allocate per trade, the specific dollar amount at risk, and the remaining profit potential—all updating in real-time as price moves through the zones.
Dynamic Cost Basis Analysis:
🟢 Continuously calculates optimal midpoints within each zone, creating additional precision pivot points that traditional tools can lack. These dynamic reference points enhance trade accuracy in ranging markets while providing essential data points for the integrated risk management calculations.
🟠 The Power of Integration: Zones Meet Risk Management
The true power of the Algo Seeker: Dynamic Zone Risk Manager emerges when these components work together as a unified system. The trader-selected strategy zones and dynamic risk table create a complete trading ecosystem that addresses the three critical elements of successful trading:
1. Precision Entry Points: Zone boundaries provide clear entry thresholds optimized for your selected trading mode (Scalp, Swing, or Investor), eliminating guesswork around optimal trade initiation points.
2. Disciplined Risk Control: The risk table's exact dollar calculations remove emotional decision-making from position sizing and stop placement, creating a consistent risk approach regardless of market volatility.
3. Strategic Exit Management: As price moves through zones, both visual cues and quantified metrics guide intelligent profit-taking decisions, preventing the common mistake of exiting too early or holding too long.
This synchronized framework transforms theoretical analysis into practical execution, giving traders a complete toolset for managing the entire lifecycle of each trade with precision and confidence.
🟠 Additional Algo Benefits
Psychological Trading Edge:
The Algo Seeker: Dynamic Zone Risk Manager addresses the most challenging aspect of trading—emotional decision-making. By transforming complex risk/reward calculations into clear, quantified metrics, the system eliminates decision paralysis and reactionary trading. Traders gain immediate clarity during volatile conditions through the visual integration of precise zones and risk parameters. This psychological framework cultivates discipline and confidence when market noise typically triggers impulsive decisions, allowing for consistent execution even during challenging market environments.
Efficiency and Time Value:
The system delivers exceptional time efficiency by eliminating the need for manual risk calculations, zone identification, and position sizing. What typically requires multiple tools and extensive spreadsheet calculations is seamlessly integrated into a unified interface. Traders receive immediate, actionable insights without the cognitive burden of juggling separate indicators. This allows professionals to focus on strategic decisions rather than technical calculations.
Advanced User Customization:
Unlike one-size-fits-all indicators, the Algo Seeker: Dynamic Zone Risk Manager adapts to individual trading methodologies. The system accommodates personalized account parameters and allocates capital differently based on three distinct trading modes—scalping, swing trading, and investing. This flexibility allows professional traders to implement their unique strategy while maintaining precise risk control across different positions and time horizons. The customizable table positioning and color schemes further enhance workflow integration for diverse trading environments.
🟠 How to Use
Initial Setup
1. Lookback Parameter: The Lookback Period determines which candle data the Dynamic Zone Risk Manager uses to establish trading zones:
🟢Lookback = 1 (Default): Uses the most recent closed candle to calculate zones. This provides stable analysis based on completed price action and is recommended for most trading scenarios.
🟢Lookback = 0: Uses the current, still-forming candle. This offers more immediate responsiveness, but zones may change as the candle develops. For consistent zone analysis, Lookback = 1 typically offers a better foundation.
2. Configure Account Parameters: Input your total trading capital in the settings panel to customize risk calculations specific to your account size.
3. Select Trading Mode: Choose between Scalp, Swing, or Investor modes based on your preferred trade style:
🟢Scalp: For intraday movements (minutes to hours)
🟢Swing: For medium-term positions (days to weeks)
🟢 Investor: For longer-term positions (weeks to months)
4. Account Parameters Setup: The risk management component requires your account size to provide accurate position sizing calculations.
🟢Total Account Size: Enter your total trading capital in the "Total Account Size ($)" input. All risk calculations are based on this value.
🟢Trading Allocation Percentages: The system allows you to divide your capital across three trading modes.
1. Scalp Allocation (%): Percentage of capital reserved for short-term trades
2. Swing Allocation (%): Percentage of capital for medium-term positions
3. Invest Allocation (%): Percentage of capital for longer-term investments
These percentages can be customized to match your personal trading strategy and risk tolerance.
Margin Multiplier: Adjust the margin multiplier value based on your broker's requirements and your preferred leverage.
The system uses these parameters to calculate appropriate position sizes for each trading mode, ensuring your risk exposure remains aligned with your capital management plan.
5.Visual Customization: Adjust color schemes and table positions to optimize for your workspace layout and visual preferences.
🟠 Risk Table Explanation
The dynamic risk tables provide real-time position sizing and risk metrics as price moves through different zones:
1. Zone Column: Displays the current zone where price is located.
2. Zone Size: Shows the total price range of the current zone.
3. Trade Type: Indicates the trading style (Scalp, Swing, or Invest).
4. Shares: Displays the calculated position size (number of shares) based on your account parameters and the current zone.
5. Risk($): Shows the approximate dollar amount at risk if the trade moves against you within the zone.
6. Reward($): Displays the potential dollar return if price moves completely through the zone in your favor.
7. Left: Indicates how much potential movement remains within the current zone based on the latest price.
The table updates dynamically as price moves, giving you real-time risk/reward information. Each trading style is displayed separately, allowing you to compare potential position sizes across different trade modes while maintaining consistent risk management.
🟠 Strategic Execution
Strategy Usage Example
The Algo Seeker: Dynamic Zone Risk Manager provides a complete framework for precise trading decisions. Here's how you might leverage its power:
1. Zone-Based Trading: The indicator identifies key zones and levels that serve as powerful pivot points. These are not arbitrary levels but mathematically derived zones where price is likely to react. Use these zones directly for your trading decisions.
2. Precision Entries: For long positions, enter near the lower boundary of a zone with targets at the upper boundary. For shorts, enter near the upper boundary with targets at the lower boundary. These levels identify potential entry points based on the underlying market structure.
3. Risk Management: The zone, level, or cost basis below your entry (for longs) or above your entry (for shorts) can serve as logical places to set stop losses, helping you define your risk on each trade.
4. Position Sizing Precision: Use the exact share/contract quantities displayed in the risk table. This eliminates guesswork in position sizing and provides both risk and profit calculations that align perfectly with your capital management strategy.
5. Strategic Exits: Take profits at the target zone boundaries identified by the indicator. These levels represent mathematical points where price may encounter resistance or support, providing potential exit opportunities.
6. Advanced Strategy Options:
🟢Consider taking partial profits at cost basis (midpoint) levels
🟢Trade from zone to zone using the defined boundaries
🟢Scale in or out at specific zone transitions
🟢Set trailing stops at subsequent zone boundaries as price progresses
The strength of this indicator lies in its ability to provide all the critical decision points needed for a complete trade - from entry to exit, with precise position sizing - all derived from its sophisticated algorithmic analysis rather than subjective interpretation.
🟠 Alert Configuration
1. Zone Crossovers: Set alerts for when price transitions between key zones.
2. Cost Basis Interactions: Configure notifications for when price approaches optimal entry points.
The Algo Seeker Wizard Ultra Risk represents years of development and refinement in professional trading environments. Its integration of sophisticated zone identification with precise risk management creates a comprehensive framework that transforms theoretical market analysis into actionable trading decisions with quantified risk parameters.
CME Price LimitCalculates the CME Price Limit
The reference price is obtained from the previous day's closing settlement price
(data pulled from the asset's daily chart with settlement enabled)
Percentage limit can be modified in settings
Buffer can be enabled (for example, 2% buffer on a 7% limit, so a line gets drawn at 5% too)
Alert can be enabled for price crossing a certain percentage from reference on the day
You can choose to plot the historical lines on every day, or the current day only
The reference price output can be found in the data window, or in the indicator status line if enabled in the settings.
Before placing real trades with this, you should compare the indicator's reference price to what's shown on CME's website, to double check that TradingView's data matches for your contract.
www.cmegroup.com
RS++ High Beta Majors Allocation | viResearchRS++ High Beta Majors Allocation | viResearch
Conceptual Foundation and Innovation
The "RS++ High Beta Majors Allocation" is a next-generation portfolio rotation algorithm designed to capture alpha from high-volatility (high-beta) crypto assets. Building on the RS+ framework, this strategy expands the asset pool beyond BTC, ETH, and SOL to include newer and more volatile contenders like SUI and XRP. The goal is to rotate dynamically among these five majors—allocating to the strongest trending asset while minimizing exposure during broad-market weakness.
The strategy introduces enhanced comparative scoring using a multi-layered relative strength matrix that accounts for cross-asset momentum in real-time. Combined with a regime-based trend filter, it adapts not only to market leadership but also to prevailing risk conditions, significantly improving capital efficiency over traditional buy-and-hold strategies.
Technical Composition and Calculation
At the heart of the RS++ model lies a sophisticated five-asset ratio matrix. Each asset is evaluated against the others using relative price ratios, and each pair is scored through a hybrid strength model based on universal trend filters and statistical thresholds.
Expanded Universe: The script evaluates BTC, ETH, SOL, SUI, and XRP—each chosen for their liquidity and volatility profile, enhancing the potential for outperformance.
Relative Strength Matrix: A 5x5 matrix compares all assets against one another to determine momentum dominance. The asset with the highest cumulative score is considered the dominant major.
Trend Regime Filter: Before allocation, both the market regime (via BTC or a custom source) and the individual asset must pass trend confirmation to qualify for inclusion, reducing whipsaw exposure.
Equity Tracking: A real-time system equity line tracks portfolio performance from a custom user-defined start date.
Drawdown Measurement: Maximum drawdown is computed in real-time to assess risk exposure.
Performance Metrics
The script measures key quantitative metrics to evaluate performance robustness:
Max Drawdown: Assesses capital risk and largest equity dip from peak to trough.
Sharpe/Sortino/Omega Ratios (optional in previous versions): Can be adapted for future inclusion.
ROC-Based Returns: Allocation logic and equity growth are tied to ROC (rate of change), making it highly responsive to price action.
User Interface and Features
This version introduces user-centric customization and quality-of-life improvements:
Asset Toggle via Tickers: Simply switch any ticker to "USDT" to exclude it from the rotation universe.
Equity Chart Overlay: Real-time equity plotted with color-coded trend backgrounds for easy interpretation of active holdings.
Dominant Asset Panel: A dashboard displays the currently allocated asset and scores of all assets for comparative insights.
Usage Recommendation: The script includes an embedded suggestion to pair this strategy with the Crypto Market Confidence Period indicator for even better macro-filtering.
Timeframe Guardrail: A soft enforcement feature suggests usage on the 1D timeframe for optimal accuracy.
Practical Applications
This strategy is ideal for traders who prefer a tactical, risk-managed approach to high-beta crypto portfolios. Use cases include:
Active Rotation Management: Switches capital between the strongest trending assets to capture momentum across cycles.
Macro Regime Sensitivity: The trend filter avoids allocation during weak macro trends, moving to cash and preserving equity.
High-Volatility Environments: Particularly effective in bull phases or during sector rotations where traditional assets underperform.
Strategic Value and Advantages
The RS++ script blends alpha-generation with institutional-level risk filtering, making it a powerful tool for active portfolio managers. The expanded universe allows for exposure to emerging market leaders while the scoring and filtering mechanism ensures trades are made with precision. Real-time equity visualization and intuitive alerts help traders stay aligned with system output without constant screen-watching.
Summary and Usage Tips
The "RS++ High Beta Majors Allocation" script offers a versatile and powerful method for crypto portfolio allocation with an emphasis on dynamic strength, risk control, and adaptability. Traders are encouraged to:
Use the recommended 1D timeframe for stability.
Pair the strategy with macro filters like the Crypto Market Confidence Period.
As always, backtest thoroughly and remember that no model guarantees future performance. Use this tool as part of a broader risk-managed trading framework.
IBAC Strategy - ZygoraIBAC - Intrinsic Binary Averaging based Contrarian
A contrarian scalping strategy in the futures market, designed to stabilize market efficiency by capitalizing on price reversals. The strategy has no stop loss, instead employing a cascading approach—adding to the position size each time the price moves in the wrong direction—and closes the full position when the target profit is reached. Without delving into intricate details, the strategy adheres to the following basic rules:
Position sizing is determined by a customized indicator based on cumulative reversal probability, which also contributes to identifying the signal’s direction.
Direction is determined by the Moving Average: price above the Moving Average signals a Short position, while price below it signals a Long position.
The threshold for entries and exits is adjusted based on the range between extremes (highest high minus lowest low) over the past 100 historical bars.
The next limit entry is placed at a distance equal to the threshold length below (for Long) or above (for Short) the current average price.
The next target profit is set at a distance equal to the threshold length above (for Long) or below (for Short) the current average price.
A signal is triggered when there is a sudden price movement detected by the RSI (Relative Strength Index).
When a signal is identified, the strategy starts with a risk-reward ratio (RR) of 1:1. However, the RR worsens as the cascading steps—referred to as inventory I—increase, because the average entry price shifts unfavorably with each new position added. To mitigate the risk of liquidation, the strategy aims to hold a smaller inventory amount over time. This is achieved by using a multiple threshold multiplier: when a specified inventory limit is reached, the threshold for the next entry increases, and the threshold for the next target profit decreases. As a result, with higher inventory levels, the strategy accepts a lower RR but increases the likelihood of hitting the target profit.
The target profit is always set above the average entry price (for Long) or below it (for Short), ensuring that the strategy eventually closes at a profit. This leads to a 100% win rate but comes with relatively high drawdowns due to the absence of a stop loss and the cascading nature of the positions. The strategy performs best in a consolidation market in 1 minute timeframe, where price tends to oscillate within a range, allowing the contrarian approach to capitalize on reversals. The strategy’s name is derived from its customized indicator for position sizing, which leverages cumulative reversal probability to optimize position sizes and assist in determining the signal’s direction.