Fibonacci Time-Price Zones🟩 Fibonacci Time-Price Zones is a chart visualization tool that combines Fibonacci ratios with time-based and price-based geometry to analyze market behavior. Unlike typical Fibonacci indicators that focus solely on horizontal price levels, this indicator incorporates time into the analysis, providing a more dynamic perspective on price action.
The indicator offers multiple ways to visualize Fibonacci relationships. Drawing segmented circles creates a unique perspective on price action by incorporating time into the analysis. These segmented circles, similar to TradingView's built-in Fibonacci Circles, are derived from Fibonacci time and price levels, allowing traders to identify potential turning points based on the dynamic interaction between price and time.
As another distinct visualization method, the indicator incorporates orthogonal patterns, created by the intersection of horizontal and vertical Fibonacci levels. These intersections form L-shaped connections on the chart, derived from key Fibonacci price and time intervals, highlighting potential areas of support or resistance at specific points in time.
In addition to these geometric approaches, another option is sloped lines, which project Fibonacci levels that account for both time and price along the trendline. These projections derive their angles from the interplay between Fibonacci price levels and Fibonacci time intervals, creating dynamic zones on the chart. The slope of these lines reflects the direction and angle of the trend, providing a visual representation of price alignment with market direction, while maintaining the time-price relationship unique to this indicator
The indicator also includes horizontal Fibonacci levels similar to traditional retracement and extension tools. However, unlike standard tools, traders can display retracement levels, extension levels, or both simultaneously from a single instance of the indicator. These horizontal levels maintain consistency with the chosen visualization method, automatically scaling and adapting whether used with circles, orthogonal patterns, or slope-based analysis.
By combining these distinct methods—circles, orthogonal patterns, sloped projections, and horizontal levels—the indicator provides a comprehensive approach to Fibonacci analysis based on both time and price relationships. Each visualization method offers a unique perspective on market structure while maintaining the core principle of time-price interaction.
⭕ THEORY AND CONCEPT ⭕
While traditional Fibonacci tools excel at identifying potential support and resistance levels through price-based ratios (0.236, 0.382, 0.618), they do not incorporate the dimension of time in market analysis. Extensions and retracements effectively measure price relationships within trends, yet markets move through both price and time dimensions simultaneously.
Fibonacci circles represent an evolution in technical analysis by incorporating time intervals alongside price levels. Based on the mathematical principle that markets often move in circular patterns proportional to Fibonacci ratios, these circles project potential support and resistance zones as partial circles radiating from significant price points. However, traditional circle-based tools can create visual complexity that obscures key market relationships. The integration of time into Fibonacci analysis reveals how price movements often respect both temporal and price-based ratios, suggesting a deeper geometric structure to market behavior.
The Fibonacci Time-Price Zones indicator advances these concepts by providing multiple geometric approaches to visualize time-price relationships. Each shape option—circles, orthogonal patterns, slopes, and horizontal levels—represents a different mathematical perspective on how Fibonacci ratios manifest across both dimensions. This multi-faceted approach allows traders to observe how price responds to Fibonacci-based zones that account for both time and price movements, potentially revealing market structure that purely price-based tools might miss.
Shape Options
The indicator employs four distinct geometric approaches to analyze Fibonacci relationships across time and price dimensions:
Circular : Represents the cyclical nature of market movements through partial circles, where each radius is scaled by Fibonacci ratios incorporating both time and price components. This geometry suggests market movements may follow proportional circular paths from significant pivot points, reflecting the harmonic relationship between time and price.
Orthogonal : Constructs L-shaped patterns that separate the time and price components of Fibonacci relationships. The horizontal component represents price levels, while the vertical component measures time intervals, allowing analysis of how these dimensions interact independently at key market points.
Sloped : Projects Fibonacci levels along the prevailing trend, incorporating both time and price in the angle of projection. This approach suggests that support and resistance levels may maintain their relationship to price while adjusting to the temporal flow of the market.
Horizontal : Provides traditional static Fibonacci levels that serve as a reference point for comparing price-only analysis with the dynamic time-price relationships shown in the other three shapes. This baseline approach allows traders to evaluate how the incorporation of time dimension enhances or modifies traditional Fibonacci analysis.
By combining these geometric approaches, the Fibonacci Time-Price Zones indicator creates a comprehensive analytical framework that bridges traditional and advanced Fibonacci analysis. The horizontal levels serve as familiar reference points, while the dynamic elements—circular, orthogonal, and sloped projections—reveal how price action responds to temporal relationships. This multi-dimensional approach enables traders to study market structure through various geometric lenses, providing deeper insights into time-price symmetry within technical analysis. Whether applied to retracements, extensions, or trend analysis, the indicator offers a structured methodology for understanding how markets move through both price and time dimensions.
🛠️ CONFIGURATION AND SETTINGS 🛠️
The Fibonacci Time-Price Zones indicator offers a range of configurable settings to tailor its functionality and visual representation to your specific analysis needs. These options allow you to customize zone visibility, structures, horizontal lines, and other features.
Important Note: The indicator's calculations are anchored to user-defined start and end points on the chart. When switching between charts with significantly different price scales (e.g., from Bitcoin at $100,000 to Silver at $30), adjustment of these anchor points is required to ensure correct positioning of the Fibonacci elements.
Fibonacci Levels
The indicator allows users to customize Fibonacci levels for both retracement and extension analysis. Each level can be individually configured with the following options:
Visibility : Toggle the visibility of each level to focus on specific areas of interest.
Level Value : Set the Fibonacci ratio for the level, such as 0.618 or 1.000, to align with your analysis needs.
Color : Customize the color of each level for better visual clarity.
Line Thickness : Adjust the line thickness to emphasize critical levels or maintain a cleaner chart.
Setup
Zone Type : Select which Fibonacci zones to display:
- Retracement : Shows potential pull back levels within the trend
- Extension : Projects levels beyond the trend for potential continuation targets
- Both : Displays both retracement and extension zones simultaneously
Shape : Choose from four visualization methods:
- Circular : Time-price based semicircles centered on point B
- Orthogonal : L-shaped patterns combining time and price levels
- Sloped : Trend-aligned projections of Fibonacci levels
- Horizontal : Traditional horizontal Fibonacci levels
Visual Settings
Fill % : Adjusts the fill intensity of zones:
0% : No fill between levels
100% : Maximum fill between levels
Lines :
Trendline : The base A-B trend with customizable color
Extension : B-C projection line
Retracement : B-D pullback line
Labels :
Points : Show/hide A, B, C, D markers
Levels : Show/hide Fibonacci percentages
Time-Price Points
Set the time and price for the points that define the Fibonacci zones and horizontal levels. These points are defined upon loading the chart. These points can be configured directly in the settings or adjusted interactively on the live chart.
A and B Points : These user-defined time and price points determine the basis for calculating the semicircles and Fibonacci levels. While the settings panel displays their exact values for fine-tuning, the easiest way to modify these points is by dragging them directly on the chart for quick adjustments.
Interactive Adjustments : Any changes made to the points on the chart will automatically synchronize with the settings panel, ensuring consistency and precision.
🖼️ CHART EXAMPLES 🖼️
Fibonacci Time-Price Zones using the 'Circular' Shape option. Note the price interaction at the 0.786 level, which acts as a support zone. Additional points of interest include resistance near the 0.618 level and consolidation around the 0.5 level, highlighting the utility of both horizontal and semicircular Fibonacci projections in identifying key price areas.
Fibonacci Time-Price Zones using the 'Sloped' Shape option. The chart displays price retracing along the sloped Fibonacci levels, with blue arrows highlighting potential support zones at 0.618 and 0.786, and a red arrow indicating potential resistance at the 1.0 level. This visual representation aligns with the prevailing downtrend, suggesting potential selling pressure at the 1.0 Fibonacci level.
Fibonacci Time-Price Zones using the 'Orthogonal' Shape option. The chart demonstrates price action interacting with vertical zones created by the orthogonal lines at the 0.618, 0.786, and 1.0 Fibonacci levels. Blue arrows highlight potential support areas, while red arrows indicate potential resistance areas, revealing how the orthogonal lines can identify distinct points of price interaction.
Fibonacci Time-Price Zones using the 'Circular' Shape option. The chart displays price action in relation to segmented circles emanating from the starting point (point A). The circles represent different Fibonacci ratios (0.382, 0.5, 0.618, 0.786) and their intersections with the price axis create potential zones of support and resistance. This approach offers a visually distinct way to analyze potential turning points based on both price and time.
Fibonacci Time-Price Zones using the 'Sloped' Shape option. The sloped Fibonacci levels (0.786, 0.618, 0.5) create zones of potential support and resistance, with price finding clear interaction within these areas. The ellipses highlight this price action, particularly the support between 0.786 and 0.618, which aligns closely with the trend.
Fibonacci Time-Price Zones using the 'Circular' Shape option. The price action appears to be ‘hugging’ the 0.5 Fibonacci level, suggesting potential resistance. This demonstrates how the circular zones can identify potential turning points and areas of consolidation which might not be seen with linear analysis.
Fibonacci Time-Price Zones using the 'Sloped' Shape option with Point D marker enabled. The chart demonstrates clear price action closely following along the sloped Retracement line until the orthogonal intersection at the 0.618 levels where the trend is broken and price dips throughout the 0.618 to 0.786 horizontal zone. Price jumps back to the retracement slope at the start of the 0.786 horizontal zone and continues to the 1.0 horizontal zone. The aqua-colored retracement line is enabled to further emphasize this retracement slope .
Geometric validation using TradingView's built-in Fibonacci Circle tool (overlaid). The alignment at the 0.5 and 1.0 levels demonstrates the indicator's consistent approximation of Fibonacci Circles.
Comparison of Fibonacci Time-Price Zones (Shape: Horizontal) with TradingView's Built-in Retracement and Extension Tools (overlaid): This example demonstrates how the Horizontal structure aligns with TradingView’s retracement and extension levels, allowing users to integrate multiple tools seamlessly. The Fibonacci circle connects retracement and extension zones, highlighting the potential relationship between past retracements and future extensions.
📐 GEOMETRIC FOUNDATIONS 📐
This indicator integrates circular and straight representations of Fibonacci levels, specifically the Circular , Orthogonal , Sloped , and Horizontal shape options. The geometric principles behind these shapes differ significantly, requiring distinct scaling methods for accurate representation. The Circular shape employs logarithmic scaling with radial expansion, where the distance from a central point determines the level's position, creating partial circles that align with TradingView's built-in Fibonacci Circle tool. The other three shapes utilize geometric progression scaling for linear extension from a starting point, resulting in straight lines that align with TradingView's built-in Fibonacci retracement and extension tools. Due to these distinct geometric foundations and scaling methods, perfectly aligning both the partial circles and straight lines simultaneously is mathematically constrained, though any differences are typically visually imperceptible.
The Circular shape's partial circles are calculated and scaled to align with TradingView's built-in Fibonacci Circles. These circles are plotted from the second swing point onward. This approach ensures consistent and accurate visualization across all market types, including those with gaps or closed sessions, which unlike 24/7 markets, do not have a direct one-to-one correspondence between bar indices and time. To maintain accurate geometric proportions across varying chart scales, the indicator calculates an aspect ratio by normalizing the proportional difference between vertical (price) and horizontal (time) distances of the swing points. This normalization factor ensures geometric shapes maintain their mathematical properties regardless of price scale magnitude or time period span, while maintaining the correct proportions of the geometric constructions at any chart zoom level.
The indicator automatically applies the appropriate scaling factor based on the selected shape option, optimizing either circular proportions and proper radius calculations for each Fibonacci level, or straight-line relationships between Fibonacci levels. These distinct scaling approaches maintain mathematical integrity while preserving the essential characteristics of each geometric representation, ensuring optimal visualization accuracy whether using circular or linear shapes.
⚠️ DISCLAIMER ⚠️
The Fibonacci Time-Price Zones indicator is a visual analysis tool designed to illustrate Fibonacci relationships through geometric constructions incorporating both curved and straight lines, providing a structured framework for identifying potential areas of price interaction. It is not intended as a predictive or standalone trading signal indicator.
The indicator calculates levels and projections using user-defined anchor points and Fibonacci ratios. While it aims to align with TradingView’s Fibonacci extension, retracement, and circle tools by employing mathematical and geometric formulas, no guarantee is made that its calculations are identical to TradingView's proprietary methods.
Like all technical and visual indicators, these visual representations may visually align with key price zones in hindsight, reflecting observed price dynamics. However, these visualizations are not standalone signals for trading decisions and should be interpreted as part of a broader analytical approach.
This indicator is intended for educational and analytical purposes, complementing other tools and methods of market analysis. Users are encouraged to integrate it into a comprehensive trading strategy, customizing its settings to suit their specific needs and market conditions.
🧠 BEYOND THE CODE 🧠
The Fibonacci Time-Price Zones indicator is designed to encourage both education and community engagement. By integrating time-sensitive geometry with Fibonacci-based frameworks, it bridges traditional grid-based analysis with dynamic time-price relationships. The inclusion of semicircles, horizontal levels, orthogonal structures, and sloped trends provides users with versatile tools to explore the interaction between price movements and temporal intervals while maintaining clarity and adaptability.
As an open-source tool, the indicator invites exploration, experimentation, and customization. Whether used as a standalone resource or alongside other technical strategies, it serves as a practical and educational framework for understanding market structure and Fibonacci relationships in greater depth.
Your feedback and contributions are essential to refining and enhancing the Fibonacci Time-Price Zones indicator. We look forward to the creative applications, adaptations, and insights this tool inspires within the trading community.
Pattern grafici
Inside Bar Multi-Currency ScannerInside Bar Scanner
This indicator for TradingView scans up to 10 customizable assets across multiple, user-defined timeframes to detect Inside Bar patterns. It features two key columns: Ready and Cooking. The Ready column highlights when the previous candle has formed an Inside Bar, signaling traders to watch for potential entry triggers. The Cooking column actively monitors the current candle in progress to identify ongoing Inside Bar formations. The indicator allows full customization of asset lists and independent timeframe selection, making it a powerful tool for multi-timeframe analysis and enhancing trading precision.
BKLevelsThis displays levels from a text input, levels from certain times on the previous day, and high/low/close from previous day. The levels are drawn for the date in the first line of the text input. Newlines are required between each level
Example text input:
2024-12-17
SPY,606,5,1,Lower Hvol Range,FIRM
SPY,611,1,1,Last 20K CBlock,FIRM
SPY,600,2,1,Last 20K PBlock,FIRM
SPX,6085,1,1,HvolC,FIRM
SPX,6080,2,1,HvolP,FIRM
SPX,6095,3,1,Upper PDVR,FIRM
SPX,6060,3,1,Lower PDVR,FIRM
For each line, the format is ,,,,,
For color, there are 9 possible user- configurable colors- so you can input numbers 1 through 9
For line style, the possible inputs are:
"FIRM" -> solid line
"SHORT_DASH" -> dotted line
"MEDIUM_DASH" -> dashed line
"LONG_DASH" -> dashed line
Confirmed Stage 2 UptrendFrom the Book Think and Trade Like a Champion The Secrets, Rules & Blunt Truths of a Stock
Market Wizard - MARK MINERVINI
THE TREND TEMPLATE
You don’t have to go to business school; you’ve only got to remember one thing . . . you always
want to be with whatever the predominant trend is.
—Paul Tudor Jones
STAGE 2 ONLY
In my first book, one of the fundamental building blocks I discussed was
“Stage Analysis”—and, in particular, the importance of Stage 2. Like all
stocks, superperformance stocks go through stages. There are four distinct
stages. The cycle through all four could take several years or even decades.
The stage you want to focus on is Stage 2. I avoid going long a stock in any
stage except Stage 2. During the other three stages (1, 3 and 4), you are either
losing money or losing time.
When a stock is in Stage 2, it increases the odds that big buyers are in there
supporting the stock. Based on studies of the biggest winning stocks going
all the way back to late 1800s, more than 95 percent of those stocks made
their huge price gains while in a Stage 2 uptrend. That is fact, not opinion.
Wouldn’t you rather be in sync with a 95 percent probability of a stock being
in a big winner, than in the 5 percent club?
I identify the four stages based on what is happening in the stock’s price
action:
1. Stage 1: Neglect phase: consolidation
2. Stage 2: Advancing phase: accumulation
3. Stage 3: Topping phase: distribution
4. Stage 4: Declining phase: capitulation
I made on indicator confirmed Stage 2 uptrend.
1. Stock price is above both the 150-day (30-week) and the 200-day (40-
week) moving average price lines.
2. The 150-day moving average is above the 200-day moving average.
3. The 200-day moving average line is trending up for at least 1-month
(preferably 4 to 5 months or longer).
4. The 50-day (10-week moving average) is above both the 150-day and
the 200-day moving averages.
5. The current stock price is at least 25 percent above its 52-week low.
(Many of the best selections will be 100 percent, 300 percent, or more
above their 52-week low before they emerge from a healthy consolidation period and mount a large-scale advance).
6. The current stock price is within at least 25 percent of its 52-week high
(the closer to a new high the better).
7. The relative strength (RS) ranking (as reported in Investor’s Business
Daily) is no less than 70, but preferably in the 90s, which will generally
be the case with the better selections. (Note: The RS line should not be
in a strong downtrend. I like to see the RS line in an uptrend for at least
6 weeks, preferably 13 weeks or more.)
8. Current price is trading above the 50-day moving average as the stock is
coming out of a base.
My Trend Template outlines the criteria I apply to every stock I’m
considering. It’s my qualifier, or what I refer to as “non-negotiable
criteria.” Any stock that fails to make the cut is off my radar.
As the stock transitions from Stage 1 to Stage 2, you should see a
meaningful pickup in volume—a sign of institutional support. Looking for
stocks that are in verified uptrends allows me to make my first cut and
systematically narrow down my potential candidates. Doing this also will
help you identify the best stocks with the greatest chances of yielding highly
profitable returns. With your hard-earned money on the line, finding
superperformance takes a set of criteria based on sound rules and the
discipline to adhere to them.
Amateurs, however, very seldom trade this way; when they do, it’s rarely
consistent. Here’s how their thinking goes: They missed the boat on
Facebook’s big run-up, so now they look for a chance to buy it when it
appears to be “cheap.” Or they notice Twitter has been going down, so they
assume it must bottom sometime soon, because hundreds of millions of
people are tweeting all day. People who buy this way are all but guaranteed
to do real damage to their portfolios—it’s just a matter of time.
20 SMA Signal Boxes (Stacked with Target Labels)This indicator is designed for traders who utilize the 20-period Simple Moving Average (SMA) as part of their trading strategy. It identifies buy and sell signals when price crosses above or below the 20 SMA and visually plots the following on the chart:
Signal Candle Box (Yellow):
Outlines the candle where the signal occurred, marking the entry point (top for buys, bottom for sells) and the risk point.
Target Boxes (Blue):
Three blue boxes plot potential profit targets:
"Long Target" for buys: The top of the first blue box.
"Sell Target" for sells: The bottom of the first blue box.
Buy/Sell Labels:
BUY labels point upward and appear below the signal candle.
SELL labels point downward and appear above the signal candle.
This visual system helps traders quickly identify signals, measure potential risk, and manage trade targets effectively.
Features:
Fully customizable visual representation of buy/sell signals and targets.
Clean, modern, and intuitive design.
Works seamlessly on all timeframes.
How to Use:
Use the yellow signal box for entry and risk placement.
Use the blue target boxes to set realistic profit targets.
Combine this indicator with other technical analysis tools for confirmation.
Disclaimer:
This indicator is for educational purposes only and is not financial advice. Always practice proper risk management.
BOS and Volume Strategy with ConfirmationHi all, im trying to build a strategy based on BOS. i ran into a problem when i saw the stoploss not working.
i hope someone could help me figure out the problem.
thanks
Dynamic Sloping TrendlinesTrend line with breaks :
What This Script Does
Swing Highs and Lows:
Identifies recent swing highs and swing lows dynamically.
Sloping Trendlines:
Connects the most recent swing high and swing low to the current price with angled lines (not horizontal).
Trendlines automatically update as new swing points are detected.
Breakout Detection:
BUY: When the price breaks above the sloping resistance trendline.
SELL: When the price breaks below the sloping support trendline.
Clean Visualization:
Old trendlines are automatically deleted to keep the chart clean.
Breakout Signals:
Visual breakout signals appear with "BUY" or "SELL" labels.
Alerts notify you of breakout conditions.
How It Looks
Green Sloping Trendline: Connects recent swing highs (resistance).
Red Sloping Trendline: Connects recent swing lows (support).
Labels:
BUY appears when the price breaks above the green trendline.
SELL appears when the price breaks below the red trendline.
How to Use It
Open TradingView and go to the Pine Script Editor.
Copy and paste the code above.
Save and add it to your XAU/USD 5-minute chart.
Adjust:
Swing Point Length to fine-tune how far back the script detects highs/lows.
Breakout Buffer for breakout confirmation.
Results
You will see sloping/angled trendlines that adjust dynamically, just like your manually drawn trendlines, with breakout signals for entry.
Estratégia MHI (Martin-Gale High Impact) AR traderEstratégia MHI
A estratégia MHI é baseada na análise das últimas três velas de um gráfico (geralmente em períodos de 5 minutos) para prever o comportamento da próxima vela. É uma abordagem que se concentra em padrões de mercado de curto prazo e utiliza estatísticas e probabilidades para gerar sinais de entrada.
My script rsa vaibhavMy script rsa vaibhav My script rsa vaibhav My script rsa vaibhav My script rsa vaibhav My script rsa vaibhav My script rsa vaibhav My script rsa vaibhav My script rsa vaibhav My script rsa vaibhav My script rsa vaibhav My script rsa vaibhav My script rsa vaibhav My script rsa vaibhav My script rsa vaibhav
Zero-Lag MA Trend Levels V1 TodesZero-Lag MA Trend Levels V1 Todes Hoang save lai. Thank you very much - Chartprime !
Buyers vs Sellers % This Buyers vs Sellers Imbalance Indicator provides real-time insight into the market's buying and selling pressure. It calculates and displays the percentage of buy and sell volume in relation to each other, using advanced price action analysis and multiple technical factors to determine market sentiment. Here's how it works:
How It Calculates the Imbalance Between Buyers and Sellers:
Candle Analysis: The indicator starts by analyzing each candle's price action. It breaks down the candle into three key parts:
Body: The area between the open and close, showing buying or selling dominance.
Upper Wick: The wick above the body, indicating selling pressure.
Lower Wick: The wick below the body, indicating buying pressure.
The relative sizes of these parts are calculated in ticks, which helps the indicator assess whether buyers or sellers were more dominant during the session.
Volume-weighted Calculation: The indicator uses volume-weighted calculations for each candle, taking into account the actual trading volume along with the candle size and wick sizes. This ensures that large, high-volume candles are given more weight than small, low-volume candles, improving accuracy.
Trend Filters (9 EMA): The indicator incorporates the 9-period Exponential Moving Average (EMA) to identify whether the market is in an uptrend or downtrend. If the price is above the 9 EMA, the indicator will give more weight to buying pressure, while if the price is below the 9 EMA, it will give more weight to selling pressure.
Support/Resistance & Pivot Points: It also tracks key support and resistance levels using pivot points. When the price breaks above resistance, buy pressure increases, and when it falls below support, sell pressure increases.
Candlestick Patterns: The indicator detects bullish and bearish candlestick patterns like Bullish Engulfing, Bearish Engulfing, Morning Star, and Evening Star, adjusting the imbalance based on the strength of these patterns.
Market Consolidation Detection: It detects periods of market consolidation using the Average True Range (ATR) and adjusts the buy/sell imbalance to avoid overreacting during choppy, sideways market conditions.
RSI Adjustments: The Relative Strength Index (RSI) is used to fine-tune the imbalance. If the RSI is overbought (above 70), selling pressure is weighted more. If the RSI is oversold (below 30), buying pressure is weighted more.
Time-of-Day Adjustments: The indicator adjusts the imbalance during certain times of the day (like the first and last hour of trading), when volatility and momentum are typically stronger.
Customizing to Your Trading Style:
Time Period for Imbalance Calculation: You can customize the lookback period for the imbalance calculation (default is 14), allowing you to adjust how sensitive the indicator is to recent price action.
Tick Size Adjustments: Set the tick size based on the specific instrument you're trading (e.g., ES1, NQ1) to ensure accurate calculations.
Trend Sensitivity (9 EMA): Customize how much weight the 9-period EMA has on the imbalance calculations. If you prefer a more aggressive trend filter, increase the weight given to the 9 EMA.
Consolidation Sensitivity: You can adjust how sensitive the indicator is to consolidation periods by modifying the ATR multiplier, allowing you to filter out false signals during sideways market conditions.
RSI Adjustment: Fine-tune how much the RSI affects the imbalance calculation, helping you react more effectively to overbought or oversold conditions.
Table Positioning: You can position the table displaying the buy and sell percentages anywhere on the chart (top-left, top-right, bottom-left, or bottom-right), giving you full control over your workspace.
How to Use the Indicator:
Watch for Imbalance Shifts:
A higher Buy % indicates stronger buying pressure, and a higher Sell % indicates stronger selling pressure.
Look for imbalances that align with other market conditions, such as price being above or below key support/resistance or the 9 EMA.
Combine with Other Tools:
Use this indicator alongside other technical tools like moving averages, trendlines, and candlestick patterns to enhance your decision-making.
Customization for Different Strategies:
Scalpers may prefer a shorter lookback period for quicker, more responsive imbalances.
Swing traders might prefer longer lookback periods and more focus on the overall trend (using the 9 EMA).
Range traders can use the consolidation feature to avoid trading during low-volatility periods.
Golden Cross DetectorThis Pine Script™ identifies and visualizes a Golden Cross on a chart using two Simple Moving Averages (SMA) of different periods. A Golden Cross is a bullish signal that occurs when a shorter-term moving average crosses above a longer-term moving average.
Script Description
Indicator Name:
The script is titled "Golden Cross Detector" and overlays the chart.
Moving Averages:
A 50-period SMA (short-term) is calculated using the ta.sma() function.
A 200-period SMA (long-term) is also calculated.
The 50 SMA and 200 SMA are plotted as lines:
50 SMA: Blue line.
200 SMA: Red line.
Golden Cross Detection:
The script checks for a "Golden Cross" using the ta.crossover() function.
A Golden Cross occurs when the 50-period SMA (short-term) crosses above the 200-period SMA (long-term).
Visual Representation:
When a Golden Cross is detected, a green triangle marker is plotted below the bar where the crossover happens.
The triangle is labeled "Golden Cross" to make it easy to identify.
Key Features:
Simplicity: The script focuses solely on detecting and highlighting Golden Cross events.
Customizable: You can adjust the SMA lengths (50 and 200) for different strategies.
Visual Clarity: The two SMAs (blue and red) and the green marker clearly display the crossover signal.
1-3-1 Strat Combo with 50% Level (12h)Logic Explanation
1-3-1 Combo Detection:
The script detects the 1-3-1 pattern using the previous 3 candles:
Candle 4: Inside Bar (Type 1).
Candle 3: Outside Bar (Type 3).
Candle 2: Inside Bar (Type 1).
4th Candle Behavior:
If the 4th candle (current bar):
Stays an inside bar (Type 1) → isFourthInsideBar is true.
Becomes a directional bar (Type 2) → isFourthDirectional is true.
If either of these conditions is true, the script stops calculating and waits for the next valid 1-3-1 setup.
50% Level Calculation:
If the conditions are not met (e.g., the 4th candle doesn’t stop the pattern), the script:
Plots a dotted line at the 50% level of the 3rd candle.
Adds a label showing the 50% level.
Stop Calculations:
No line, box, or label is drawn if the 4th candle is a Type 1 (inside bar) or Type 2 (directional bar).
Visual Outputs:
Dotted Box: Marks the 1-3-1 combo setup.
50% Line: Drawn only if the 4th candle does not invalidate the pattern.
Label: Displays the 50% level of the 3rd candle.
How to Use:
Apply this script on the 12-hour chart.
The script will:
Detect valid 1-3-1 patterns.
Stop drawing any calculations if the 4th candle is an inside bar (1) or a directional bar (2).
Wait for the next valid 1-3-1 combo.
Previous Day/Week/Month Rays//@version=5
indicator("Previous Day/Week/Month Rays", overlay=true)
// Fetch the high/low for the previous day, week, and month
prevDayHigh = request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on)
prevDayLow = request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on)
prevWeekHigh = request.security(syminfo.tickerid, "W", high , lookahead=barmerge.lookahead_on)
prevWeekLow = request.security(syminfo.tickerid, "W", low , lookahead=barmerge.lookahead_on)
prevMonthHigh = request.security(syminfo.tickerid, "M", high , lookahead=barmerge.lookahead_on)
prevMonthLow = request.security(syminfo.tickerid, "M", low , lookahead=barmerge.lookahead_on)
// Determine time points (UNIX timestamps) for anchoring the rays
prevDayTime = request.security(syminfo.tickerid, "D", time , lookahead=barmerge.lookahead_on)
prevWeekTime = request.security(syminfo.tickerid, "W", time , lookahead=barmerge.lookahead_on)
prevMonthTime = request.security(syminfo.tickerid, "M", time , lookahead=barmerge.lookahead_on)
// Create variables to store the rays
var line dayHighRay = na
var line dayLowRay = na
var line weekHighRay = na
var line weekLowRay = na
var line monthHighRay = na
var line monthLowRay = na
// Create or update the rays using time for x-coordinates
if na(dayHighRay)
dayHighRay := line.new(x1=prevDayTime, y1=prevDayHigh, x2=timestamp("2100-01-01 00:00"), y2=prevDayHigh, color=color.green, width=1, extend=extend.right, xloc=xloc.bar_time)
if na(dayLowRay)
dayLowRay := line.new(x1=prevDayTime, y1=prevDayLow, x2=timestamp("2100-01-01 00:00"), y2=prevDayLow, color=color.green, width=1, extend=extend.right, xloc=xloc.bar_time)
if na(weekHighRay)
weekHighRay := line.new(x1=prevWeekTime, y1=prevWeekHigh, x2=timestamp("2100-01-01 00:00"), y2=prevWeekHigh, color=color.white, width=1, extend=extend.right, xloc=xloc.bar_time)
if na(weekLowRay)
weekLowRay := line.new(x1=prevWeekTime, y1=prevWeekLow, x2=timestamp("2100-01-01 00:00"), y2=prevWeekLow, color=color.white, width=1, extend=extend.right, xloc=xloc.bar_time)
if na(monthHighRay)
monthHighRay := line.new(x1=prevMonthTime, y1=prevMonthHigh, x2=timestamp("2100-01-01 00:00"), y2=prevMonthHigh, color=color.red, width=1, extend=extend.right, xloc=xloc.bar_time)
if na(monthLowRay)
monthLowRay := line.new(x1=prevMonthTime, y1=prevMonthLow, x2=timestamp("2100-01-01 00:00"), y2=prevMonthLow, color=color.red, width=1, extend=extend.right, xloc=xloc.bar_time)
// Update the rays dynamically
line.set_xy1(dayHighRay, prevDayTime, prevDayHigh)
line.set_xy2(dayHighRay, timestamp("2100-01-01 00:00"), prevDayHigh)
line.set_xy1(dayLowRay, prevDayTime, prevDayLow)
line.set_xy2(dayLowRay, timestamp("2100-01-01 00:00"), prevDayLow)
line.set_xy1(weekHighRay, prevWeekTime, prevWeekHigh)
line.set_xy2(weekHighRay, timestamp("2100-01-01 00:00"), prevWeekHigh)
line.set_xy1(weekLowRay, prevWeekTime, prevWeekLow)
line.set_xy2(weekLowRay, timestamp("2100-01-01 00:00"), prevWeekLow)
line.set_xy1(monthHighRay, prevMonthTime, prevMonthHigh)
line.set_xy2(monthHighRay, timestamp("2100-01-01 00:00"), prevMonthHigh)
line.set_xy1(monthLowRay, prevMonthTime, prevMonthLow)
line.set_xy2(monthLowRay, timestamp("2100-01-01 00:00"), prevMonthLow)
// Handle timeframe-specific logic
isMonthTimeframe = timeframe.ismonthly
isWeekTimeframe = timeframe.isweekly
// Remove irrelevant rays for higher timeframes
if isMonthTimeframe
line.delete(dayHighRay)
line.delete(dayLowRay)
line.delete(weekHighRay)
line.delete(weekLowRay)
if isWeekTimeframe
line.delete(dayHighRay)
line.delete(dayLowRay)
CMF (with colors)Notice: This script is for educational purposes only and does not constitute financial or investment advice; trade at your own risk.
Chaikin Money Flow with Conditional Highlights
Name:
Chaikin Money Flow (CMF) - Dynamic Color Highlights
Overview:
This indicator is an enhanced version of the Chaikin Money Flow (CMF), used to analyze the flow of money into or out of an asset based on price movement and volume. It visually highlights CMF values and candlestick trends, making it easier to spot overbought, neutral, or weak conditions in the market.
Key Features:
Dynamic CMF Line Coloring:
The CMF line changes color based on its value, providing a visual signal for different market conditions:
Above 0.40 → Red: Strong overbought conditions.
0.30 - 0.40 → Orange: Warning zone.
0.28 - 0.30 → Yellow: Neutral area.
0.24 - 0.28 → Green: Caution (weak flow).
Below 0.24 → Blue: Weak flow, likely bearish.
Candlestick Color Alerts:
Candles are colored dynamically based on CMF values:
Red: Strong overbought (CMF ≥ 0.40).
Orange: Warning (CMF ≥ 0.30).
Yellow: Neutral (CMF ≥ 0.28).
Green: Caution (CMF ≥ 0.24).
Gray: Default condition (CMF below 0.24).
Reference Lines:
Horizontal lines are added for key CMF thresholds:
0.40: Overbought (solid red line).
0.33: Warning (dotted orange line).
0.30: Neutral zone (dotted yellow line).
0.28: Caution (dotted green line).
0.24: Weak flow area (dotted green line).
0.00: Zero line for baseline reference.
How It Works:
Money Flow Multiplier:
The script calculates how close the closing price is to the high or low price of the candle. If the price is near the high, money is considered flowing in; if near the low, money is flowing out.
Money Flow Volume:
The multiplier is adjusted using the trading volume. This ensures that high-volume days have a stronger influence on the CMF.
Sum Over Period:
The CMF is calculated as the ratio of the Money Flow Volume to the total volume over a specified period (default is 20 candles).
Dynamic Alerts:
Based on the CMF value, both the candlestick colors and CMF line change to alert traders to market conditions visually.
Settings:
Length: Default period for CMF calculation is 20 candles (user-adjustable).
Colors: Predefined colors for CMF line and candles to highlight market behavior.
Usage:
Above 0: Positive money flow → Buyers are stronger.
Below 0: Negative money flow → Sellers are stronger.
Use the color changes to spot market trends:
Red → Potential overbought (trend exhaustion).
Green/Blue → Weak money flow (caution for reversals).
LetzGO Inside Bar Indicator With AlertI'll help you update the script to version 6 with some improvements and add alert conditions.
```pine
//@version=6
indicator("LetzGO Inside Bar Indicator", overlay=true)
// Input for timeframe selection
timeframe_5m = input.bool(true, "Enable 5-minute Inside Bars")
timeframe_15m = input.bool(true, "Enable 15-minute Inside Bars")
timeframe_60m = input.bool(true, "Enable 60-minute Inside Bars")
timeframe_daily = input.bool(true, "Enable Daily Inside Bars")
// Function to detect inside bar
is_inside_bar(open1, high1, low1, close1, open2, high2, low2, close2) =>
// Current candle is completely inside the previous candle's range
high1 < high2 and low1 > low2
// 5-minute Inside Bar Detection
is_inside_bar_5m = timeframe.isintraday and timeframe.multiplier == 5 and
is_inside_bar(open, high, low, close, open , high , low , close )
// 15-minute Inside Bar Detection
is_inside_bar_15m = timeframe.isintraday and timeframe.multiplier == 15 and
is_inside_bar(open, high, low, close, open , high , low , close )
// 60-minute Inside Bar Detection
is_inside_bar_60m = timeframe.isintraday and timeframe.multiplier == 60 and
is_inside_bar(open, high, low, close, open , high , low , close )
// Daily Inside Bar Detection
is_inside_bar_daily = timeframe.isdaily and timeframe.multiplier == 1 and
is_inside_bar(open, high, low, close, open , high , low , close )
// Color selection for different timeframes
var color color_5m = color.blue
var color color_15m = color.green
var color color_60m = color.red
var color color_daily = color.purple
// Plot visual indicators
plotshape(timeframe_5m and is_inside_bar_5m,
title="5m Inside Bar",
location=location.belowbar,
style=shape.triangleup,
size=size.small,
color=color_5m)
plotshape(timeframe_15m and is_inside_bar_15m,
title="15m Inside Bar",
location=location.belowbar,
style=shape.triangleup,
size=size.small,
color=color_15m)
plotshape(timeframe_60m and is_inside_bar_60m,
title="60m Inside Bar",
location=location.belowbar,
style=shape.triangleup,
size=size.small,
color=color_60m)
plotshape(timeframe_daily and is_inside_bar_daily,
title="Daily Inside Bar",
location=location.belowbar,
style=shape.triangleup,
size=size.small,
color=color_daily)
// Alert Conditions
alertcondition(timeframe_5m and is_inside_bar_5m,
title="5m Inside Bar Alert",
message="5-Minute Inside Bar Detected!")
alertcondition(timeframe_15m and is_inside_bar_15m,
title="15m Inside Bar Alert",
message="15-Minute Inside Bar Detected!")
alertcondition(timeframe_60m and is_inside_bar_60m,
title="60m Inside Bar Alert",
message="60-Minute Inside Bar Detected!")
alertcondition(timeframe_daily and is_inside_bar_daily,
title="Daily Inside Bar Alert",
message="Daily Inside Bar Detected!")
```
Key updates and improvements:
1. Updated to PineScript v6 syntax
2. Enhanced inside bar detection function
3. Added distinct colors for different timeframes
- 5m: Blue
- 15m: Green
- 60m: Red
- Daily: Purple
4. Added alert conditions for each timeframe
5. Maintained the original input toggles to enable/disable timeframe detection
Improvements in the inside bar detection:
- Checks both intraday and daily timeframes
- Uses `timeframe.isintraday` and `timeframe.isdaily` for precise detection
- Verifies specific timeframe multipliers
To use the indicator:
1. Open TradingView
2. Go to Pine Editor
3. Paste the script
4. Add to chart
5. Configure timeframe visibility and alerts as needed
Would you like me to explain any part of the script or make any further modifications?
52 Week High/Low Break StrategyCreate Tradingview Pine script for the below trading strategy which can give buy and sell signals.
Buy when the candle close above last 52 week High price
Sell when the candle close below last 52 week Low Price
FL and FTR Detector//@version=5
indicator("FL and FTR Detector", overlay=true)
// تنظیمات ورودیها
fvgLength = input.int(5, title="FVG Length", minval=1) // طول شکاف FVG
lookBack = input.int(10, title="Look Back Period", minval=1) // بازه زمانی برای تشخیص FTR
// محاسبه بالاترین و پایینترین قیمت در طول بازه مشخص
highPrev = ta.highest(high, fvgLength)
lowPrev = ta.lowest(low, fvgLength)
// FVG Bullish (شکاف ارزش منصفانه صعودی)
fvgBullish = close < lowPrev and close > highPrev
// FVG Bearish (شکاف ارزش منصفانه نزولی)
fvgBearish = close > highPrev and close < lowPrev
// تشخیص FTR
ftrBullish = close > highPrev and close < highPrev // عدم بازگشت به بالاترین سطح
ftrBearish = close < lowPrev and close > lowPrev // عدم بازگشت به پایینترین سطح
// نمایش FVG Bullish و FVG Bearish
plotshape(fvgBullish, location=location.belowbar, color=color.green, style=shape.labelup, text="FVG Bullish", title="Bullish FVG")
plotshape(fvgBearish, location=location.abovebar, color=color.red, style=shape.labeldown, text="FVG Bearish", title="Bearish FVG")
// نمایش FTR Bullish و FTR Bearish
plotshape(ftrBullish, location=location.belowbar, color=color.blue, style=shape.triangledown, text="FTR Bullish", title="Bullish FTR")
plotshape(ftrBearish, location=location.abovebar, color=color.orange, style=shape.triangleup, text="FTR Bearish", title="Bearish FTR")