Zig Zag Trend Metrics“ Zig Zag Trend Metrics ” is a highly versatile indicator, built on the classic Zig Zag concept and thoughtfully designed for technical traders seeking a deeper, more structured view of market dynamics. This tool identifies significant swing highs and lows, classifies them, and annotates each with key metrics, offering a precise snapshot of each movement. It enhances visual analysis by drawing connecting lines that outline the flow of market structure, making trend progression and reversals instantly recognizable. Beyond visual mapping, it features a compact, real-time statistics table that calculates the average price and time deltas for both bullish and bearish swings, giving traders deep insights into trend momentum and rhythm. With extensive customization options, this indicator adapts seamlessly to vast trading styles or chart setups, empowering traders to spot patterns, evaluate trend strength, and make more confident, data-backed decisions.
❖ FEATURES
✦ Automatic Swing Detection
At its core, this indicator automatically identifies swing highs and lows based on a customizable lookback period (default: 10 bars).
✦ Labeling Swing Points
Each swing is visualized with a label that includes:
Swing Classification : “HH” (Higher High), “LH” (Lower High), “LL” (Lower Low), or “HL” (Higher Low).
Price Difference : Displayed in percentage or absolute value from the previous opposite swing.
Time Difference : The number of bars since the previous swing of the opposite type.
These labels offer traders clear, immediate insight into price movements and structural changes.
✦ Visual Lines
The indicator draws three types of lines:
Bullish Lines: Connect recent swing lows to new swing highs, indicating uptrends.
Bearish Lines: Connect recent swing highs to new swing lows, indicating downtrends.
Range Lines: Connect consecutive highs or lows to outline price channels.
Each line type can be color-coded and customized for visibility.
✦ Statistics Table
An on-screen metrics table provides a live summary of trends. Script uses Relative Averaging to smooth price and time changes. This prevents outliers from distorting the data and provides a more reliable sense of typical swing behavior.
Uptrend Metrics: Shows average price and time differences from recent bullish swings.
Downtrend Metrics: Shows the same for bearish swings.
🛠️ Customization Options
Ability to tailor the indicator to suit their strategy and aesthetic preferences:
Swing Period: Adjust sensitivity to short- or long-term swings.
Color Settings: Customize line and label colors.
Label Display: Choose between absolute or percentage price differences.
Table Settings: Modify size, location, or visibility.
This makes the indicator highly flexible and useful across various timeframes and assets.
Statistics
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
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.
MULTI-SESSION GLM🎯 "MULTI-SESSION GLM" Indicator
Highlight 3 customizable trading sessions directly on your chart, each with unique colors—ideal for spotting market overlaps or key trading hours.
✨ Features:
✅ 3 independent sessions (adjust time ranges & colors).
✅ Transparent overlay (non-intrusive to price action).
✅ Perfect for Forex, Futures, and Stock traders.
✅ Easy setup (configure in seconds).
⚙️ How to Use:
Open the indicator settings.
Set your sessions (e.g., "0800-1200").
Pick colors for each zone.
VNIndex Over 6.5% Downside Drop Indicator with TableOverview: The VNIndex 6.5% Downside Drop Indicator is a powerful tool designed to help traders and investors identify significant market drops on the VNIndex (or any other asset) based on a 6.5% downside threshold. This Pine Script® indicator automatically detects when the price of an asset drops by more than 6.5% within a single day, and visually marks those events on the chart.
Key Features:
6.5% Downside Drop Detection: Automatically calculates the daily percentage drop and identifies when the price falls by more than 6.5%.
Table Display: Displays the dates and corresponding percentage drops of all identified instances in a convenient table at the bottom right of the chart.
Markers: Red down-pointing markers are plotted above bars where the price drop exceeds the 6.5% threshold, making it easy to spot critical drop events at a glance.
Easy-to-Read Table: The table lists the date and drop percentage, updating dynamically as new drops are detected. This allows for easy tracking of significant downside moves over time.
How to Use:
Install the Script: Add this indicator to your TradingView chart.
Monitor Price Drops: The indicator will automatically detect when the price drops by over 6.5% from the previous close and display a marker on the chart and the table in the bottom right corner.
View the Table: The table displays the date and the percentage drop of each detected event, making it easy to track past significant moves.
Alerts: You can set an alert for 6.5% drops to receive notifications in real-time.
Customization Options:
The drop percentage threshold (6.5%) can be adjusted in the script to fit other market conditions or assets.
The table can be resized or styled based on user preference for better visibility.
Why Use This Indicator? This indicator is perfect for traders looking to spot large, significant price movements quickly. Large downside drops can signal potential market reversals or trading opportunities, and this tool helps you track such events effortlessly. Whether you're monitoring the VNIndex or any other asset, this indicator provides crucial insights into volatile price action, helping you make more informed decisions.
Open Source License: This indicator is open source and free to use under the Mozilla Public License 2.0. You are welcome to modify, distribute, and contribute to the project.
Contributions: Feel free to contribute improvements, fixes, or new features by creating a pull request. Let’s collaborate to make this indicator even better for the community!
Gioteen-NormThe "Gioteen-Norm" indicator is a versatile and powerful technical analysis tool designed to help traders identify key market conditions such as divergences, overbought/oversold levels, and trend strength. By normalizing price data relative to a moving average and standard deviation, this indicator provides a unique perspective on price behavior, making it easier to spot potential reversals or continuations in the market.
The indicator calculates a normalized value based on the difference between the selected price and its moving average, scaled by the standard deviation over a user-defined period. Additionally, an optional moving average of this normalized value (Green line) can be plotted to smooth the output and enhance signal clarity. This dual-line approach makes it an excellent tool for both short-term and long-term traders.
***Key Features
Divergence Detection: The Gioteen-Norm excels at identifying divergences between price action and the normalized indicator value. For example, if the price makes a higher high while Red line forms a lower high, it may signal a bearish divergence, hinting at a potential reversal.
Overbought/Oversold Conditions: Extreme values of Red line (e.g., significantly above or below zero) can indicate overbought or oversold conditions, helping traders anticipate pullbacks or bounces.
Trend Strength Insight: The normalized output reflects how far the price deviates from its average, providing a measure of momentum and trend strength.
**Customizable Parameters
Traders can adjust the period, moving average type, applied price, and shift to suit their trading style and timeframe.
**How It Works
Label1 (Red Line): Represents the normalized price deviation from a user-selected moving average (SMA, EMA, SMMA, or LWMA) divided by the standard deviation over the specified period. This line highlights the relative position of the price compared to its historical range.
Label2 (Green Line, Optional): A moving average of Label1, which smooths the normalized data to reduce noise and provide clearer signals. This can be toggled on or off via the "Draw MA" option.
**Inputs
Period: Length of the lookback period for normalization (default: 100).
MA Method: Type of moving average for normalization (SMA, EMA, SMMA, LWMA; default: EMA).
Applied Price: Price type used for calculation (Close, Open, High, Low, HL2, HLC3, HLCC4; default: Close).
Shift: Shifts the indicator forward or backward (default: 0).
Draw MA: Toggle the display of the Label2 moving average (default: true).
MA Period: Length of the moving average for Label2 (default: 50).
MA Method (Label2): Type of moving average for Label2 (SMA, EMA, SMMA, LWMA; default: SMA).
**How to Use
Divergence Trading: Look for discrepancies between price action and Label1. A bullish divergence (higher low in Label1 vs. lower low in price) may suggest a buying opportunity, while a bearish divergence could indicate a selling opportunity.
Overbought/Oversold Levels: Monitor extreme Label1 values. For instance, values significantly above +2 or below -2 could indicate overextension, though traders should define thresholds based on the asset and timeframe.
Trend Confirmation: Use Label2 to confirm trend direction. A rising Label2 suggests increasing bullish momentum, while a declining Label2 may indicate bearish pressure.
Combine with Other Tools: Pair Gioteen-Norm with support/resistance levels, RSI, or volume indicators for a more robust trading strategy.
**Notes
The indicator is non-overlay, meaning it plots below the price chart in a separate panel.
Avoid using a Period value of 1, as it may lead to unstable results due to insufficient data for standard deviation calculation.
This tool is best used as part of a broader trading system rather than in isolation.
**Why Use Gioteen-Norm?
The Gioteen-Norm indicator offers a fresh take on price normalization, blending statistical analysis with moving average techniques. Its flexibility and clarity make it suitable for traders of all levels—whether you're scalping on short timeframes or analyzing long-term trends. By publishing this for free, I hope to contribute to the TradingView community and help traders uncover hidden opportunities in the markets.
**Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice. Always backtest and validate any strategy before trading with real capital, and use proper risk management.
Manual Trade Ledger# Manual Options Trade Journal – Pine Script
This project is a Pine Script implementation for TradingView that allows users to manually log options trades into a live table overlay on a chart.
## ✨ Features
- 📥 Manual entry of ticker, premium, contracts, strike, expiry, notes
- 📈 Auto-filled live data: timestamp, price, and % change since first log
- 🧾 Tabular logging for trade journaling and exporting to Google Sheets
- 🔧 Fully customizable and designed to support product experimentation
## 🎯 Use Case
This project was built to support a real-world trading workflow for options traders who:
- Prefer to manually log trades while watching charts
- Want a visual, copyable ledger that evolves in real-time
- Want to later analyze entries/exits in spreadsheets or dashboards
## 🛠 How It Works
1. Toggle the `Log Trade` switch inside TradingView’s indicator settings
2. Fill in your trade metadata (ticker, premium, etc.)
3. The script captures timestamp, price, and calculates % change
4. Each new trade adds a row to the table (up to 50 max)
Highlight Fascia Oraria 07:00-21:00Highlight Time Range 07:00–21:00 + New Year's Line
This script automatically highlights the time range between 07:00 and 21:00 (based on the chart’s server time) with a light green semi-transparent background — perfect for traders focusing on specific intraday sessions.
It also adds a red vertical line every January 1st, clearly marking the start of each new year on the chart.
Ideal for:
Intraday trading and session analysis
Seasonal or yearly pattern tracking
Clear visual reference for time cycles
💡 Easy to customize: You can adjust the startHour and endHour values to set your preferred time range.
Chonky ATR Levels 2.0Show ATR based high/low projections.
Choose a custom ATR calculation in the indicator's settings.
The default is a 20day RMA based ATR.
----------How projections are calculated----------
To project the ATR High, the ATR value is added to the low of the current candle that matches the ATR's timeframe.
To project the ATR Low, the ATR value is subtracted from the high of the current candle that matches the ATR's timeframe.
Example:
If a 20day RMA ATR is used:
- the ATR High will be the current day's low + the ATR value.
- the ATR Low will be the current day's high - the ATR value.
*However*, if the price action exceeds either ATR projection, the opposite ATR level will be fixed to the extreme of the period.
See the AUDUSD screenshot above for an example.
The ATR Low was exceeded, so the ATR High projection is capped at the high of day.
If the ATR High is exceeded, the ATR Low would be capped at the low of day.
SmallCapToLargecapRatioThis Ratio Shows when to shift your allocation from Small Cap to Large Cap before a potential crash. So that you can protect your wealth.
Ex. When the ratio is around 2 (1.6-1.8) (Shift from SMALL CAP to LARGE CAP )
When the ratio is 1 or below (Shift from LARGE CAP to SMALL CAP )
Saeki Hisoka's Crypto Market SessionsSaeki Hisoka’s Crypto Trading Sessions Indicator Documentation
🚨 Attention Crypto Traders : Timing is everything in the market. 🚨
Crypto markets are active 24/7, but specific regions experience more liquidity and volatility at certain times. Knowing these active periods can be the difference between successful trades and missed opportunities. That's why we developed **Saeki Hisoka’s Crypto Trading Sessions Indicator**—to help you track when the major market sessions are active.
💡 Purpose of This Indicator
The Crypto market never sleeps. However, certain regions like Asia, Europe, and the US have distinct active hours that influence volatility and liquidity. This indicator helps you easily visualize these timeframes so you can align your trading strategy with peak market activity.
🌍 T rading Sessions Covered :
- Asia Session (00:00 - 09:00 UTC) :
- Key Hubs: Tokyo, Hong Kong, Singapore, Shanghai, Seoul
- Asia sets the tone for the day's price action with high liquidity and institutional movements.
- Europe Session (07:00 - 16:00 UTC) :
- Key Hubs: London, Frankfurt, Zurich, Paris, Amsterdam
- Europe drives significant volatility, especially during overlaps with the Asia session.
- US Session (13:00 - 22:00 UTC) :
- Key Hubs: New York, Chicago, Toronto, San Francisco
- The US session is often where the final big moves happen, driven by major institutional players.
🔧 Setup Instructions
This indicator is plug-and-play and easy to use! Once added to your chart, the indicator will automatically highlight the three key trading sessions with corresponding labels:
- Asia : Light blue background with an "Asia" label
- Europe : Light green background with a "Europe" label
- US : Light red background with a "US" label
How to Add :
Follow these simple steps to add the Crypto Trading Sessions Indicator to your TradingView chart:
1. Open TradingView :
- Log into your TradingView account or create one if you haven’t already.
- Open the chart of your choice.
2. Go to the Pine Script Editor :
- At the top of your TradingView chart, click on the **Pine Editor** tab.
3. Copy and Paste the Provided Code :
- Copy the code provided for the **Saeki Hisoka’s Crypto Trading Sessions Indicator**.
- Paste the code into the Pine Script Editor window.
4. Add to Chart :
- After pasting the code, click on **Add to Chart** at the top of the editor.
- The indicator will now be applied to your chart, automatically highlighting the trading sessions for Asia, Europe, and the US with corresponding labels and background colors.
5. Adjust and Customize (Optional) :
- You can customize the appearance of the indicator by modifying the color settings or label positions directly in the script.
- If you wish to modify time settings for the trading sessions, adjust the times in the session definitions within the code.
6. Verify :
- Once the indicator is added, the chart will automatically show the regions with background colors and labels for Asia , Europe , and US trading sessions.
- The sessions will be clearly marked, giving you insight into when liquidity and volatility are expected to be highest.
Important Note:This version of the indicator is currently restricted to timeframes up to 8 hours . Future updates and versions will enable support for all timeframes.
How to Use
* Strategic Entry & Exit Points : With the indicator showing you the exact active times for each session, you can time your entries and exits around periods of high liquidity and volatility.
* Identify Key Breakouts & Volatility Shifts : The Asia session often opens with slower movements, the Europe session may bring consolidation or reversals, and the US session typically results in more volatile moves. Use this information to plan your trades effectively.
* Risk Management : During volatile periods (such as the overlap between the European and US sessions), manage your risk by setting stop losses and take profits before sharp price movements.
Key Takeaways:
- Crypto markets never sleep**, but each region has its most active time periods.
- Timing your trades** around these sessions can give you a competitive edge.
- This indicator helps align your strategy with the market’s natural flow, reducing emotional trading and increasing profitability.
Conclusion: A Strategic Edge for Every Trader
By knowing when the major trading regions are active, you gain a tactical advantage in your trading. This tool isn't just for retail traders—it's how the major institutional players navigate the market.
Stay ahead. Trade smart. Leverage the Saeki Hisoka’s Crypto Trading Sessions Indicator.
-
Disclaimer:
The system is rigged, but we can play the game better.* This indicator is a tool for precision. It’s not just about speculation—it’s about control. Follow Saeki Hisoka for more insights on the markets.
Feel free to share this documentation with your audience. The tool is ready for plug-and-play use, and future updates will ensure more functionality across all timeframes.
Uptrick: Z-Score FlowOverview
Uptrick: Z-Score Flow is a technical indicator that integrates trend-sensitive momentum analysi s with mean-reversion logic derived from Z-Score calculations. Its primary objective is to identify market conditions where price has either stretched too far from its mean (overbought or oversold) or sits at a statistically “normal” range, and then cross-reference this observation with trend direction and RSI-based momentum signals. The result is a more contextual approach to trade entry and exit, emphasizing precision, clarity, and adaptability across varying market regimes.
Introduction
Financial instruments frequently transition between trending modes, where price extends strongly in one direction, and ranging modes, where price oscillates around a central value. A simple statistical measure like Z-Score can highlight price extremes by comparing the current price against its historical mean and standard deviation. However, such extremes alone can be misleading if the broader market structure is trending forcefully. Uptrick: Z-Score Flow aims to solve this gap by combining Z-Score with an exponential moving average (EMA) trend filter and a smoothed RSI momentum check, thus filtering out signals that contradict the prevailing market environment.
Purpose
The purpose of this script is to help traders pinpoint both mean-reversion opportunities and trend-based pullbacks in a way that is statistically grounded yet still mindful of overarching price action. By pairing Z-Score thresholds with supportive conditions, the script reduces the likelihood of acting on random price spikes or dips and instead focuses on movements that are significant within both historical and current contextual frameworks.
Originality and Uniquness
Layered Signal Verification: Signals require the fulfillment of multiple layers (Z-Score extreme, EMA trend bias, and RSI momentum posture) rather than merely breaching a statistical threshold.
RSI Zone Lockout: Once RSI enters an overbought/oversold zone and triggers a signal, the script locks out subsequent signals until RSI recovers above or below those zones, limiting back-to-back triggers.
Controlled Cooldown: A dedicated cooldown mechanic ensures that the script waits a specified number of bars before issuing a new signal in the opposite direction.
Gradient-Based Visualization: Distinct gradient fills between price and the Z-Mean line enhance readability, showing at a glance whether price is trading above or below its statistical average.
Comprehensive Metrics Panel: An optional on-chart table summarizes the Z-Score’s key metrics, streamlining the process of verifying current statistical extremes, mean levels, and momentum directions.
Why these indicators were merged
Z-Score measurements excel at identifying when price deviates from its mean, but they do not intrinsically reveal whether the market’s trajectory supports a reversion or if price might continue along its trend. The EMA, commonly used for spotting trend directions, offers valuable insight into whether price is predominantly ascending or descending. However, relying solely on a trend filter overlooks the intensity of price moves. RSI then adds a dedicated measure of momentum, helping confirm if the market’s energy aligns with a potential reversal (for example, price is statistically low but RSI suggests looming upward momentum). By uniting these three lenses—Z-Score for statistical context, EMA for trend direction, and RSI for momentum force—the script offers a more comprehensive and adaptable system, aiming to avoid false positives caused by focusing on just one aspect of price behavior.
Calculations
The core calculation begins with a simple moving average (SMA) of price over zLen bars, referred to as the basis. Next, the script computes the standard deviation of price over the same window. Dividing the difference between the current price and the basis by this standard deviation produces the Z-Score, indicating how many standard deviations the price is from its mean. A positive Z-Score reveals price is above its average; a negative reading indicates the opposite.
To detect overall market direction, the script calculates an exponential moving average (emaTrend) over emaTrendLen bars. If price is above this EMA, the script deems the market bullish; if below, it’s considered bearish. For momentum confirmation, the script computes a standard RSI over rsiLen bars, then applies a smoothing EMA over rsiEmaLen bars. This smoothed RSI (rsiEma) is monitored for both its absolute level (oversold or overbought) and its slope (the difference between the current and previous value). Finally, slopeIndex determines how many bars back the script compares the basis to check whether the Z-Mean line is generally rising, falling, or flat, which then informs the coloring scheme on the chart.
Calculations and Rational
Simple Moving Average for Baseline: An SMA is used for the core mean because it places equal weight on each bar in the lookback period. This helps maintain a straightforward interpretation of overbought or oversold conditions in the context of a uniform historical average.
Standard Deviation for Volatility: Standard deviation measures the variability of the data around the mean. By dividing price’s difference from the mean by this value, the Z-Score can highlight whether price is unusually stretched given typical volatility.
Exponential Moving Average for Trend: Unlike an SMA, an EMA places more emphasis on recent data, reacting quicker to new price developments. This quicker response helps the script promptly identify trend shifts, which can be crucial for filtering out signals that go against a strong directional move.
RSI for Momentum Confirmation: RSI is an oscillator that gauges price movement strength by comparing average gains to average losses over a set period. By further smoothing this RSI with another EMA, short-lived oscillations become less influential, making signals more robust.
SlopeIndex for Slope-Based Coloring: To clarify whether the market’s central tendency is rising or falling, the script compares the basis now to its level slopeIndex bars ago. A higher current reading indicates an upward slope; a lower reading, a downward slope; and similar readings, a flat slope. This is visually represented on the chart, providing an immediate sense of the directionality.
Inputs
zLen (Z-Score Period)
Specifies how many bars to include for computing the SMA and standard deviation that form the basis of the Z-Score calculation. Larger values produce smoother but slower signals; smaller values catch quick changes but may generate noise.
emaTrendLen (EMA Trend Filter)
Sets the length of the EMA used to detect the market’s primary direction. This is pivotal for distinguishing whether signals should be considered (price aligning with an uptrend or downtrend) or filtered out.
rsiLen (RSI Length)
Defines the window for the initial RSI calculation. This RSI, when combined with the subsequent smoothing EMA, forms the foundation for momentum-based signal confirmations.
rsiEmaLen (EMA of RSI Period)
Applies an exponential moving average over the RSI readings for additional smoothing. This step helps mitigate rapid RSI fluctuations that might otherwise produce whipsaw signals.
zBuyLevel (Z-Score Buy Threshold)
Determines how negative the Z-Score must be for the script to consider a potential oversold signal. If the Z-Score dives below this threshold (and other criteria are met), a buy signal is generated.
zSellLevel (Z-Score Sell Threshold)
Determines how positive the Z-Score must be for a potential overbought signal. If the Z-Score surpasses this threshold (and other checks are satisfied), a sell signal is generated.
cooldownBars (Cooldown (Bars))
Enforces a bar-based delay between opposite signals. Once a buy signal has fired, the script must wait the specified number of bars before registering a new sell signal, and vice versa.
slopeIndex (Slope Sensitivity (Bars))
Specifies how many bars back the script compares the current basis for slope coloration. A bigger slopeIndex highlights larger directional trends, while a smaller number emphasizes shorter-term shifts.
showMeanLine (Show Z-Score Mean Line)
Enables or disables the plotting of the Z-Mean and its slope-based coloring. Traders who prefer minimal chart clutter may turn this off while still retaining signals.
Features
Statistical Core (Z-Score Detection):
This feature computes the Z-Score by taking the difference between the current price and the basis (SMA) and dividing by the standard deviation. In effect, it translates price fluctuations into a standardized measure that reveals how significant a move is relative to the typical variation seen over the lookback. When the Z-Score crosses predefined thresholds (zBuyLevel for oversold and zSellLevel for overbought), it signals that price could be at an extreme.
How It Works: On each bar, the script updates the SMA and standard deviation. The Z-Score is then refreshed accordingly. Traders can interpret particularly large negative or positive Z-Score values as scenarios where price is abnormally low or high.
EMA Trend Filter:
An EMA over emaTrendLen bars is used to classify the market as bullish if the price is above it and bearish if the price is below it. This classification is applied to the Z-Score signals, accepting them only when they align with the broader price direction.
How It Works: If the script detects a Z-Score below zBuyLevel, it further checks if price is actually in a downtrend (below EMA) before issuing a buy signal. This might seem counterintuitive, but a “downtrend” environment plus an oversold reading often signals a potential bounce or a mean-reversion play. Conversely, for sell signals, the script checks if the market is in an uptrend first. If it is, an overbought reading aligns with potential profit-taking.
RSI Momentum Confirmation with Oversold/Overbought Lockout:
RSI is calculated over rsiLen, then smoothed by an EMA over rsiEmaLen. If this smoothed RSI dips below a certain threshold (for example, 30) and then begins to slope upward, the indicator treats it as a potential sign of recovering momentum. Similarly, if RSI climbs above a certain threshold (for instance, 70) and starts to slope downward, that suggests dwindling momentum. Additionally, once RSI is in these zones, the indicator locks out repetitive signals until RSI fully exits and re-enters those extreme territories.
How It Works: Each bar, the script measures whether RSI has dropped below the oversold threshold (like 30) and has a positive slope. If it does, the buy side is considered “unlocked.” For sell signals, RSI must exceed an overbought threshold (70) and slope downward. The combination of threshold and slope helps confirm that a reversal is genuinely in progress instead of issuing signals while momentum remains weak or stuck in extremes.
Cooldown Mechanism:
The script features a custom bar-based cooldown that prevents issuing new signals in the opposite direction immediately after one is triggered. This helps avoid whipsaw situations where the market quickly flips from oversold to overbought or vice versa.
How It Works: When a buy signal fires, the indicator notes the bar index. If the Z-Score and RSI conditions later suggest a sell, the script compares the current bar index to the last buy signal’s bar index. If the difference is within cooldownBars, the signal is disallowed. This ensures a predefined “quiet period” before switching signals.
Slope-Based Coloring (Z-Mean Line and Shadow):
The script compares the current basis value to its value slopeIndex bars ago. A higher reading now indicates a generally upward slope, while a lower reading indicates a downward slope. The script then shades the Z-Mean line in a corresponding bullish or bearish color, or remains neutral if little change is detected.
How It Works: This slope calculation is refreshingly straightforward: basis – basis . If the result is positive, the line is colored bullish; if negative, it is colored bearish; if approximately zero, it remains neutral. This provides a quick visual cue of the medium-term directional bias.
Gradient Overlays:
With gradient fills, the script highlights where price stands in relation to the Z-Mean. When price is above the basis, a purple-shaded region is painted, visually indicating a “bearish zone” for potential overbought conditions. When price is below, a teal-like overlay is used, suggesting a “bullish zone” for potential oversold conditions.
How It Works: Each bar, the script checks if price is above or below the basis. It then applies a fill between close and basis, using distinct colors to show whether the market is trading above or below its mean. This creates an immediate sense of how extended the market might be.
Buy and Sell Labels (with Alerts):
When a legitimate buy or sell condition passes every check (Z-Score threshold, EMA trend alignment, RSI gating, and cooldown clearance), the script plots a corresponding label directly on the chart. It also fires an alert (if alerts are set up), making it convenient for traders who want timely notifications.
How It Works: If rawBuy or rawSell conditions are met (refined by RSI, EMA trend, and cooldown constraints), the script calls the respective plot function to paint an arrow label on the chart. Alerts are triggered simultaneously, carrying easily recognizable messages.
Metrics Table:
The optional on-chart table (activated by showMetrics) presents real-time Z-Score data, including the current Z-Score, its rolling mean, the maximum and minimum Z-Score values observed over the last zLen bars, a percentile position, and a short-term directional note (rising, falling, or flat).
Current – The present Z-Score reading
Mean – Average Z-Score over the zLen period
Min/Max – Lowest and highest Z-Score values within zLen
Position – Where the current Z-Score sits between the min and max (as a percentile)
Trend – Whether the Z-Score is increasing, decreasing, or flat
Conclusion
Uptrick: Z-Score Flow offers a versatile solution for traders who need a statistically informed perspective on price extremes combined with practical checks for overall trend and momentum. By leveraging a well-defined combination of Z-Score, EMA trend classification, RSI-based momentum gating, slope-based visualization, and a cooldown mechanic, the script reduces the occurrence of false or premature signals. Its gradient fills and optional metrics table contribute further clarity, ensuring that users can quickly assess market posture and make more confident trading decisions in real time.
Disclaimer
This script is intended solely for informational and educational purposes. Trading in any financial market comes with substantial risk, and there is no guarantee of success or the avoidance of loss. Historical performance does not ensure future results. Always conduct thorough research and consider professional guidance prior to making any investment or trading decisions.
15% Below Daily LowESPP discount pricing (15%) - Line chart that follows the daily low of the chart to show what price you could buy a company stock with the typical discount of 15%.
Global M2 Money SupplyAn indicator looking at the total money, of the largest economies, in circulation. I like to use it to analyze the lag between Bitcoin and liquidity. I think 109 days or a 16 week delay is the most accurate lag when contrasting both charts together (you can manually change the offset in the indicator's settings).
Open Price on Selected TimeframeIndicator Name: Open Price on Selected Timeframe
Short Title: Open Price mtf
Type: Technical Indicator
Description:
Open Price on Selected Timeframe is an indicator that displays the Open price of a specific timeframe on your chart, with the ability to dynamically change the color of the open price line based on the change between the current candle's open and the previous candle's open.
Selectable Timeframes: You can choose the timeframe you wish to monitor the Open price of candles, ranging from M1, M5, M15, H1, H4 to D1, and more.
Dynamic Color Change: The Open price line changes to green when the open price of the current candle is higher than the open price of the previous candle, and to red when the open price of the current candle is lower than the open price of the previous candle. This helps users quickly identify trends and market changes.
Features:
Easy Timeframe Selection: Instead of editing the code, users can select the desired timeframe from the TradingView interface via a dropdown.
Dynamic Color Change: The color of the Open price line changes automatically based on whether the open price of the current candle is higher or lower than the previous candle.
Easily Track Open Price Levels: The indicator plots a horizontal line at the Open price of the selected timeframe, making it easy for users to track this important price level.
How to Use:
Select the Timeframe: Users can choose the timeframe they want to track the Open price of the candles.
Interpret the Color Signal: When the open price of the current candle is higher than the open price of the previous candle, the Open price line is colored green, signaling an uptrend. When the open price of the current candle is lower than the open price of the previous candle, the Open price line turns red, signaling a downtrend.
Observe the Open Price Levels: The indicator will draw a horizontal line at the Open price level of the selected timeframe, allowing users to easily monitor this important price.
Benefits:
Enhanced Technical Analysis: The indicator allows you to quickly identify trends and market changes, making it easier to make trading decisions.
User-Friendly: No need to modify the code; simply select your preferred timeframe to start using the indicator.
Disclaimer:
This indicator is not a complete trading signal. It only provides information about the Open price and related trends. Users should combine it with other technical analysis tools to make more informed trading decisions.
Summary:
Open Price on Selected Timeframe is a simple yet powerful indicator that helps you track the Open price on various timeframes with the ability to change colors dynamically, providing a visual representation of the market's trend.
Fuerza relativa vs SP500This TradingView indicator analyzes the daily relative strength of a selected asset compared to the SP500, and provides both a visual histogram and a scoring system based on recent performance over the last 10 candles.
✅ Green: SP500 is down, but the asset is up (strong bullish signal).
🟧 Orange: SP500 is down, asset also down but performing better than the SP500 (mild strength).
🔴 Red: SP500 is down, and the asset performs even worse (clear weakness).
🟩 Light green: SP500 is up, and the asset performs better (moderate strength).
🟧 Light orange: SP500 is up, but the asset performs worse (mild weakness)
SPY Frequent Trading Strategythis is my SPY long term trading strategy:
entry if all conditions are met:
5 day rs is below 30
5 day rsi reading is down for the third day in a row
5 day rsi was below 60 three trading days ago
the close is higher than the 200 day moving average
exit when the 5 day rsi is above 50
I want to convert it into a strategy that trades more frequently, so adjust the rules so that it willl be taking multiple trades a week. and build it in pine script
Candle Height & Trend Probability DashboardDescription and Guide
Description:
This Pine Script for TradingView displays a dashboard that calculates the probability of price increases or decreases based on past price movements. It analyzes the last 30 candles (by default) and shows the probabilities for different timeframes (from 1 minute to 1 week). Additionally, it checks volatility using the ATR indicator.
Script Features:
Calculates probabilities of an upward (Up %) or downward (Down %) price move based on past candles.
Displays a dashboard showing probabilities for multiple timeframes.
Color-coded probability display:
Green if the upward probability exceeds a set threshold.
Red if the downward probability exceeds the threshold.
Yellow if neither threshold is exceeded.
Considers volatility using the ATR indicator.
Triggers alerts when probabilities exceed specific values.
How to Use:
Insert the script into TradingView: Copy and paste the script into the Pine Script editor.
Adjust parameters:
lookback: Number of past candles used for calculation (default: 30).
alertThresholdUp & alertThresholdDown: Thresholds for probabilities (default: 51%).
volatilityLength & volatilityThreshold: ATR volatility settings.
dashboardPosition: Choose where the dashboard appears on the chart.
Enable visualization: The dashboard will be displayed over the chart.
Set alerts: The script triggers notifications when probabilities exceed set thresholds.
UStarO1CrtLibLibrary "UStarO1CrtLib"
TODO: add library description here
fun(x)
fun: test basic function call in a library
Parameters:
x (float)
Returns: y: number x + 10
createFVGInfo(h, l, bull, t, tv)
Parameters:
h (float)
l (float)
bull (int)
t (int)
tv (float)
createFVG(FVGInfoF)
Parameters:
FVGInfoF (FVGInfo)
safeDeleteFVG(fvg)
Parameters:
fvg (FVG)
findValRtnTime(valToFind, toSearch, searchMode, lo, hi, ti)
Parameters:
valToFind (float)
toSearch (string)
searchMode (string)
lo (array)
hi (array)
ti (array)
createOrderBlock(orderBlockInfoF)
Parameters:
orderBlockInfoF (orderBlockInfo)
safeDeleteOrderBlock(orderBlockF)
Parameters:
orderBlockF (orderBlock)
arrHasOB(arr, obF)
Parameters:
arr (array)
obF (orderBlock)
moveLine(_line, _x, _y, _x2)
Parameters:
_line (line)
_x (int)
_y (float)
_x2 (int)
moveBox(_box, _topLeftX, _topLeftY, _bottomRightX, _bottomRightY)
Parameters:
_box (box)
_topLeftX (int)
_topLeftY (float)
_bottomRightX (int)
_bottomRightY (float)
colorWithTransparency(colorF, transparencyX)
Parameters:
colorF (color)
transparencyX (float)
createFVGBox(boxColor, transparencyX, xlocType, textColor)
Parameters:
boxColor (color)
transparencyX (float)
xlocType (string)
textColor (color)
renderOrderBlock(ob, bullOrderBlockColor, bearOrderBlockColor, OBsEnabled, breakersFull, BBsEnabled, showInvalidated, changeCombinedFVGsColor, orderBlockVolumetricInfo, extendZonesDynamic, extendZonesByTime, volumeBarsLeftSide, combinedText, mirrorVolumeBars, textColor, curTFMMS)
Parameters:
ob (orderBlock)
bullOrderBlockColor (simple color)
bearOrderBlockColor (simple color)
OBsEnabled (bool)
breakersFull (bool)
BBsEnabled (bool)
showInvalidated (bool)
changeCombinedFVGsColor (bool)
orderBlockVolumetricInfo (bool)
extendZonesDynamic (bool)
extendZonesByTime (int)
volumeBarsLeftSide (bool)
combinedText (bool)
mirrorVolumeBars (bool)
textColor (color)
curTFMMS (int)
handleOrderBlocksFinal(DEBUG, orderBlockInfoList, allOrderBlocksList, dbgShowBBFVG, bullOrderBlockColor, bearOrderBlockColor, OBsEnabled, breakersFull, BBsEnabled, showInvalidated, changeCombinedFVGsColor, orderBlockVolumetricInfo, extendZonesDynamic, extendZonesByTime, volumeBarsLeftSide, combinedText, mirrorVolumeBars, textColor, curTFMMS)
Parameters:
DEBUG (bool)
orderBlockInfoList (array)
allOrderBlocksList (array)
dbgShowBBFVG (bool)
bullOrderBlockColor (simple color)
bearOrderBlockColor (simple color)
OBsEnabled (bool)
breakersFull (bool)
BBsEnabled (bool)
showInvalidated (bool)
changeCombinedFVGsColor (bool)
orderBlockVolumetricInfo (bool)
extendZonesDynamic (bool)
extendZonesByTime (int)
volumeBarsLeftSide (bool)
combinedText (bool)
mirrorVolumeBars (bool)
textColor (color)
curTFMMS (int)
arrHasFVG(arr, fvgF)
Parameters:
arr (array)
fvgF (FVG)
arrHasIFVG(arr, fvgF)
Parameters:
arr (array)
fvgF (FVG)
renderFVG(fvg, customEndTime, fvgEnabled, ifvgEnabled, showInvalidated, fvgVolumetricInfo, changeCombinedFVGsColor, combinedColor, fvgBullColor, fvgBearColor, textColor, extendZonesByTime, extendZonesDynamic, volumeBarsLeftSide, bearishInverseColor, bullishInverseColor, combinedText, mirrorVolumeBars, ifvgFull, ifvgVolumetricInfo)
Parameters:
fvg (FVG)
customEndTime (int)
fvgEnabled (bool)
ifvgEnabled (bool)
showInvalidated (bool)
fvgVolumetricInfo (bool)
changeCombinedFVGsColor (bool)
combinedColor (color)
fvgBullColor (color)
fvgBearColor (color)
textColor (color)
extendZonesByTime (int)
extendZonesDynamic (bool)
volumeBarsLeftSide (bool)
bearishInverseColor (color)
bullishInverseColor (color)
combinedText (bool)
mirrorVolumeBars (bool)
ifvgFull (bool)
ifvgVolumetricInfo (bool)
areaOfFVG(FVGInfoF)
Parameters:
FVGInfoF (FVGInfo)
doFVGsTouch(FVGInfo1, FVGInfo2, overlapThresholdPercentage)
Parameters:
FVGInfo1 (FVGInfo)
FVGInfo2 (FVGInfo)
overlapThresholdPercentage (float)
isFVGValid(FVGInfoF, showInvalidated)
Parameters:
FVGInfoF (FVGInfo)
showInvalidated (bool)
isIFVGValid(FVGInfoF, showInvalidated, ifvgEnabled)
Parameters:
FVGInfoF (FVGInfo)
showInvalidated (bool)
ifvgEnabled (bool)
isFVGValidInTimeframe(FVGInfoF, showInvalidated, deleteUntouched, minimumFVGSize, deleteUntouchedAfterXBars)
Parameters:
FVGInfoF (FVGInfo)
showInvalidated (bool)
deleteUntouched (bool)
minimumFVGSize (int)
deleteUntouchedAfterXBars (int)
isIFVGValidInTimeframe(FVGInfoF, ifvgEnabled, deleteUntouched, showInvalidated, minimumIFVGSize, deleteUntouchedAfterXBars)
Parameters:
FVGInfoF (FVGInfo)
ifvgEnabled (bool)
deleteUntouched (bool)
showInvalidated (bool)
minimumIFVGSize (int)
deleteUntouchedAfterXBars (int)
combineFVGsFunc(allFVGList, showInvalidated, overlapThresholdPercentage)
Parameters:
allFVGList (array)
showInvalidated (bool)
overlapThresholdPercentage (float)
handleFVGsFinal(DEBUG, allFVGList, FVGInfoList, combineFVGs, extendLastFVGs, extendLastXFVGsCount, dbgShowBBFVG, overlapThresholdPercentage, customEndTime, fvgEnabled, ifvgEnabled, showInvalidated, fvgVolumetricInfo, changeCombinedFVGsColor, combinedColor, fvgBullColor, fvgBearColor, textColor, extendZonesByTime, extendZonesDynamic, volumeBarsLeftSide, bearishInverseColor, bullishInverseColor, combinedText, mirrorVolumeBars, ifvgFull, ifvgVolumetricInfo)
Parameters:
DEBUG (bool)
allFVGList (array)
FVGInfoList (array)
combineFVGs (bool)
extendLastFVGs (bool)
extendLastXFVGsCount (int)
dbgShowBBFVG (bool)
overlapThresholdPercentage (float)
customEndTime (int)
fvgEnabled (bool)
ifvgEnabled (bool)
showInvalidated (bool)
fvgVolumetricInfo (bool)
changeCombinedFVGsColor (bool)
combinedColor (color)
fvgBullColor (color)
fvgBearColor (color)
textColor (color)
extendZonesByTime (int)
extendZonesDynamic (bool)
volumeBarsLeftSide (bool)
bearishInverseColor (color)
bullishInverseColor (color)
combinedText (bool)
mirrorVolumeBars (bool)
ifvgFull (bool)
ifvgVolumetricInfo (bool)
findOrderBlocks(maxDistanceToLastBar, maxBarsBack, OBsEnabled, BBsEnabled, swingType, orderBlockInfoList, obEndMethod, bbEndMethod, atr, maxATRMult, maxOrderBlocks, bi, hi_sw, li_sw)
Parameters:
maxDistanceToLastBar (int)
maxBarsBack (int)
OBsEnabled (bool)
BBsEnabled (bool)
swingType (int)
orderBlockInfoList (array)
obEndMethod (string)
bbEndMethod (string)
atr (float)
maxATRMult (float)
maxOrderBlocks (int)
bi (int)
hi_sw (float)
li_sw (float)
orderBlockInfo
Fields:
top (series float)
bottom (series float)
obVolume (series float)
obType (series string)
startTime (series int)
bbVolume (series float)
obLowVolume (series float)
obHighVolume (series float)
breaker (series bool)
breakTime (series int)
breakerEndTime (series int)
timeframeStr (series string)
disabled (series bool)
combinedTimeframesStr (series string)
combined (series bool)
orderBlock
Fields:
info (orderBlockInfo)
isRendered (series bool)
orderBox (series box)
breakerBox (series box)
orderBoxLineTop (series line)
orderBoxLineBottom (series line)
breakerBoxLineTop (series line)
breakerBoxLineBottom (series line)
orderBoxText (series box)
orderBoxPositive (series box)
orderBoxNegative (series box)
orderSeperator (series line)
orderTextSeperator (series line)
FVGInfo
Fields:
max (series float)
min (series float)
isBull (series int)
t (series int)
totalVolume (series float)
startBarIndex (series int)
endBarIndex (series int)
startTime (series int)
endTime (series int)
extendInfinite (series bool)
combined (series bool)
combinedTimeframesStr (series string)
disabled (series bool)
timeframeStr (series string)
lowVolume (series float)
highVolume (series float)
isInverse (series bool)
lastTouched (series int)
lastTouchedIFVG (series int)
inverseEndIndex (series int)
inverseEndTime (series int)
inverseVolume (series float)
FVG
Fields:
info (FVGInfo)
isRendered (series bool)
fvgBox (series box)
ifvgBox (series box)
fvgBoxText (series box)
fvgBoxPositive (series box)
fvgBoxNegative (series box)
fvgSeperator (series line)
fvgTextSeperator (series line)
obSwing
Fields:
x (series int)
y (series float)
crossed (series bool)
barInfo
Fields:
o (series float)
h (series float)
l (series float)
c (series float)
tr (series float)
atr (series float)
CRT
Fields:
state (series string)
startTime (series int)
overlapDirection (series string)
bulkyTimeLow (series int)
bulkyTimeHigh (series int)
bulkyHigh (series float)
bulkyLow (series float)
breakTime (series int)
fvg (FVG)
fvgEndTime (series int)
ob (orderBlock)
slTarget (series float)
tpTarget (series float)
entryType (series string)
entryTime (series int)
exitTime (series int)
entryPrice (series float)
exitPrice (series float)
dayEndedBeforeExit (series int)