Engulfing w/ Liquidity Sweep (Bullish & Bearish)This indicator shows both a “bullish” and Bearish engulfing bar close that has swept previous candles liquidity . This bar is a very important part of my trading strategy . After a liquidity sweep, followed by an engulfing candle, after a retracement ( usually no greater than 75% or trade will be invalid), then we can look to target the previous candles low, or further extend the trend
指標和策略
Test OHLCV LibraryThis indicator, "Test OHLCV Library," serves as a practical example of how to use the OHLCVData library to fetch historical candle data from a specific timeframe (like 4H) in a way that is largely impervious to the chart's currently selected time frame.
Here's a breakdown of its purpose and how it addresses request.security limitations:
Indicator Purpose:
The main goal of this indicator is to demonstrate and verify that the OHLCVData library can reliably provide confirmed historical OHLCV data for a user-specified timeframe (e.g., 4H), and that a collection of these data points (the last 10 completed candles) remains consistent even when the user switches the chart's time frame (e.g., from 5-second to Daily).
It does this by:
Importing the OHLCVData library.
Using the library's getTimeframeData function on every bar of the chart.
Checking the isTargetBarClosed flag returned by the library to identify the exact moment a candle in the target timeframe (e.g., 4H) has closed.
When isTargetBarClosed is true, it captures the confirmed OHLCV data provided by the library for that moment and stores it in a persistent var array.
It maintains a list of the last 10 captured historical 4H candle opens in this array.
It displays these last 10 confirmed opens in a table.
It uses the isAdjustedToChartTF flag from the library to show a warning if the chart's time frame is higher than the target timeframe, indicating that the data fetched by request.security is being aligned to that higher resolution.
Circumventing request.security Limitations:
The primary limitation of request.security that this setup addresses is the challenge of getting a consistent, non-repainting collection of historical data points from a different timeframe when the chart's time frame is changed.
The Problem: Standard request.security calls, while capable of fetching data from other timeframes, align that data to the bars of the current chart. When you switch the chart's time frame, the set of chart bars changes, and the way the requested data aligns to these new bars changes. If you simply collected data on every chart bar where request.security returned a non-na value, the resulting collection would differ depending on the chart's resolution. Furthermore, using request.security without lookahead=barmerge.lookahead_off or an offset ( ) can lead to repainting on historical bars, where values change as the script recalculates.
How the Library/Indicator Setup Helps:
Confirmed Data: The OHLCVData library uses lookahead=barmerge.lookahead_off and, more importantly, provides the isTargetBarClosed flag. This flag is calculated using a reliable method (checking for a change in the target timeframe's time series) that accurately identifies the precise chart bar corresponding to the completion of a candle in the target timeframe (e.g., a 4H candle), regardless of the chart's time frame.
Precise Capture: The indicator only captures and stores the OHLCV data into its var array when this isTargetBarClosed flag is true. This means it's capturing the confirmed, finalized data for the target timeframe candle at the exact moment it closes.
Persistent Storage: The var array in the indicator persists its contents across the bars of the chart's history. As the script runs through the historical bars, it selectively adds confirmed 4H candle data points to this array only when the trigger is met.
Impervious Collection: Because the array is populated based on the completion of the target timeframe candles (detected reliably by the library) rather than simply collecting data on every chart bar, the final contents of the array (the list of the last 10 confirmed 4H opens) will be the same regardless of the chart's time frame. The table then displays this static collection.
In essence, this setup doesn't change how request.security fundamentally works or aligns data to the chart's bars. Instead, it uses the capabilities of request.security (fetching data from another timeframe) and Pine Script's execution model (bar-by-bar processing, var persistence) in a specific way, guided by the library's logic, to build a historical collection of data points that represent the target timeframe's candles and are independent of the chart's display resolution.
S&P 500 Top 25 - EPS AnalysisEarnings Surprise Analysis Framework for S&P 500 Components: A Technical Implementation
The "S&P 500 Top 25 - EPS Analysis" indicator represents a sophisticated technical implementation designed to analyze earnings surprises among major market constituents. Earnings surprises, defined as the deviation between actual reported earnings per share (EPS) and analyst estimates, have been consistently documented as significant market-moving events with substantial implications for price discovery and asset valuation (Ball and Brown, 1968; Livnat and Mendenhall, 2006). This implementation provides a comprehensive framework for quantifying and visualizing these deviations across multiple timeframes.
The methodology employs a parameterized approach that allows for dynamic analysis of up to 25 top market capitalization components of the S&P 500 index. As noted by Bartov et al. (2002), large-cap stocks typically demonstrate different earnings response coefficients compared to their smaller counterparts, justifying the focus on market leaders.
The technical infrastructure leverages the TradingView Pine Script language (version 6) to construct a real-time analytical framework that processes both actual and estimated EPS data through the platform's request.earnings() function, consistent with approaches described by Pine (2022) in financial indicator development documentation.
At its core, the indicator calculates three primary metrics: actual EPS, estimated EPS, and earnings surprise (both absolute and percentage values). This calculation methodology aligns with standardized approaches in financial literature (Skinner and Sloan, 2002; Ke and Yu, 2006), where percentage surprise is computed as: (Actual EPS - Estimated EPS) / |Estimated EPS| × 100. The implementation rigorously handles potential division-by-zero scenarios and missing data points through conditional logic gates, ensuring robust performance across varying market conditions.
The visual representation system employs a multi-layered approach consistent with best practices in financial data visualization (Few, 2009; Tufte, 2001).
The indicator presents time-series plots of the four key metrics (actual EPS, estimated EPS, absolute surprise, and percentage surprise) with customizable color-coding that defaults to industry-standard conventions: green for actual figures, blue for estimates, red for absolute surprises, and orange for percentage deviations. As demonstrated by Padilla et al. (2018), appropriate color mapping significantly enhances the interpretability of financial data visualizations, particularly for identifying anomalies and trends.
The implementation includes an advanced background coloring system that highlights periods of significant earnings surprises (exceeding ±3%), a threshold identified by Kinney et al. (2002) as statistically significant for market reactions.
Additionally, the indicator features a dynamic information panel displaying current values, historical maximums and minimums, and sample counts, providing important context for statistical validity assessment.
From an architectural perspective, the implementation employs a modular design that separates data acquisition, processing, and visualization components. This separation of concerns facilitates maintenance and extensibility, aligning with software engineering best practices for financial applications (Johnson et al., 2020).
The indicator processes individual ticker data independently before aggregating results, mitigating potential issues with missing or irregular data reports.
Applications of this indicator extend beyond merely observational analysis. As demonstrated by Chan et al. (1996) and more recently by Chordia and Shivakumar (2006), earnings surprises can be successfully incorporated into systematic trading strategies. The indicator's ability to track surprise percentages across multiple companies simultaneously provides a foundation for sector-wide analysis and potentially improves portfolio management during earnings seasons, when market volatility typically increases (Patell and Wolfson, 1984).
References:
Ball, R., & Brown, P. (1968). An empirical evaluation of accounting income numbers. Journal of Accounting Research, 6(2), 159-178.
Bartov, E., Givoly, D., & Hayn, C. (2002). The rewards to meeting or beating earnings expectations. Journal of Accounting and Economics, 33(2), 173-204.
Bernard, V. L., & Thomas, J. K. (1989). Post-earnings-announcement drift: Delayed price response or risk premium? Journal of Accounting Research, 27, 1-36.
Chan, L. K., Jegadeesh, N., & Lakonishok, J. (1996). Momentum strategies. The Journal of Finance, 51(5), 1681-1713.
Chordia, T., & Shivakumar, L. (2006). Earnings and price momentum. Journal of Financial Economics, 80(3), 627-656.
Few, S. (2009). Now you see it: Simple visualization techniques for quantitative analysis. Analytics Press.
Gu, S., Kelly, B., & Xiu, D. (2020). Empirical asset pricing via machine learning. The Review of Financial Studies, 33(5), 2223-2273.
Johnson, J. A., Scharfstein, B. S., & Cook, R. G. (2020). Financial software development: Best practices and architectures. Wiley Finance.
Ke, B., & Yu, Y. (2006). The effect of issuing biased earnings forecasts on analysts' access to management and survival. Journal of Accounting Research, 44(5), 965-999.
Kinney, W., Burgstahler, D., & Martin, R. (2002). Earnings surprise "materiality" as measured by stock returns. Journal of Accounting Research, 40(5), 1297-1329.
Livnat, J., & Mendenhall, R. R. (2006). Comparing the post-earnings announcement drift for surprises calculated from analyst and time series forecasts. Journal of Accounting Research, 44(1), 177-205.
Padilla, L., Kay, M., & Hullman, J. (2018). Uncertainty visualization. Handbook of Human-Computer Interaction.
Patell, J. M., & Wolfson, M. A. (1984). The intraday speed of adjustment of stock prices to earnings and dividend announcements. Journal of Financial Economics, 13(2), 223-252.
Skinner, D. J., & Sloan, R. G. (2002). Earnings surprises, growth expectations, and stock returns or don't let an earnings torpedo sink your portfolio. Review of Accounting Studies, 7(2-3), 289-312.
Tufte, E. R. (2001). The visual display of quantitative information (Vol. 2). Graphics Press.
Climax Detector (Buy & Sell)This indicator identifies potential Buying Climax (BC) and Selling Climax (SC) events based on volume spikes relative to historical averages.
• Buying Climax (BC):
• Detected when a green candle forms with volume significantly higher than the average (default: 2×).
• Often signals the end of an uptrend or distribution phase.
• Selling Climax (SC):
• Detected when a red candle forms with very high volume (default: 2× average).
• Often occurs at the end of a downtrend, suggesting panic selling and potential accumulation.
How it works:
• Calculates a moving average of volume over a user-defined period (default: 20 candles)
• Flags a climax when current volume exceeds the defined multiplier (default: 2.0×)
• Marks:
• BC with an orange triangle above the bar
• SC with a fuchsia triangle below the bar
Customizable Settings:
• Volume spike sensitivity
• Lookback period for average volume
Use Cases:
• Spot possible trend exhaustion
• Confirm Wyckoff phases
• Combine with support/resistance for reversal entries
Disclaimer: This tool is designed to assist in identifying high-probability exhaustion zones but should be used alongside other confirmations or strategies.
1-AI Volume Supertrend - Strategy🤖 AI Volume Indicator — Description for Publishing
Description:
The AI Volume Indicator leverages enhanced logic to analyze market volume with a focus on uncovering hidden accumulation, distribution, and momentum shifts. Unlike basic volume bars, this indicator applies adaptive algorithms or pattern recognition (AI-inspired) to highlight significant volume events that may precede price movements.
2-(Smart Money Concepts)(VWAP)(HMA)The Relative Strength Index (RSI) is a momentum oscillator that measures the speed and change of price movements. It ranges from 0 to 100 and is typically used to identify overbought or oversold market conditions.
Overbought levels: RSI above 70 suggests the asset may be overbought and a price correction could follow.
6 Exponential Moving Averages 2 SMA6 EMA Trend Indicator
This indicator plots 6 Exponential Moving Averages (EMAs) with customizable periods to help traders visually analyze short-, medium-, and long-term trend alignments. Ideal for identifying trend strength, pullback zones, and dynamic support/resistance.
Features:
• 6 fully adjustable EMA inputs
• Clear color-coded visualization
• Works on all timeframes
• Effective for trend trading and scalping
Use it to confirm trend direction, spot EMA crossovers, or align multiple EMAs for high-probability entries.
Mayfair COT ToolCommitments of traders gives the positions of the professionals (default is Leveraged Traders) so you can see what the BIG boys are thinking.
All‑MA Crossover + analyzer + risk Management [quantotc]🔍 Overview
All‑MA Trend Analyzer + Risk Management is a full-featured, multi-purpose trend and crossover system that lets you compare 8 different moving average types, visualize their alignment across timeframes, and apply robust risk management strategies — all in one powerful tool.
🧠 What Makes This Indicator Unique?
🔄 8 Moving Average Types — Easily switch between SMA, EMA, WMA, VWMA, HMA, RMA, SMMA, and TMA.
🟢 Signal Clarity — Buy/Sell labels appear on fast/slow MA crossovers.
📊 Dual Analysis Tables
Top-right: Multi-timeframe crossover trends (15m, 1h, 4h, Daily)
Bottom-right: MA type trends on current timeframe (Bull/Bear)
⚙️ Risk Management
Supports fixed SL/TP or trailing stop-loss
Works in % or Points
Visual SL/TP/TSL exit labels with separate alerts
🎯 How to Use
Select your desired MA Type (e.g., TMA, VWMA, etc.)
Adjust Fast/Slow Lengths depending on your strategy
Enable Long/Short entries as needed
Choose SL/TP Mode: Points or Percentage
Enable Trailing Stop for dynamic protection
Each feature is grouped and labeled with tooltips in the settings panel for clarity.
🖼 Visual Aids
A TMA Bull signal
Table-based trend analysis
Buy label clarity
Sell label clarity
Exit label on Take Profit
Exit label on Stop Loss
Trailing Stop Loss Exit
🚨 Alerts Included
BUY / SELL
TAKE PROFIT
STOPLOSS
TRAILING STOPLOSS
Each is customizable in the settings.
👤 Developer Info
Developer: quantotc
Website: quantotc.com
YouTube:https://youtube.com/@quantotc
Tags: multi timeframe, crossover, risk management, all MA, trailing stop, bullish bearish, trend table, strategy builder
⚠️ Disclaimer
This script is for educational purposes only. No guarantee of profitability. Always backtest and use proper risk management.
Prototype 005This is a tool that will make it easy for you to trade by identifying the position of the buy and sell points of the order.
Burr ORB RSIRSI To monitor overbought or oversold conditions. Prevents staying in a trade when price is likely to reverse.
Burr ORB MomentumShows momentum in seperate pane. Useful when trading ORB breakout to determine strength of trend and probability of continuation or reversal.
Burr Orb VolumeVolume Histogram used to confirm strong Breakouts of the ORB. Highlights Volume Spikes for added confirmation.
Burr ORBMarks the ORB on desired timeframe. Also marks the previous days High and Low for reference during Session
Kijun-Sen Filter for ScalpingThis is designed to assist lower time framed trading strategies with general trend sentiment. The baseline indicator used in this script is the trust Kijun-Sen. The baseline is best to be used on the daily timeframe however you can select whichever you prefer the same applies to the period as well.
You will see a table in the top right of the screen letting you know the trend direction.
Bullish
Bearish
Vortex SMA StrategyThere are two components to this script:
- Vortex Indicator (This will signal the long and short entries)
- SMA (This acts as a filter when price is above the SMA it only signals longs, when the price is below the SMA it only signals shorts)
Examples of longs and shorts
It's best to use a volume indicator paired with this to further filter losing trades.
If you have any ideas send me a message please!
FVG [TakingProphets]🧠 Purpose
This indicator is built for traders applying Inner Circle Trader (ICT) methodology. It detects and manages Fair Value Gaps (FVGs) — price imbalances that often act as future reaction zones. It also highlights New Day Opening Gaps (NDOGs) and New Week Opening Gaps (NWOGs) that frequently play a role in early-session price behavior.
📚 What is a Fair Value Gap?
A Fair Value Gap forms when price moves rapidly, skipping over a portion of the chart between three candles — typically between the high of the first candle and the low of the third. These zones are considered inefficient, meaning institutions may return to them later to:
-Rebalance unfilled orders
-Enter or scale into positions
-Engineer liquidity with minimal slippage
In ICT methodology, FVGs are seen as both entry zones and targets, depending on market structure and context.
⚙️ How It Works
-This script automatically identifies and manages valid FVGs using the following logic:
-Bullish FVGs: When the low of the current candle is above the high from two candles ago
-Bearish FVGs: When the high of the current candle is below the body of two candles ago
-Minimum Gap Filter: Gaps must be larger than 0.05% of price
-Combine Consecutive Gaps (optional): Merges adjacent gaps of the same type
-Consequent Encroachment Line (optional): Plots the midpoint of each gap
-NDOG/NWOG Tracking: Labels gaps created during the 5–6 PM session transition
-Automatic Invalidation: Gaps are removed once price closes beyond their boundary
🎯 Practical Use
-Use unmitigated FVGs as potential entry points or targets
-Monitor NDOG and NWOG for context around daily or weekly opens
-Apply the midpoint (encroachment) line for precise execution decisions
-Let the script handle cleanup — only active, relevant zones remain visible
🎨 Customization
-Control colors for bullish, bearish, and opening gaps
-Toggle FVG borders and midpoint lines
-Enable or disable combining of consecutive gaps
-Fully automated zone management, no manual intervention required
✅ Summary
This tool offers a clear, rules-based approach to identifying price inefficiencies rooted in ICT methodology. Whether used for intraday or swing trading, it helps traders stay focused on valid, active Fair Value Gaps while filtering out noise and maintaining chart clarity.
Weekly Moving Averages (MAs) to Intraday ChartThis indicator overlays key weekly timeframe moving averages onto your intraday chart, allowing you to visualize important long-term support and resistance levels while trading shorter timeframes. The indicator includes:
330-period Simple Moving Average (white): Ultra long-term trend indicator
200-period Simple Moving Average (fuchsia): Major long-term trend indicator often watched by institutional traders
100-period Simple Moving Average (purple): Medium-to-long term trend indicator
50-period Exponential Moving Average (blue): Medium-term trend indicator, more responsive to recent price action
21-period Exponential Moving Average (teal): Short-to-medium term trend indicator
9-period Exponential Moving Average (aqua): Short-term trend indicator, highly responsive to recent price movements
This multi-timeframe approach helps identify significant support/resistance zones that might not be visible on your current timeframe. When price interacts with these weekly moving averages during intraday trading, it often signals important areas where institutional orders may be placed.
The indicator uses color-coding with increasing line thickness to help you quickly distinguish between different moving averages. Consider areas where multiple MAs cluster together as particularly strong support/resistance zones.
Perfect for day traders and swing traders who want to maintain awareness of the bigger picture while focusing on shorter-term price action.
Hull Moving Average with Cloud📈 Hull Moving Average with Cloud – Adaptive Trend Visualization
This indicator combines the power of the Hull Moving Average (HMA) with a visual signal line and trend cloud, giving traders a clearer view of market direction, momentum shifts, and potential reversals.
🔍 Key Features:
Dynamic HMA Length (optional): Adjusts the HMA period based on ATR volatility, allowing the moving average to adapt to changing market conditions.
Custom Smoothing Options: Smooth the main HMA with your choice of SMA, EMA, or WMA for a tailored trend line.
Signal Line (Orange HMA): A shorter-period Hull MA that acts as a trigger line for crossovers and trend changes.
Color-Coded Trend Cloud:
🟩 Green Cloud: Bullish – main HMA is above the signal HMA.
🟥 Red Cloud: Bearish – main HMA is below the signal HMA.
Real-Time Trend Coloring: Both lines dynamically change color based on slope (green for rising, red/purple for falling).
Offset Capability: Shift the HMA forward to visualize trend development and potential future direction.
✅ Use Cases:
Identify trend direction with cloud coloration.
Spot early reversals through HMA crossover signals.
Filter trades with volatility-aware moving average responsiveness.
ConeCastConeCast is a forward-looking projection indicator that visualizes a future price range (or "cone") based on recent trend momentum and adaptive volatility. Unlike lagging bands or reactive channels, this tool plots a predictive zone 3–50 bars ahead, allowing traders to anticipate potential price behavior rather than merely react to it.
How It Works
The core of ConeCast is a dynamic trend-slope engine derived from a Linear Regression line fitted over a user-defined lookback window. The slope of this trend is projected forward, and the cone’s width adapts based on real-time market volatility. In calm markets, the cone is narrow and focused. In volatile regimes, it expands proportionally, using an ATR-based % of price to scale.
Key Features
📈 Predictive Cone Zone: Visualizes a forward range using trend slope × volatility width.
🔄 Auto-Adaptive Volatility Scaling: Expands or contracts based on market quiet/chaotic states.
📊 Regime Detection: Identifies Bull, Bear, or Neutral states using a tunable slope threshold.
🧭 Multi-Timeframe Compatible: Slope and volatility can be calculated from higher timeframes.
🔔 Smart Alerts: Detects price entering the cone, and signals trend regime changes in real time.
🖼️ Clean Visual Output: Optionally includes outer cones, trend-trail marker, and dashboard label.
How to Use It
Use on 15m–4H charts for best forward visibility.
Look for price entering the cone as a potential trend continuation setup.
Monitor regime changes and volatility expansion to filter choppy market zones.
Tune the slope sensitivity and ATR multiplier to match your symbol's behavior.
Use outer cones to anticipate aggressive swings and wick traps.
What Makes It Unique
ConeCast doesn’t follow price — it predicts a possible future price envelope using trend + volatility math, without relying on lagging indicators or repainting logic. It's a hybrid of regression-based forecasting and dynamic risk zoning, designed for swing traders, scalpers, and algo developers alike.
Limitations
ConeCast projects based on current trend and volatility — it does not "know" future price. Like all projection tools, accuracy depends on trend persistence and market conditions. Use this in combination with confirmation signals and risk management.
MA Crossover with Adaptive Trend Strength📘 MA Crossover with Adaptive Trend Strength —
📌 Overview
This TradingView indicator plots two moving averages (Fast & Slow) with user-selected types (T3, EMA, SMA, HMA), visual crossovers, and dynamically calculates an adaptive trend strength score using Z-scores of multiple features. Optional higher timeframe (HTF) confirmation is supported. A color-filled region between the MAs visually indicates momentum direction.
⚙️ Inputs & Controls
📈 Moving Average Settings
Fast MA Length: Length of the fast-moving average (default: 9).
Slow MA Length: Length of the slow-moving average (default: 21).
MA Type: Type of moving average used (T3, EMA, SMA, HMA).
Source: Input data source (default: close).
T3 Volume Factor: Only used when T3 is selected, controls smoothing (range: 0–1).
🎨 Visual Controls
Bullish Fill Color: Fill color when Fast MA is above Slow MA.
Bearish Fill Color: Fill color when Fast MA is below Slow MA.
Show Gradient Fill: Enable or disable the colored area between Fast & Slow MAs.
Trend Label Position: Choose where the trend strength label appears (top or bottom).
Label Update Interval: Number of bars between label updates (reduces clutter).
⏱ Multi-Timeframe Support
Higher Timeframe: Timeframe used for confirmation (default: 60 min).
Use HTF Confirmation: Enables filtering of trend score by higher timeframe trend direction.
📊 Lookback Configuration
Auto Lookback Based on Timeframe: Dynamically adapts scoring lookback period per chart timeframe.
Manual Lookback: Manual fallback lookback length when auto is off.
🧮 MA Calculation Options
T3 MA: Custom T3 function with exponential moving averages and volume factor.
EMA/SMA: Built-in Pine functions (ta.ema, ta.sma).
HMA: Hull Moving Average using WMA calculations.
📉 Trend Strength Calculation
🧠 Z-Score Inputs
Distance between MAs (zDist)
Slope of the Fast MA (zSlope)
Volume (zVol)
ATR (zATR)
📏 Choppiness & Adaptive Weighting
A Choppiness Index (based on ATR & price range) reduces score impact in sideways markets.
Dynamically adjusts Z-score weights:
W1: Distance
W2: Slope
W3: Volume
W4: ATR
🔁 HTF Confirmation
Optionally multiplies the trend score by the direction of the higher timeframe trend to filter noise.
🟩 Plot & Visual Elements
📊 MA Lines
Plots Fast and Slow MA lines in colors based on selected MA type.
🌈 Gradient Fill
Fills the area between Fast and Slow MAs with opacity proportional to their difference.
Colors based on bullish/bearish condition.
🏷️ Trend Strength Label
Updates every n bars (Label Update Interval).
Shows:
Trend Classification: Weak, Moderate, Strong
Numerical Score
Label position (top or bottom) is configurable.
🔔 Crossover Signals
Bullish Crossover ("B"): Fast MA crosses above Slow MA.
Bearish Crossover ("S"): Fast MA crosses below Slow MA.
Labels are plotted at crossover points.
Old labels are removed after a threshold (100) to reduce chart clutter.
📋 Score Summary Table
A table showing:
Max Score within the lookback period
Min Score
HTF Confirmation Status (ON / OFF)
Updates on the same user-defined interval as the trend label.
🚨 Alerts
Condition Description
Bullish MA Cross Fast MA crosses above Slow MA
Bearish MA Cross Fast MA crosses below Slow MA
These are provided via alertcondition() for use in alert creation.
📌 Customization Tips
Turn off the gradient fill for a cleaner chart.
Use HTF confirmation to reduce false positives in ranging markets.
Adjust label update frequency to prevent visual clutter on faster timeframes.
Use T3 MA with volume factor for smoother signals in volatile markets.