IL - Inside Bar Detector - v01Indicator: IL - Inside Bar Detector - v01
Product: An Indigo Lynx Indicator
Copyright: © Indigo Lynx, v01, 2025-07-04
Description:
This indicator identifies Inside Bar candlestick patterns, which can signal
consolidation or indecision in the market, often preceding breakouts.
It offers multiple definitions for what constitutes an Inside Bar, an
optional volume filter, and differentiates markers and display for
bullish or bearish closing inside bars.
Features:
- Detects Inside Bar patterns.
- Configurable Inside Bar Definitions (via "Inside Bar Definition" input):
1. "Body (O/C)": Current O/C body within previous O/C body.
2. "Range (H/L - Standard)": Current H/L within previous H/L.
3. "Super (Range & Body)": Requires BOTH conditions.
- Optional Volume Filter: Inside Bar volume < SMA of volume.
- Display Toggles: Separate options to show/hide Bullish closing IBs
and Bearish closing IBs.
- Customizable Visuals: Bar color and optional plotshape markers (differentiated
for bullish/bearish closing inside bars using "BI" and "BRI" text).
- Data Logging: Option to log detected pattern details.
How to Use & Interpret:
- Configure definition, volume filter, and display options.
- Inside Bars are highlighted by bar color if their type (bullish/bearish closing) is enabled.
- Optional shapes: Green up-triangle (BI) for bullish-closing Inside Bars,
Red down-triangle (BRI) for bearish-closing Inside Bars, if enabled.
- Use with other analysis methods for confirmation.
Disclaimer: Trading involves substantial risk of loss and is not suitable for all investors.
Past performance is not indicative of future results.
Chart patterns
IL - Bull and Bear Engulfing Detector - v01Description:
This indicator is designed to identify and highlight Bullish and Bearish Engulfing
candlestick patterns on your chart. It offers a high degree of customization
through different engulfing definitions and an optional strictness filter, allowing
traders to tailor the detection to their specific criteria for these common reversal signals.
Features:
- Universal Detection: Identifies both Bullish Engulfing and Bearish Engulfing patterns.
- Configurable Engulfing Modes (via "Engulfing Definition Type" input):
1. "Body (O/C)": Traditional - current body engulfs previous body.
2. "Range (H/L)": Current H/L range engulfs previous H/L range.
3. "Body & Range (Super)": Requires BOTH "Body (O/C)" AND "Range (H/L)" conditions.
- Optional "Larger Body" Filter: Engulfing body must be strictly larger.
- Display Toggles: Options to show/hide Bullish and/or Bearish pattern signals.
- Customizable Colors: Bar colors for bullish/bearish patterns are user-configurable.
- Data Logging: Option to log detected pattern details to the Pine Logs.
- Visual Signals: Patterns marked with plot shapes and optional bar coloring.
How to Use & Interpret:
- Configure "Engulfing Definition Type", "Require Larger Engulfing Body?", display toggles,
and colors in the indicator settings.
- Enable "Log Detected Pattern Examples?" in "Debug Options" to capture data.
- BE = Bullish Engulfing (green triangle below bar). BRE = Bearish Engulfing (red triangle above).
- Use with other analysis methods for confirmation.
Disclaimer: Trading involves substantial risk of loss and is not suitable for all investors.
Past performance is not indicative of future results.
log.info() - 5 Exampleslog.info() is one of the most powerful tools in Pine Script that no one knows about. Whenever you code, you want to be able to debug, or find out why something isn’t working. The log.info() command will help you do that. Without it, creating more complex Pine Scripts becomes exponentially more difficult.
The first thing to note is that log.info() only displays strings. So, if you have a variable that is not a string, you must turn it into a string in order for log.info() to work. The way you do that is with the str.tostring() command. And remember, it's all lower case! You can throw in any numeric value (float, int, timestamp) into str.string() and it should work.
Next, in order to make your output intelligible, you may want to identify whatever value you are logging. For example, if an RSI value is 50, you don’t want a bunch of lines that just say “50”. You may want it to say “RSI = 50”.
To do that, you’ll have to use the concatenation operator. For example, if you have a variable called “rsi”, and its value is 50, then you would use the “+” concatenation symbol.
EXAMPLE 1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
//@version=6
indicator("log.info()")
rsi = ta.rsi(close,14)
log.info(“RSI= ” + str.tostring(rsi))
Example Output =>
RSI= 50
Here, we use double quotes to create a string that contains the name of the variable, in this case “RSI = “, then we concatenate it with a stringified version of the variable, rsi.
Now that you know how to write a log, where do you view them? There isn’t a lot of documentation on it, and the link is not conveniently located.
Open up the “Pine Editor” tab at the bottom of any chart view, and you’ll see a “3 dot” button at the top right of the pane. Click that, and right above the “Help” menu item you’ll see “Pine logs”. Clicking that will open that to open a pane on the right of your browser - replacing whatever was in the right pane area before. This is where your log output will show up.
But, because you’re dealing with time series data, using the log.info() command without some type of condition will give you a fast moving stream of numbers that will be difficult to interpret. So, you may only want the output to show up once per bar, or only under specific conditions.
To have the output show up only after all computations have completed, you’ll need to use the barState.islast command. Remember, barState is camelCase, but islast is not!
EXAMPLE 2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
//@version=6
indicator("log.info()")
rsi = ta.rsi(close,14)
if barState.islast
log.info("RSI=" + str.tostring(rsi))
plot(rsi)
However, this can be less than ideal, because you may want the value of the rsi variable on a particular bar, at a particular time, or under a specific chart condition. Let’s hit these one at a time.
In each of these cases, the built-in bar_index variable will come in handy. When debugging, I typically like to assign a variable “bix” to represent bar_index, and include it in the output.
So, if I want to see the rsi value when RSI crosses above 0.5, then I would have something like
EXAMPLE 3
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
//@version=6
indicator("log.info()")
rsi = ta.rsi(close,14)
bix = bar_index
rsiCrossedOver = ta.crossover(rsi,0.5)
if rsiCrossedOver
log.info("bix=" + str.tostring(bix) + " - RSI=" + str.tostring(rsi))
plot(rsi)
Example Output =>
bix=19964 - RSI=51.8449459867
bix=19972 - RSI=50.0975830828
bix=19983 - RSI=53.3529808079
bix=19985 - RSI=53.1595745146
bix=19999 - RSI=66.6466337654
bix=20001 - RSI=52.2191767466
Here, we see that the output only appears when the condition is met.
A useful thing to know is that if you want to limit the number of decimal places, then you would use the command str.tostring(rsi,”#.##”), which tells the interpreter that the format of the number should only be 2 decimal places. Or you could round the rsi variable with a command like rsi2 = math.round(rsi*100)/100 . In either case you’re output would look like:
bix=19964 - RSI=51.84
bix=19972 - RSI=50.1
bix=19983 - RSI=53.35
bix=19985 - RSI=53.16
bix=19999 - RSI=66.65
bix=20001 - RSI=52.22
This would decrease the amount of memory that’s being used to display your variable’s values, which can become a limitation for the log.info() command. It only allows 4096 characters per line, so when you get to trying to output arrays (which is another cool feature), you’ll have to keep that in mind.
Another thing to note is that log output is always preceded by a timestamp, but for the sake of brevity, I’m not including those in the output examples.
If you wanted to only output a value after the chart was fully loaded, that’s when barState.islast command comes in. Under this condition, only one line of output is created per tick update — AFTER the chart has finished loading. For example, if you only want to see what the the current bar_index and rsi values are, without filling up your log window with everything that happens before, then you could use the following code:
EXAMPLE 4
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
//@version=6
indicator("log.info()")
rsi = ta.rsi(close,14)
bix = bar_index
if barstate.islast
log.info("bix=" + str.tostring(bix) + " - RSI=" + str.tostring(rsi))
Example Output =>
bix=20203 - RSI=53.1103309071
This value would keep updating after every new bar tick.
The log.info() command is a huge help in creating new scripts, however, it does have its limitations. As mentioned earlier, only 4096 characters are allowed per line. So, although you can use log.info() to output arrays, you have to be aware of how many characters that array will use.
The following code DOES NOT WORK! And, the only way you can find out why will be the red exclamation point next to the name of the indicator. That, and nothing will show up on the chart, or in the logs.
// CODE DOESN’T WORK
//@version=6
indicator("MW - log.info()")
var array rsi_arr = array.new()
rsi = ta.rsi(close,14)
bix = bar_index
rsiCrossedOver = ta.crossover(rsi,50)
if rsiCrossedOver
array.push(rsi_arr, rsi)
if barstate.islast
log.info("rsi_arr:" + str.tostring(rsi_arr))
log.info("bix=" + str.tostring(bix) + " - RSI=" + str.tostring(rsi))
plot(rsi)
// No code errors, but will not compile because too much is being written to the logs.
However, after putting some time restrictions in with the i_startTime and i_endTime user input variables, and creating a dateFilter variable to use in the conditions, I can limit the size of the final array. So, the following code does work.
EXAMPLE 5
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// CODE DOES WORK
//@version=6
indicator("MW - log.info()")
i_startTime = input.time(title="Start", defval=timestamp("01 Jan 2025 13:30 +0000"))
i_endTime = input.time(title="End", defval=timestamp("1 Jan 2099 19:30 +0000"))
var array rsi_arr = array.new()
dateFilter = time >= i_startTime and time <= i_endTime
rsi = ta.rsi(close,14)
bix = bar_index
rsiCrossedOver = ta.crossover(rsi,50) and dateFilter // <== The dateFilter condition keeps the array from getting too big
if rsiCrossedOver
array.push(rsi_arr, rsi)
if barstate.islast
log.info("rsi_arr:" + str.tostring(rsi_arr))
log.info("bix=" + str.tostring(bix) + " - RSI=" + str.tostring(rsi))
plot(rsi)
Example Output =>
rsi_arr:
bix=20210 - RSI=56.9030578034
Of course, if you restrict the decimal places by using the rounding the rsi value with something like rsiRounded = math.round(rsi * 100) / 100 , then you can further reduce the size of your array. In this case the output may look something like:
Example Output =>
rsi_arr:
bix=20210 - RSI=55.6947486019
This will give your code a little breathing room.
In a nutshell, I was coding for over a year trying to debug by pushing output to labels, tables, and using libraries that cluttered up my code. Once I was able to debug with log.info() it was a game changer. I was able to start building much more advanced scripts. Hopefully, this will help you on your journey as well.
Pivot Swings w Table Pivot Swings w Table — Intraday Structure & Range Analyzer
This indicator identifies key pivot highs and lows on the chart and highlights market structure shifts using a real-time table display. It helps traders visually confirm potential trade setups by tracking unbroken swing points and measuring the range between the most recent pivots.
🔍 Features:
🔹 Automatic Pivot Detection using configurable left/right bar logic.
🔹 Unbroken Pivot Filtering — only pivots that haven't been invalidated by price are displayed.
🔹 Dynamic Range Table with:
Latest valid Pivot High and Pivot Low
Total Range Width
Upper & Lower 25% range thresholds (useful for value/imbalance analysis)
🔹 Trend-Based Color Coding — the table background changes based on which pivot (high or low) occurred more recently:
🟥 Red: Downward bias (last pivot was a lower high)
🟩 Green: Upward bias (last pivot was a higher low)
🔹 Optional extension of pivot levels to the right of the chart for support/resistance confluence.
⚙️ How to Use:
Adjust the Left Bars and Right Bars inputs to fine-tune how swings are defined.
Look for price reacting near the Upper or Lower 25% zones to anticipate mean reversion or breakout setups.
Use the trend color of the table to confirm directional bias, especially useful during consolidation or retracement periods.
💡 Best For:
Intraday or short-term swing traders
Traders who use market structure, support/resistance, or trend-based strategies
Those looking to avoid low-quality trades in tight ranges
✅ Built for overlay use on price charts
📈 Works on all symbols and timeframes
🧠 No repainting — pivots are confirmed with completed bars
X PD&FVVisualizes the price's premium or discount relative to a moving average benchmark, highlighting mean-reversion and trend-continuation opportunities. While the underlying math is simple, the application is nuanced and can enhance decision-making in both trending and ranging market conditions.
Core Logic:
This tool calculates a custom **spread value**, defined as the distance between the current price and a chosen exponential moving average (EMA). Specifically:
When the current price is **above** the EMA, the spread is calculated as `low - EMA`.
When the price is **below** the EMA, the spread is calculated as `high - EMA`.
This approach creates a dynamic spread that reflects deviation from the EMA, with histogram bars:
Green when the spread is positive (suggesting a price premium),
Red when the spread is negative (suggesting a discount).
A secondary EMA (default 9-period) is applied to the spread itself, plotted as a smoother line over the histogram. This "EMA of spread" line can be interpreted as a moving reference level for detecting directional shifts in momentum.
Interpretation:
Zero Line = Fair Value: The horizontal zero axis represents equilibrium relative to the moving average. Movement toward or away from this line signals potential shifts in market bias.
Trend Following Use: In trending markets, traders can:
Buy when the spread dips below its EMA (discount within uptrend),
Sell when the spread rises above its EMA (premium within downtrend).
Mean Reversion Use: A return to the zero line (fair value) often acts as an **inflection point**, which traders can monitor for either:
Trend continuation (bounce away from zero), or
Reversal (cross through zero).
Customization:
EMA length (default 50) is adjustable to fit different timeframes or asset volatility.
Monthly, Daily, 4H High Low (v2 Corrected)Multi-Timeframe Highs & Lows (M, D, 4H) with Alerts
Script Description:
Summary
This indicator is a powerful tool designed to streamline your technical analysis by plotting the most significant price levels from higher timeframes directly onto your chart. It automatically draws the previous Monthly, Daily, and 4-Hour High and Low levels, allowing you to identify key support and resistance zones without constantly switching between timeframes.
The clean, minimalist design ensures your chart remains uncluttered, while the built-in, customizable alert system notifies you instantly when the price interacts with these critical levels.
Key Features
Automatic High & Low Plotting: Visualizes the previous high and low for three key timeframes:
Monthly High & Low (Red lines)
Daily High & Low (Blue lines)
4-Hour High & Low (Orange lines)
Clear On-Chart Labels: Each line is accompanied by a small, non-intrusive label (e.g., "Monthly High") on the right side of the chart for easy identification.
Powerful Alert System: Never miss a key price reaction. The script includes a fully configurable alert system that triggers when the price crosses any of the plotted high or low levels.
Customizable Alerts: In the indicator settings, you can individually enable or disable alerts for each timeframe (Monthly, Daily, 4H), giving you full control over your notifications.
How to Use
The lines plotted by this indicator serve as powerful, objective levels of support and resistance.
Resistance: The high of a previous period (e.g., Daily High) often acts as a ceiling where price may struggle to break through.
Support: The low of a previous period (e.g., Daily Low) often acts as a floor where price may find buying interest.
Breakout/Breakdown Confirmation: A decisive close above a previous high or below a previous low can signal a potential continuation of the trend. Use the alerts to be notified of these events in real-time.
Liquidity Sweeps: Traders often watch for price to briefly "sweep" or "hunt" these levels before reversing. The alert system is perfect for catching these movements.
Setting Up Alerts
Add the indicator to your chart.
Click the Alert icon (clock symbol) in the TradingView toolbar.
In the "Condition" dropdown, select the indicator: "Multi-Timeframe Highs & Lows (v2 Corrected)".
A second dropdown will appear. Select the specific event you want to be notified about (e.g., "Cross Daily High" or "Cross 4H Low").
Choose your preferred alert settings (e.g., "Once Per Bar Close") and notification method.
Click "Create".
You can create multiple alerts for different levels as needed.
This tool was designed to be both simple and effective, helping traders make more informed decisions by keeping an eye on the bigger picture. Happy trading!
All SMAs Bullish/Bearish Screener (Enhanced)All SMAs Bullish/Bearish Screener Enhanced: Uncover High-Conviction Trend Alignments with Confidence
Description:
Are you ready to elevate your trading from mere guesswork to precise, data-driven decisions? The "All SMAs Bullish/Bearish Screener Enhanced" is not just another indicator; it's a sophisticated, yet user-friendly, trend-following powerhouse designed to cut through market noise and pinpoint high-probability trading opportunities. Built on the foundational strength of comprehensive Moving Average confluence and fortified with critical confirmation signals from Momentum, Volume, and Relative Strength, this script empowers you to identify truly robust trends and manage your trades with unparalleled clarity.
The Power of Multi-Factor Confluence: Beyond Simple Averages
In the unpredictable world of financial markets, true strength or weakness is rarely an isolated event. It's the harmonious alignment of multiple technical factors that signals a high-conviction move. While our original "All SMAs Bullish/Bearish Screener" intelligently identified stocks where price was consistently above or below a full spectrum of Simple Moving Averages (5, 10, 20, 50, 100, 200), this Enhanced version takes it a crucial step further.
We've integrated a powerful three-pronged confirmation system to filter out weaker signals and highlight only the most compelling setups:
Momentum (Rate of Change - ROC): A strong trend isn't just about price direction; it's about the speed and intensity of that movement. Positive momentum confirms that buyers are still aggressively pushing price higher (for bullish signals), while negative momentum validates selling pressure (for bearish signals).
Volume: No trend is truly trustworthy without the backing of smart money. Above-average volume accompanying an "All SMAs" alignment signifies strong institutional participation and conviction behind the move. It separates genuine trend starts from speculative whims.
Relative Strength Index (RSI): This versatile oscillator ensures the trend isn't just "there," but that it's developing healthily. We use RSI to confirm a bullish bias (above 50) or a bearish bias (below 50), adding another layer of confidence to the direction.
When the price aligns above ALL six critical SMAs, and is simultaneously confirmed by robust positive momentum, healthy volume, and a bullish RSI bias, you have an exceptionally strong "STRONGLY BULLISH" signal. This confluence often precedes sustained upward moves, signaling prime accumulation phases. Conversely, a "STRONGLY BEARISH" signal, where price is below ALL SMAs with negative momentum, confirming volume, and a bearish RSI bias, indicates powerful distribution and potential for significant downside.
How to Use This Enhanced Screener:
Add to Chart: Go to TradingView's Pine Editor, paste the script, and click "Add to Chart."
Customize Parameters: Fine-tune the lengths of your SMAs, RSI, Momentum, and Volume averages via the indicator's settings. Experiment to find what best suits your trading style and the assets you trade.
Choose Your Timeframe Wisely:
Daily (1D) and 4-Hour (240 min) are highly recommended. These timeframes cut through intraday noise and provide more reliable, actionable signals for swing and position trading.
Shorter timeframes (e.g., 15min, 60min) can be used by advanced day traders for very short-term entries, but be aware of increased volatility and noise.
Visual Confirmation:
Green/Red Triangles: Appear on your chart, indicating confirmed bullish or bearish signals.
Background Color: The chart background will subtly turn lime green for "STRONGLY BULLISH" and red for "STRONGLY BEARISH" conditions.
On-Chart Status Table: A clear table displays the current signal status ("STRONGLY BULLISH/BEARISH," or "SMAs Mixed") for immediate feedback.
Set Up Alerts (Your Primary Screener Tool): This is the game-changer! Create custom alerts on TradingView based on the "Confirmed Bullish Trade" and "Confirmed Bearish Trade" conditions. Receive instant notifications (email, pop-up, mobile) for any stock in your watchlist that meets these stringent criteria. This allows you to scan the entire market effortlessly and act decisively.
Strategic Stop-Loss Placement: The Trader's Lifeline
Even the most robust signals can fail. Protecting your capital is paramount. For this trend-following strategy, your stop-loss should be placed where the underlying trend structure is broken.
For a "STRONGLY BULLISH" Trade: Place your stop-loss just below the most recent significant swing low (higher low). This is the last point where buyers stepped in to support the price. If price breaks below this, your bullish thesis is invalidated.
For a "STRONGLY BEARISH" Trade: Place your stop-loss just above the most recent significant swing high (lower high). If price breaks above this, your bearish thesis is invalidated.
Alternatively, consider placing your stop-loss just below the 20-period SMA (for bullish trades) or above the 20-period SMA (for bearish trades). A significant close beyond this intermediate-term average often indicates a critical shift in momentum. Always ensure your chosen stop-loss adheres to your pre-defined risk per trade (e.g., 1-2% of capital).
Disciplined Profit Booking: Maximizing Gains
Just as important as knowing when you're wrong is knowing when to take profits.
Trailing Stop-Loss: As your trade moves into profit, trail your stop-loss upwards (for longs) or downwards (for shorts). You can trail it using:
Previous Swing Lows/Highs: Move your stop to just below each new higher low (for longs) or just above each new lower high (for shorts).
A Moving Average (e.g., 10-period or 20-period SMA): If price closes below your chosen trailing SMA, exit. This allows you to ride the trend while protecting accumulated profits.
Target Levels: Identify potential resistance levels (for longs) or support levels (for shorts) using pivot points, previous highs/lows, or Fibonacci extensions. Consider taking partial profits at these levels and letting the rest run with a trailing stop.
Loss of Confluence: If the "STRONGLY BULLISH/BEARISH" condition ceases to be met (e.g., RSI crosses below 50, or volume drops significantly), this can be a signal to reduce or exit your position, even if your stop-loss hasn't been hit.
The "All SMAs Bullish/Bearish Screener Enhanced" is your comprehensive partner in navigating the markets. By combining robust trend identification with critical confirmation signals and disciplined risk management, you're equipped to make smarter, more confident trading decisions. Add it to your favorites and unlock a new level of precision in your trading journey!
#PineScript #TradingView #SMA #MovingAverage #TrendFollowing #StockScreener #TechnicalAnalysis #Bullish #Bearish #QQQ #Momentum #Volume #RSI #SPY #TradingStrategy #Enhanced #Signals #Analysis #DayTrading #SwingTrading
[eLm] 0-1-2# 📈 Market Structure Indicator – Counter System
This indicator dynamically analyzes price action to detect key market structure shifts and trend strength using four essential formations:
## 🔍 Detected Structures
- **Higher High (HH):** A candle forming a new high above recent peaks
- **Lower Low (LL):** A candle forming a new low below recent bottoms
- **Higher Low (HL):** A higher dip, indicating potential trend continuation
- **Lower High (LH):** A lower peak, signaling potential weakness
## 🧠 Structure Protection Logic
After a HH or LL is formed, if price does not breach that level within a user-defined number of candles, the level is considered **"protected."**
This provides insight into trend strength and market reaction.
## 🔢 HL / LH Counter System
- Each HL or LH increases a counter.
- A new HH or LL **resets** the corresponding counter to zero.
> This helps visualize how many consecutive HL or LH structures have occurred — useful for measuring trend momentum.
## 🎯 Use Cases
- Trend following and confirmation
- Early trend reversal detection
- Building structure-based trading strategies
- Understanding price behavior and market intent
---
> **Note:** This indicator does not provide financial advice. It is designed to support technical analysis with clear, structure-based visual signals.
Pattern Finder with MTF Boxes (Break - Fixed)Script Title:
MTF Supply/Demand Zone Indicator with Candlestick Pattern Confirmation
Short Description:
This advanced strategy identifies key Supply and Demand zones (Order Blocks) on higher timeframes (30m & 1h) and then waits for a pullback to these zones on the current timeframe. The final entry signal is triggered upon the appearance of a valid candlestick pattern (e.g., Hammer, Engulfing) within these zones.
Full Description:
Introduction & Core Concept
This script is a powerful trading tool based on a combination of the following concepts:
Multi-Timeframe (MTF) Analysis: Identifying significant structures on higher timeframes to understand the bigger market picture.
Supply and Demand Zones: Finding areas where an imbalance between buyers and sellers has caused strong price movements.
Candlestick Patterns: Using classic candlestick patterns as the final confirmation for entering a trade at these key zones.
The main idea is to avoid trading blindly and instead wait for the price to react to a significant zone, then enter with a confirmation signal.
How the Strategy Works (Step-by-Step)
Identifying the Key Pattern on Higher Timeframes:
The script continuously monitors the 30-minute and 1-hour charts to find a specific pattern: a short consolidation period (usually 1-4 candles) immediately followed by a breakout with a powerful, high-momentum candle (Long Bar). This pattern indicates the formation of a fresh Supply or Demand Zone.
Drawing the Supply and Demand Boxes:
Green Box (Demand Zone): When a minor high is broken by a bullish Long Bar, this area is identified as potential support and marked with a green box.
Red Box (Supply Zone): When a minor low is broken by a bearish Long Bar, this area is identified as potential resistance and marked with a red box.
White Box (Long Bar / Trigger Zone): This box highlights the range of the Long Bar candle itself. A break of or return to this zone provides important signals.
Waiting for a Pullback:
After a zone is identified and drawn, the strategy waits for the price on your current chart to pull back into this box.
Entry Confirmation with Candlestick Patterns:
Once the price enters the box, the script looks for reversal candlestick patterns:
In a Demand Zone (Green Box): It looks for bullish patterns like the Hammer, Bullish Engulfing, Bullish Harami, and Morning Star. Upon detection, a BUY label appears on the chart.
In a Supply Zone (Red Box): It looks for bearish patterns like the Hanging Man, Shooting Star, Bearish Engulfing, Bearish Harami, and Evening Star. Upon detection, a SELL label appears.
Breakout Signal:
In addition to reversal signals, if the price breaks the White Box (Long Bar Zone) in the opposite direction, a breakout signal is generated, which could indicate a trend continuation.
Visual Elements on the Chart
Green/Red Boxes: The primary Supply and Demand zones from higher timeframes.
White Boxes: The range of the Long Bar candle that activated the primary zone.
BUY/SELL Labels: Trade signals that appear after a candlestick confirmation within the zones.
Moving Averages (SMA 100 & 200): Included to help identify the overall market trend. Trades aligned with the trend are generally more reliable.
Input Settings
period ATR & Bar multiplayer: Allow you to customize the definition of a "Long Bar" based on market volatility.
Number of candle for long bar avrage: The lookback period for calculating the average candle body size.
multiplayer for tp: A multiplier to calculate the take-profit based on the stop-loss size (Risk-to-Reward ratio).
How to Use This Strategy
Apply the script to your main trading timeframe (e.g., 5-minute or 15-minute).
Wait for a Supply (Red) or Demand (Green) zone to be drawn on your chart.
Be patient and wait for the price to return to this zone.
If a BUY or SELL label appears, consider it a valid entry signal.
Always combine these signals with your own analysis and the overall market context.
Disclaimer: This script is an analytical tool and should not be the sole basis for your trading decisions. Always practice proper risk management and thoroughly backtest its performance before using it in a live account.
AZ Dynamic Trend Indicator with Heikin-Ashi### Dynamic Trend Indicator with Heikin-Ashi (v2.7)
**Effortlessly identify trends and reversals** with this versatile tool combining multi-timeframe analysis, adaptive moving averages, and Heikin-Ashi smoothing. Here's what it offers:
#### 🔍 **Core Features**
1. **Dual Timeframe Analysis**:
- Track trends on higher timeframes (e.g., 1H/D) while viewing signals on your current chart.
- Toggle between **Heikin-Ashi** or standard candles for cleaner trend visualization.
2. **8 Customizable MAs**:
- Choose from **ALMA, HMA, SMA, SWMA, VWMA, WMA, ZLEMA, or EMA** with adjustable periods.
- Unique "Trend Strength" metric: `(MA_Close - MA_Open) / (MA_High - MA_Low)` highlights momentum direction.
3. **Smart Signals**:
- **Entry/Exit**: Triangles mark crossovers between MA Close/Open.
- **Reversal Alerts**: Detects counter-trend moves within a user-defined window (default: 3 bars) after signals.
- Color-coded plots: Bullish (🟢), Bearish (🔴), Reversal Bull (🔵), Reversal Bear (🟠).
#### 🎨 **Visual Customization**
- Toggle **High/Low MA lines**, **Close line**, and **fill colors**.
- Adjust colors for all elements to match your chart theme.
- Hide signals or reversal markers as needed.
#### ⚙️ **Practical Use**
- **Trend Following**: Use the MA Close/Open crossover with trend fill colors to confirm direction.
- **Reversal Trading**: Capitalize on pullbacks with reversal signals (e.g., after a bearish signal, watch for Bull Reversal markers).
- **Multi-Timeframe Confirmation**: Avoid false signals by aligning higher-timeframe trends with your entries.
*Ideal for swing traders and trend riders!*
**Note**: Adjust `MA Period`, `Reversal Window`, and `Trend Timeframe` for your strategy. Disable Heikin-Ashi in choppy markets for faster reactions.
---
*Code v2.7 updates: Optimized reversal logic, added ALMA/ZLEMA support, and enhanced visual controls.*
LaCrazy Smash CandleLaCrazy Smash Candle highlights powerful engulfing candles that signal potential momentum reversals or breakout continuation.
Smash Long: The candle's low touches or dips below the prior candle's low, then closes above the previous high with a strong body (minimum % of the candle range).
Smash Short: The candle's high touches or exceeds the prior high, then closes below the previous low with a strong body.
These “Smash” moves often occur at key pivot points, signaling decisive rejections or trend continuation. Customize the body strength filter to match your strategy needs.
Opening Range Breakout🧭 Overview
The Open Range Breakout (ORB) indicator is designed to capture and display the initial price range of the trading day (typically the first 15 minutes), and help traders identify breakout opportunities beyond this range. This is a popular strategy among intraday and momentum traders.
🔧 Features
📊 ORB High/Low Lines
Plots horizontal lines for the session’s high and low
🟩 Breakout Zones
Background highlights when price breaks above or below the range
🏷️ Breakout Labels
Text labels marking breakout events
🧭 Session Control
Customizable session input (default: 09:15–09:30 IST)
📍 ORB Line Labels
Text labels anchored to the ORB high and low lines (aligned right)
🔔 Alerts
Configurable alerts for breakout events
⚙️ Adjustable Settings
Show/hide background, labels, session window, etc.
⏱️ Session Logic
• The ORB range is calculated during a defined session window (default: 09:15–09:30).
• During this window, the highest high and lowest low are recorded as ORB High and ORB Low.
📈 Breakout Detection
• Breakout Above: Triggered when price crosses above the ORB High.
• Breakout Below: Triggered when price crosses below the ORB Low.
• Each breakout can trigger:
• A background highlight (green/red)
• A text label (“Breakout ↑” / “Breakout ↓”)
• An optional alert
🔔 Alerts
Two built-in alert conditions:
1. Breakout Above ORB High
• Message: "🔼 Price broke above ORB High: {{close}}"
2. Breakout Below ORB Low
• Message: "🔽 Price broke below ORB Low: {{close}}"
You can create alerts in TradingView by selecting these from the Add Alert window.
📌 Best Use Cases
• Intraday momentum trading
• Breakout and scalping strategies
• First 15-minute range traders (NSE, BSE markets)
ICT Sensitive Key Levels [Mariinus]Indicator Overview – Inspired by ICT Concepts
This indicator is inspired by the teachings of Inner Circle Trader (ICT), whose philosophies and principles have greatly shaped the way I view price action. One of the most powerful lessons that stuck with me is his quote:
"All you need is OHLC."
Another fundamental concept that underpins this tool is the idea that:
"Price is constantly moving in cycles from Premium or Discount to Equilibrium, from Equilibrium to Discount to Premium."
With these core ideas in mind, this indicator was developed to help traders who are already using an ICT-based framework. In addition to plotting the standard OHLC levels, the ICT Sensitive Key Levels indicator also includes derived levels that provide deeper Market insight. These include the Equilibrium of the full candle range (High to Low) as well as the Equilibrium of the wicks – offering a more nuanced view of price balance and potential turning points, in line with ICT’s core concepts.
⚠️ Important Disclaimer:
This is not a standalone trading plan.
This is not a buy or sell signal generator.
Instead, this tool is designed to support traders who follow ICT principles by helping them identify higher-probability PD Arrays – the key zones where setups are more likely to occur. If your trading plan includes looking for specific PD Arrays and structural frameworks taught by ICT, then this indicator is a visual aid to refine and focus your attention on the areas where your framework has a higher probability of playing out.
🔁 Backtesting & Daily Preparation
In addition to improving your real-time analysis, this indicator is also a valuable tool for accelerated backtesting . Rather than manually drawing out levels, the indicator automatically provides them, allowing you to analyze past price action faster and more efficiently .
It’s also ideal for preparing your trading day . By loading the indicator before the session starts, you get a clear visual of key levels that may play a role in your strategy. And if you find the chart too cluttered with lines, simply copy the ones that matter to you, draw them manually, and then turn the indicator off to keep your chart clean while keeping your zones intact.
⚙️ Explanation of the Settings
You can combine up to 4 timeframes to monitor their respective levels while operating on a lower timeframe. For each timeframe, you can:
• Set a lookback period to control how far back you want to calculate levels.
• Choose to display or hide the levels of the current candle , which helps you monitor intra-candle ebbs and flows.
Each level (e.g., High, Low, Open, Close, Equilibrium) can be customized:
• Color
• Line style
• Line width
• To hide a level , simply set its opacity to zero.
You can also enable dividers to clearly mark the start and end of higher timeframe candles on your lower timeframe chart. These dividers are also fully customizable:
• Color
• Style
• Width
• And again, if you prefer a cleaner chart, you can set the opacity to zero to hide them completely.
This setup gives you full control over how much or how little visual data you want to see, aligning the tool with your personal trading workflow.
💡 Example Use Cases
These examples are for educational purposes only. This tool is not financial advice and should always be used in conjunction with your own trading plan—whether it involves Fair Value Gaps, Order Blocks, or a custom combination of ICT-based elements.
• Example 1: A 1H Bearish Fair Value Gap overlapping with the Equilibrium Key Level of the Previous Day's Range – a high-probability zone for reaction.
• Example 2: A 1H Bullish Fair Value Gap in Discount, overlapping with the Equilibrium of Two Days Ago, followed by a move into a 1H Bearish Order Block that coincides with the Previous Day’s Equilibrium.
• Example 3: The same 1H PD Arrays viewed from a 4H chart, alongside Weekly Price Levels – giving you a higher timeframe context that supports or invalidates lower timeframe setups.
• Example 4: A combination of two timeframes for added context. A 4H Bullish Fair Value Gap is nested inside the current Weekly Equilibrium Key Level . On the 15M chart , we observe a reaction that creates an Inversion Fair Value Gap , which aligns with the Equilibrium Key Level of the previous 4H candle .
This indicator doesn’t replace your trading plan—it enhances your ability to execute it. It’s a precision tool made for ICT traders who understand context, structure, and probability.
Auto Trendlines [AlgoXcalibur]Effortlessly visualize trendlines.
This algorithm does more than just draw lines connecting structural swing points — it reveals dynamic support & resistance breakouts with clarity and precision while significantly reducing your workload compared to the hassle of manually drawing trendlines.
🧠 Algorithm Logic
This advanced Auto Trendlines indicator delivers clear market structure through an intelligent multi-fractal design, revealing useful swing structures in real time. For those seeking maximum awareness, the optional Micro Trendlines (Dotted) constantly monitors even the most recent and minor structural shifts — keeping you fully in tune with evolving market dynamics. A Break Detection Engine constantly monitors each trendline and provides instant visual feedback when structural integrity is lost: broken lines turn gray, stop extending, and remain visible to enhance clarity and situational awareness. The algorithm is carefully refined to prevent chart distortion commonly caused by forcing entire trendline structures into view — preserving a natural and accurate charting experience. To further ensure optimal readability, an integrated Clutter Control mechanism limits the number of visible trendlines — focusing attention only on the most relevant structures.
⚙️ User-Selectable Features
• Micro Trendlines (Dotted): Ultra-responsive short-term trendlines that react to even the smallest structural shifts — ideal for staying ahead of early trend changes.
• Broken Trendline Declutter: Enable to display only the most recent broken trendlines to simplify chart visuals and maintain clarity, or disable to analyze previous price action.
💡 Modern Innovation
Auto Trendline indicators are often inaccurate, clumsy, and rely on slow methods that fail to adapt. AlgoXcalibur’s Auto Trendline indicator takes a modern, refined approach — combining smart pivot logic for both speed and stability, dynamic break detection with clear visual cues, and displaying only the most relevant trendlines while prioritizing accuracy, preventing distortion, and reducing clutter — automatically.
🔐 To get access or learn more, visit the Author’s Instructions section.
RSI OS/OB Background StripesThe "RSI OS/OB Background Stripes" indicator is a simple tool designed to help traders visualize overbought and oversold market conditions using the Relative Strength Index (RSI). It highlights these conditions by displaying colored background stripes directly on your chart, making it easy to spot potential trading opportunities.
How It Works:RSI Calculation: The indicator calculates the RSI, a popular momentum indicator that measures the speed and change of price movements, using a default period of 14 (customizable).
Overbought/Oversold Levels: It marks areas where the RSI is above a user-defined overbought level (default: 70) with red background stripes, and below an oversold level (default: 30) with green background stripes.
Visual Feedback: The colored stripes appear on the chart when the RSI enters overbought (red) or oversold (green) zones, helping you quickly identify market conditions.
Customization: You can adjust the RSI period, overbought/oversold levels, background colors, and transparency. You can also choose to show the RSI line in a separate panel or display RSI values on the chart for debugging.
Alerts: The indicator includes optional alerts that notify you when the RSI crosses into overbought or oversold territory.
Who It’s For: This indicator is perfect for beginner and intermediate traders who want a clear, visual way to track RSI-based overbought and oversold conditions without cluttering their charts.
Key Features:Easy-to-read background stripes for overbought (red) and oversold (green) conditions.
Fully customizable RSI settings, colors, and transparency.
Optional RSI plot and value display for deeper analysis.
Alerts to keep you informed of key RSI level crossings.
This indicator is a straightforward way to monitor market momentum and make informed trading decisions.
GeeksDoByte 15m & 30m ORB + Prev Day High/LowCME_MINI:NQ1!
How It Works
Opening Ranges
At 9:30 ET, the script begins tracking the high & low.
It uses two fixed sessions:
15 min from 09:30 to 09:45
30 min from 09:30 to 10:00
On the very first bar of each session it initializes the range, then continuously updates the high/low on each new intraday bar.
Dashed lines are drawn when the session opens and extended horizontally across subsequent bars.
Previous Day’s Levels
Independently, it fetches yesterday’s high and low via a daily security call.
These historic levels are plotted as simple horizontal lines for daily context.
How to Use
Breakout Entries
A close above the 15 min ORB high can signal an early breakout; a further push above the 30 min ORB high confirms extended momentum.
Conversely, breaks below the respective lows can indicate short setups.
Support & Resistance
Yesterday’s high/low often act as magnet levels. If price is near the previous high when the opening ranges break, you get a confluence zone worth watching.
Trade Management
Combine the two opening-range levels to tier your stops or scale in.
For example, you might place an initial stop below the 15 min low and a wider stop below the 30 min low.
Clean Day Separator (Vertical Only)Clean Day Separator (Vertical Only) is a minimalist indicator for traders who value clarity and structure on their charts.
This tool draws:
✅ Vertical dashed lines at the start of each new day
✅ Optional day-of-week labels (Monday, Tuesday, etc.)
It’s designed specifically for clean chart lovers — no horizontal lines, no boxes, just what you need to mark time and keep your focus.
Perfect for:
Intraday traders who track market rhythm
Price action purists
Anyone who wants to reduce visual noise
Customizable settings:
Toggle day labels on/off
Choose line and text colors
Set label size to match your chart style
Hourly Markers 09:00 - 20:00 Adjusted for UTC+2A line for every hour from 0900 to 2200
Description:
This TradingView Pine Script plots small red markers (downward arrows) at the top of the chart for every full hour between 09:00 AM and 08:00 PM (20:00) based on UTC+2 time. The markers appear precisely at the opening minute of each hour within the defined range, helping traders visually track key time intervals during the day.
Features:
✔ Displays markers from 09:00 to 20:00 local time (UTC+2 adjustment)
✔ Only plots markers at the first minute of each hour
✔ Uses clear, unobtrusive triangle-down symbols above the bars
✔ Works on any chart timeframe that captures hourly intervals
Use Case:
Ideal for traders who want a quick visual reference of hourly intervals during the main trading hours, especially when working with charts set to UTC or different time zones.
Macro+ ExtMacros+ (Time Sessions & Alerts)
Macros+ is a powerful and highly customizable tool designed to highlight specific time windows—often referred to as "macros"—directly on your chart. It is built for traders who operate on time-based strategies, such as those targeting specific liquidity periods like the ICT Silver Bullet or other institutional timeframes.
By visualizing these key sessions historically and in real-time, traders can better anticipate market volatility, identify potential trade setups, and maintain discipline. The script is clean, efficient, and built with flexibility in mind.
Key Features
This indicator goes beyond simple time boxes and includes several advanced features to fit your specific trading style:
1. Historical & Real-Time Display
The script is designed to plot all selected macro sessions across the entire historical data loaded on your chart, not just the current day. This allows for comprehensive backtesting and analysis of how price behaves during these specific time windows.
2. Fully Customizable Macro Sessions
You have full control over which time sessions you want to display. The indicator includes 14 pre-configured 20-minute sessions, which you can easily toggle on or off from the settings menu. This allows you to focus only on the timeframes that are relevant to your strategy.
3. Adjustable "Extended Macro" Time
Flexible Time Extension: Instead of a fixed session duration, you can now dynamically extend the start and end times of all macros.
Numerical Input: In the settings, under "Time Settings," you'll find an "Extend Minutes" input. This number lets you add minutes to both the beginning and the end of each session.
Example: A standard macro from 09:50 - 10:10 with an "Extend Minutes" value of 5 will be automatically adjusted to 09:45 - 10:15. Setting it to 0 will keep the default 20-minute sessions.
4. Multiple Display Styles
Adapt the indicator's appearance to your preference for a clean and readable chart. All styles are designed to span the full vertical height of the chart for maximum visibility.
Solid Line: Clear, solid vertical lines marking the start and end of a session.
Dashed Line: A more subtle, dashed-line alternative.
Dotted Line: The most subtle line style for a minimalist chart.
Background: Fills the entire session window with a semi-transparent color.
Outline: Draws a colored border around the session window without filling it.
5. Real-Time Alerts
Never miss the start of a key session again. You can enable an alert that will trigger once at the beginning of any active macro session. This is perfect for traders who may not be watching the charts constantly.
6. Timezone Correction
All times are calculated based on the timezone you select in the settings (default is "America/New_York"). This ensures the sessions are always plotted accurately according to the market you are trading (e.g., New York session times).
How to Use
Add to Chart: Add the "Macros+" indicator to your chart.
Open Settings:
General Settings: Choose your preferred Timezone, Display Style, and Color.
Active Macro Sessions: Check the boxes for the time sessions you wish to monitor.
Time Settings: Enter a value in Extend Minutes if you want to widen the time windows. A value of 5 will create 30-minute sessions.
Alert Settings: Enable the Alert On Macro Start option if you wish to receive alerts.
Create Alert: To activate the pop-up alert, click the clock icon on the TradingView right-hand panel, select "Macros+" in the "Condition" dropdown, choose "Sesi Makro Dimulai," and set it to trigger "Once Per Bar."
This tool was designed to be both powerful and user-friendly. I hope it becomes a valuable part of your trading toolkit. Happy trading!
Open Range Breakout (ORB) with Alerts
🚀 ChartsAlgo – Open Range Breakout (ORB) with Alerts
The Open Range Breakout (ORB) Indicator by ChartsAlg is designed for intraday traders looking to capitalize on price movements after the market’s opening range. This tool is especially effective for futures (MNQ, MES) and high-volatility stocks or crypto where initial volatility sets the tone for the session.
This indicator identifies a user-defined opening range window, plots the high/low lines of that range, and visually alerts users when price breaks out above or below the range — with options to customize breakout repetitions, background fill, and alerts.
💡 What is an Open Range Breakout (ORB)?
The opening range represents the high and low established during the first few minutes of the trading session — usually 15 or 30 minutes. Many intraday strategies are based on the idea that breaking out of this initial range often signals strong momentum and trend continuation.
Traders often enter:
Long when price breaks above the range high.
Short when price breaks below the range low.
⚙️ How It Works
You define a session window (e.g., 09:30–09:45 EST).
The indicator tracks the high and low during this time.
Once the session ends, the high and low become your range breakout levels.
The indicator then:
Plots lines for visual clarity
Optionally fills background between the range
Triggers breakout signals if price crosses the levels
Provides alerts when breakouts occur
🛠️ Settings Breakdown
🔹 Session Settings
Range Session: Set your preferred window (e.g., 0930–0945). Can be premarket, first 30 mins, or any custom time.
Time zone: Use "America/New York" for EST (default) or change to "GMT+0" for international traders.
🔹 Breakout Settings
Bullish Breakout Signals: Number of allowed breakout alerts above the range.
Bearish Breakout Signals: Number of allowed breakout alerts below the range.
This prevents repeated alerts once breakout has been confirmed.
🔹 Display Settings
Show Background Fill: Fills area between high/low of the range for easier visual analysis.
Show Breakout Signals: Triangle markers plotted on the chart when breakouts happen.
Only Show Today’s Range: Keeps the chart clean by showing only the most current day’s range.
🔹 Color Settings
Range High/Low Line Colors: Choose any color for clarity.
Range Fill Color: Customize the highlight area for your chart style.
📊 Chart Features
Range High/Low Lines: Automatically plotted after range session ends.
Visual Fill Box: Optional background shading between the opening range.
Triangle Breakout Markers: Appear at the breakout candle.
Alerts: Can be used with TradingView’s alert system to notify you of breakouts in real-time.
🔔 Alerts
Two alert conditions are built in:
Bullish Breakout: Triggers when price breaks above the high of the range.
Bearish Breakout: Triggers when price breaks below the low of the range.
Example Alert Message:
📈 “Bullish Breakout above Open Range on AAPL!”
To activate:
Click “🔔 Alerts” on TradingView.
Set condition to this script.
Choose “ORB Breakout Up” or “ORB Breakout Down”.
Choose alert frequency and notification method.
⚠️ DISCLAIMER
ChartsAlgo tools are for informational and educational purposes only.
They are not financial advice or signals. Past performance does not guarantee future results. Use at your own risk and always implement solid risk management.
By using this indicator, you agree that you are solely responsible for any trades or decisions made based on the information provided.
X HL QA market structure tool designed to frame price action within a defined context of prior session dynamics. It accomplishes this by anchoring a set of reference levels to the high, low, and open prices of a user-specified higher timeframe (e.g., 4H, 1D, etc.) and projecting those levels onto the current chart for ongoing analysis.
At its core, the indicator establishes a reference range—derived from the previous completed instance of the selected timeframe—and overlays this on the current timeframe. This range serves as a foundational structure for price interpretation in the current session.
Building upon this framework, the script constructs a set of symmetrical quadrants (or deviation zones) both inside and outside of the prior range. These include:
The midpoint (EQ) of the prior range
Levels at ±0.25x, ±0.75x, ±1.0x, ±1.5x, and ±2.0x the range height
These levels act as contextual zones that traders can use to interpret price behavior—whether it's consolidating within the prior range, approaching fair value (EQ), or expanding into directional continuation or reversal zones beyond the range.
The script operates in both real-time and historical contexts. On live bars, it dynamically updates the key levels to provide an evolving view of current price positioning. Simultaneously, it supports the display of historical levels for past sessions, enabling robust backtesting and comparative analysis of price behavior relative to previous quadrant structures.
Ultimately, this tool serves as a positional map, helping traders assess where price is trading relative to significant levels from the prior session, offering insights into potential support/resistance, overextension, or mean reversion scenarios.
Key Technical Features
Multi-Timeframe Support:
request.security() is used to pull data from a user-defined higher timeframe regardless of the current chart interval.
Visual Flexibility:
Toggle between "line" and "channel" mode.
Line color, width, and visibility are all user-controlled.
Anchoring Options:
Deviation levels can be calculated from either the previous period's open or its EQ (midpoint), giving flexibility depending on analytical preference.
Efficient Labeling:
Labels are only rendered on the last bar and are automatically cleared and redrawn to prevent duplication.
Label style, size, text color, and background color are all user-configurable.
Trading Application
This indicator is especially suited for:
1. Mean Reversion Strategies
When price moves beyond +1.0 or +1.5 deviations from the EQ or open, it may signal overextension and a potential snap back to the midpoint or range.
2. Breakout Confirmation
Sustained price action beyond ±1.0 levels may indicate trend strength or continuation beyond historical balance zones.
3. Contextual Range Awareness
EQ and Open provide structure from which traders can judge whether price is in a state of balance or imbalance.
Labels offer at-a-glance interpretation of key levels across any chosen timeframe.
4. Fractal and Multi-Session Analysis
Analysts can layer daily, weekly, and monthly versions of this indicator to observe confluence or divergence of higher timeframe structure.
Boomerang Trading Indicator# Boomerang News Trading Indicator
## Overview
The Boomerang Trading Indicator is designed to identify potential reversal opportunities following major economic news releases. This indicator analyzes the initial market reaction to news events and provides visual cues for potential counter-trend trading opportunities based on Fibonacci retracement levels.
## How It Works
### News Event Detection
- Automatically detects major news release times (NFP, CPI, FOMC, etc.)
- Analyzes the first significant price movement following news releases
- Requires minimum candle size threshold to filter out weak reactions
### First Move Analysis
The indicator employs multiple analytical methods to determine the initial market direction:
**Simple Analysis (High Confidence):**
- When the news candle has ≥70% body-to-total ratio, uses straightforward bullish/bearish classification
**Advanced Analysis (Complex Cases):**
- Volume-weighted direction analysis
- Momentum and wick pattern analysis
- Market structure and gap analysis
- Weighted voting system combining all methods
### Entry Signal Generation
Based on the "boomerang" concept where markets often reverse after initial news reactions:
**For Bullish First Moves (Price Up Initially):**
- Generates SHORT entry signals when price retraces to 1.25-1.5 Fibonacci levels
- Visual: Red triangles above price bars
**For Bearish First Moves (Price Down Initially):**
- Generates LONG entry signals when price retraces to -0.25 to -0.5 Fibonacci levels
- Visual: Green triangles below price bars
## Key Features
### Visual Elements
- **Fibonacci Levels**: Displays key retracement levels based on the initial reaction range
- **Entry Zones**: Clear visual marking of optimal entry areas
- **Direction Arrows**: Shows the initial market reaction direction
- **Target Levels**: Displays profit target zones at 50% and 100% retracement levels
### Information Panel
Real-time display showing:
- Current setup status
- First move direction and body percentage
- Recommended trade direction
- Key price levels (reaction high/low)
- Profit targets with historical success rates
### Alert System
- Pre-news warnings (customizable timing)
- News event notifications
- Setup activation alerts
- Entry signal notifications
### Success Tracking
- Visual "BOOM!" animations when targets are hit
- Target 1 (50% level): ~95% historical success rate
- Target 2 (Main target): ~80% historical success rate
## Configuration Options
### Time Settings
- News release hour and minute (customizable for different events)
- Pre-news alert timing
- Setup duration (default 60 bars after news)
### Fibonacci Levels
- Adjustable retracement percentages
- Customizable target levels
- Mid-level importance weighting
### Risk Management
- Minimum reaction candle size filter
- Maximum risk point setting
- Visual risk/reward display
### Display Options
- Toggle Fibonacci level visibility
- Toggle target level display
- Toggle animation effects
- Customizable alert preferences
## Applicable News Events
This indicator is designed for high-impact economic releases:
- Non-Farm Payrolls (NFP) - First Friday, 8:30 AM ET
- Consumer Price Index (CPI) - Monthly, 8:30 AM ET
- Producer Price Index (PPI) - Monthly, 8:30 AM ET
- Gross Domestic Product (GDP) - Quarterly, 8:30 AM ET
- FOMC Interest Rate Decisions - 8 times yearly, 2:00 PM ET
## Trading Strategy Framework
### Core Principle
Markets often overreact to news initially, then reverse toward more rational price levels. This "boomerang effect" creates short-term trading opportunities.
### Entry Strategy
1. Wait for significant initial reaction (>10 points minimum)
2. Identify the initial direction using multi-factor analysis
3. Trade opposite to the initial reaction when price reaches sweet spot zones
4. Use Fibonacci retracement levels as entry triggers
### Risk Management
- Always use appropriate position sizing
- Set stop losses beyond recent swing levels
- Consider market volatility and news importance
- Monitor for setup invalidation signals
## Important Notes
### Educational Purpose
This indicator is for educational and analytical purposes. Users should:
- Thoroughly test strategies in demo environments
- Understand the risks involved in news trading
- Consider market conditions and volatility
- Use proper risk management techniques
### Market Considerations
- High volatility during news events increases both opportunity and risk
- Spreads may widen significantly during news releases
- Different brokers may have varying execution conditions
- Economic calendar timing may vary between sources
### Limitations
- Past performance does not guarantee future results
- Market conditions can change, affecting strategy effectiveness
- News events may have unexpected outcomes affecting normal patterns
- Technical analysis should be combined with fundamental analysis
## Version Information
- Compatible with TradingView Pine Script v5
- Designed for 1-minute timeframe optimal performance
- Works on major forex pairs, indices, and commodities
- Regular updates based on market condition changes
---
**Disclaimer:** This indicator is provided for educational purposes only. Trading involves substantial risk and is not suitable for all investors. Past performance is not indicative of future results. Users should conduct their own research and consider their financial situation before making trading decisions.
unprofitable stratThe indicator is a comprehensive trend-following indicator for TradingView. It's designed to identify and trade in the direction of the market's primary trend while using a dynamic, volatility-based system for exits. It filters out counter-trend noise and provides a clear visual dashboard of market conditions.
Core Trading Strategy
The indicator's logic is based on a two-part confirmation system to ensure trades are only taken in favorable conditions.
Master Trend Filter: The indicator first determines the "master trend" by checking if the price is above or below a long-term (200-period) Exponential Moving Average (EMA). It will only look for BUY signals when the price is above this EMA (in a master bullish trend) and only look for SELL signals when the price is below it. This prevents fighting the main market current.
Entry Trigger: Once the master trend is confirmed, the indicator doesn't enter immediately. It waits for a secondary confirmation: a breakout above a recent swing high (for a BUY) or a breakdown below a recent swing low. This ensures that short-term momentum has aligned with the long-term trend before a signal is generated.
Dynamic Exit Strategy
Exits are not based on a fixed target. Instead, the indicator uses a professional-grade ATR-based Trailing Stop Loss.
This "smart" stop loss automatically trails behind a profitable trade. It moves up to lock in gains during a BUY trade but never moves down.
The distance of the stop from the price is determined by the Average True Range (ATR), meaning it gives the trade more room to breathe in volatile markets and tightens up to protect profits in calm markets.
An "EXIT" signal appears on the chart when the price finally pulls back and hits this trailing stop line.
Visual Features on the Chart
The indicator provides several visual aids to make the trading process clear and intuitive.
Custom-Plotted Candles: The indicator draws its own candlesticks that are colored based on the trade status:
Blue: An active BUY trade is in progress.
Purple: An active SELL trade is in progress.
Gray: The indicator is flat with no active trade.
Signal Labels: Clear "BUY", "SELL", and "EXIT" labels are plotted directly on the chart at the moment they occur.
Trailing Stop Line: A bright orange line appears and follows the price during a trade, showing you the exact level of your trailing stop loss.
Multi-Timeframe Table: An optional dashboard in the top-right corner displays the master trend status ("Bullish" or "Bearish") on the 1m, 5m, 15m, 1-hour, and 4-hour timeframes simultaneously.
Trend Background: An optional feature allows you to color the entire chart background light blue or purple to match the master trend direction.
NQ Hourly Edge (By Scalpr)📊 Hourly Edge (Lorden) - Statistical Trading Edge Indicator
Transform your NQ1! trading with data-driven hourly analysis and high-probability setups based on extensive backtesting.
🎯 What This Indicator Does
The Hourly Edge indicator identifies high-probability "return to open" scenarios during the New York trading session (8am-4pm ET) specifically for NQ1! (Nasdaq futures). When the current hour opens inside the previous hour's range and then sweeps the previous high or low, statistical data shows strong probabilities of price returning to the hourly open.
📈 Key Features
Statistical Edge Detection
Real-time sweep detection with tick-by-tick accuracy
Probability percentages based on extensive NQ1! backtesting data
Color-coded probability levels: Green (75%+), Yellow (51-74%), Red (<50%)
Status tracking: Waiting → Swept → Returned
Visual Trading Tools
Hourly/Custom interval lines with full customization
High/Low tracking with optional current hour hiding
Opening price reference lines
Configurable line styles, colors, and widths
Smart Session Management
NY timezone awareness (8am-4pm ET focus)
"Waiting for 8am" display outside trading hours
20-minute segment analysis for refined probability calculations
🔧 Customization Options
Timeframe Flexibility
Multiple preset intervals: 4H, 1H, 30m, 15m, 10m, 5m
Custom timeframe input (hours + minutes)
Works on any chart timeframe
Display Controls
Show/hide any line type independently
Moveable info box (4 corner positions)
Adjustable text sizes
Historical line limit (1-500 bars)
Line Styling
Individual color settings for each line type
Style options: Solid, Dashed, Dotted
Width control: 1, 2, or 3 pixels
📊 How to Use
Add to NQ1! charts during NY session hours
Watch for sweep notifications in the info box
Check probability percentages for trade confidence
Monitor return status for entry/exit timing
Use alerts for high-probability setups (75%+ edge)
⚡ Best Practices
Optimal timeframes: 1m-15m for entries, 1H for context
Focus on 75%+ probability setups for highest edge
Wait for "moved away from open" confirmation before expecting returns
Combine with your existing NQ1! strategy for enhanced timing
🎯 Perfect For
NQ1! scalpers seeking high-probability entries
Nasdaq day traders wanting statistical edge confirmation
Futures strategy developers incorporating hourly analysis
Risk managers looking for data-driven NQ1! setups