Machine Learning Key Levels [AlgoAlpha]🟠 OVERVIEW
This script plots Machine Learning Key Levels on your chart by detecting historical pivot points and grouping them using agglomerative clustering to highlight price levels with the most past reactions. It combines a pivot detection, hierarchical clustering logic, and an optional silhouette method to automatically select the optimal number of key levels, giving you an adaptive way to visualize price zones where activity concentrated over time.
🟠 CONCEPTS
Agglomerative clustering is a bottom-up method that starts by treating each pivot as its own cluster, then repeatedly merges the two closest clusters based on the average distance between their members until only the desired number of clusters remain. This process creates a hierarchy of groupings that can flexibly describe patterns in how price reacts around certain levels. This offers an advantage over K-means clustering, since the number of clusters does not need to be predefined. In this script, it uses an average linkage approach, where distance between clusters is computed as the average pairwise distance of all contained points.
The script finds pivot highs and lows over a set lookback period and saves them in a buffer controlled by the Pivot Memory setting. When there are at least two pivots, it groups them using agglomerative clustering: it starts with each pivot as its own group and keeps merging the closest pairs based on their average distance until the desired number of clusters is left. This number can be fixed or chosen automatically with the silhouette method, which checks how well each point fits in its cluster compared to others (higher scores mean cleaner separation). Once clustering finishes, the script takes the average price of each cluster to create key levels, sorts them, and draws horizontal lines with labels and colors showing their strength. A metrics table can also display details about the clusters to help you understand how the levels were calculated.
🟠 FEATURES
Agglomerative clustering engine with average linkage to merge pivots into level groups.
Dynamic lines showing each cluster’s price level for clarity.
Labels indicating level strength either as percent of all pivots or raw counts.
A metrics table displaying pivot count, cluster count, silhouette score, and cluster size data.
Optional silhouette-based auto-selection of cluster count to adaptively find the best fit.
🟠 USAGE
Add the indicator to any chart. Choose how far back to detect pivots using Pivot Length and set Pivot Memory to control how many are kept for clustering (more pivots give smoother levels but can slow performance). If you want the script to pick the number of levels automatically, enable Auto No. Levels ; otherwise, set Number of Levels . The colored horizontal lines represent the calculated key levels, and circles show where pivots occurred colored by which cluster they belong to. The labels beside each level indicate its strength, so you can see which levels are supported by more pivots. If Show Metrics Table is enabled, you will see statistics about the clustering in the corner you selected. Use this tool to spot areas where price often reacts and to plan entries or exits around levels that have been significant over time. Adjust settings to better match volatility and history depth of your instrument.
Statistics
Forex Monday RangeForex Monday Range. Refers to the price range (high to low) established during Monday's trading session, typically measured from midnight Sunday to midnight Monday (New York time).
BANKNIFTY Contribution Table [GSK-VIZAG-AP-INDIA]1. Overview
This indicator provides a real-time visual contribution table of the 12 constituent stocks in the BANKNIFTY index. It displays key metrics for each stock that help traders quickly understand how each component is impacting the index at any given moment.
2. Purpose / Trading Use Case
The tool is designed for intraday and short-term traders who rely on index movement and its internal strength or weakness. By seeing which stocks are contributing positively or negatively, traders can:
Confirm trend strength or divergence within the index.
Identify whether a BANKNIFTY move is broad-based or driven by a few heavyweights.
Detect reversals when individual components decouple from index direction.
3. Key Features and Logic
Live LTP: Current price of each BANKNIFTY stock.
Price Change: Difference between current LTP and previous day’s close.
% Change: Percentage move from previous close.
Weight %: Static weight of each stock within the BANKNIFTY index (user-defined).
This estimates how much each stock contributes to the BANKNIFTY’s point change.
Sorted View: The stocks are sorted by their weight (descending), so high-impact movers are always at the top.
4. User Inputs / Settings
Table Position (tableLocationOpt):
Choose where the table appears on the chart:
top_left, top_right, bottom_left, or bottom_right.
This helps position the table away from your price action or indicators.
5. Visual and Plotting Elements
Table Layout: 6 columns
Stock | Contribution | Weight % | LTP | Change | % Change
Color Coding:
Green/red for positive/negative price changes and contributions.
Alternating background rows for better visibility.
BANKNIFTY row is highlighted separately at the top.
Text & Background Colors are chosen for both readability and direction indication.
6. Tips for Effective Use
Use this table on 1-minute or 5-minute intraday charts to see near real-time market structure.
Watch for:
A few heavyweight stocks pulling the index alone (can signal weak internal breadth).
Broad green/red across all rows (signals strong directional momentum).
Combine this with price action or volume-based strategies for confirmation.
Best used during market hours for live updates.
7. What Makes It Unique
Unlike other contribution tables that show only static data or require paid feeds, this script:
Updates in real time.
Uses dynamic calculated contributions.
Places BANKNIFTY at the top and presents the entire internal structure clearly.
Doesn’t repaint or rely on lagging indicators.
8. Alerts / Additional Features
No alerts are added in this version.
(Optional: Alerts can be added to notify when a certain stock contributes above/below a threshold.)
9. Technical Concepts Used
request.security() to pull both 1-minute and daily close data.
Conditional color formatting based on price change direction.
Dynamic table rendering using table.new() and table.cell().
Static weights assigned manually for BANKNIFTY stocks (can be updated if index weights change).
10. Disclaimer
This script is intended for educational and informational purposes only. It does not constitute financial advice or a buy/sell recommendation.
Users should test and validate the tool on paper or demo accounts before applying it to live trading.
📌 Note: Due to internet connectivity, data delays, or broker feeds, real-time values (LTP, change, contribution, etc.) may slightly differ from other platforms or terminals. Use this indicator as a supportive visual tool, not a sole decision-maker.
Script Title: BANKNIFTY Contribution Table -
Author: GSK-VIZAG-AP-INDIA
Version: Final Public Release
GER40 Opening Range Breakout (Advanced)🔥 GER40 (DAX40) Opening Range Breakout Strategy
📌 Overview:
This strategy takes advantage of the high volatility and liquidity during the Frankfurt and London session openings (8:00–10:00 CET). It’s especially suitable for day traders who want to capitalize on early momentum.
✅ Strategy Steps:
1. Mark the Opening Range (08:00–08:15 CET)
Wait for the first 15 minutes after the Frankfurt open (08:00 CET).
Draw horizontal lines at the high and low of this range.
2. Entry Rules:
Buy when price breaks above the opening range high with strong volume.
Sell (short) when price breaks below the opening range low with strong volume.
3. Confirmation (optional but helpful):
Use a momentum indicator like RSI (above 50 for long, below 50 for short) or MACD crossing above/below the signal line.
Look for volume spike at breakout for validation.
4. Stop-Loss:
Set just below the range low (for long) or above the range high (for short).
Or use a fixed pip/point stop-loss like 15–25 points depending on current volatility.
5. Take Profit / Exit:
1:1.5 to 1:2 Risk/Reward Ratio.
Or scale out at fixed points (e.g., +20, +40).
Or trail stop after price moves in favor by +20 points.
📊 Additional Filters to Improve Accuracy:
Check macroeconomic calendar (avoid entering during red news like ECB, German CPI, etc.).
Use VWAP as a dynamic support/resistance for bias direction.
Use 5-min or 15-min charts for better signal clarity.
📈 Example:
Let’s say the DAX opens at 08:00 CET, and by 08:15, the high is 18,000 and the low is 17,950.
If price breaks above 18,000 with volume and RSI > 50, enter long.
Place stop at 17,950 or slightly below.
Take profit at 18,030–18,050 or trail stop.
🧠 Pro Tips:
GER40 is highly volatile, so ensure your risk per trade is small (e.g., 1% or less).
Avoid trading around major news (ECB rate decisions, German GDP, etc.).
Best sessions for GER40: Frankfurt Open (08:00 CET) and London Open (09:00 CET).
Gabriel's MPT Moving Average RibbonGabriel's MPT Moving Average Ribbon is a cutting-edge, risk-adjusted technical analysis tool that fuses Modern Portfolio Theory (MPT) with adaptive moving average logic to dynamically guide market participants through bullish and bearish conditions.
This ribbon is not a simple MA crossover — it leverages Sharpe Ratio, Sortino Ratio, Omega Ratio, and Value at Risk (VaR) to scale and smooth each moving average using real-time probabilistic efficiency metrics. Combined, these elements create a volatility-weighted, risk-optimized visualization of market structure.
🔍 Core Features:
Multi-Ratio Adaptive Scaling: Moving averages are dynamically weighted by Omega Ratio, Sortino Stdev, Sharpe Winrate, and VaR conditions for smarter price tracking.
Volatility Engine: Supports multiple return models:
Close-to-Close
Parkinson
Garman-Klass
Rogers–Satchell
Yang–Zhang (default for highest accuracy)
Smart Ribbon Construction:
Blends 3 different MA types per ribbon (e.g., SMA, EMA, WMA) for each of the 4 ribbons
Supports WMA-style dynamic weighting using MPT-derived ratios
Sharpe Winrate Estimation: Uses CDF logic to project the probability of success given current Sharpe ratio.
Dynamic Risk Phase Detection (VaR):
Identifies Risk On, Risk Off, or Neutral states using a triple-model composite VaR framework.
🛎️ Alerts Included:
📈 Bullish Crossover Alert: MA #1 crossing above MA #2 with all ribbons aligned upward.
📉 Bearish Crossunder Alert: MA #1 crossing below MA #2 with all ribbons aligned downward.
📊 Omega Ratio Alert: Triggered when Omega exceeds 1 (profitable risk-adjusted reward).
⚠️ Omega Caution Alert: Triggered when Omega drops below 1.
🟢 Risk On Alert: Market enters a favorable, low-risk zone. Deep Value Zone for Long-Term Investing.
🔴 Risk Off Alert: Market enters a cautionary, high-risk phase.
🎯 Use Cases:
Trend Identification: MA ribbon alignment indicates momentum phases.
Risk-Tuned Entries/Exits: Combine ribbon crossovers with VaR/Ratio signals for confirmation.
Institutional Strategy Overlay: Ideal for portfolio managers integrating risk-adjusted technical overlays.
🧠 Pro Tips:
Use "Complete" mode for the most robust risk signal, as it blends Historical, EWMA, and Variance-Covariance ratios.
Customize each MA’s type and length to match your trading horizon (e.g., intraday, swing).
Toggle Ratios Weighted MA for adaptive weighting when market risk fluctuates.
It's set to the settings I use to trade, from MA settings to MPT table. It goes in order: Sharpe Est. Winrate, Deviation of Sortino, Omega Ratio (1 Year), and the Ideal position size according to VaR.
Frahm Factor Position Size CalculatorThe Frahm Factor Position Size Calculator is a powerful evolution of the original Frahm Factor script, leveraging its volatility analysis to dynamically adjust trading risk. This Pine Script for TradingView uses the Frahm Factor’s volatility score (1-10) to set risk percentages (1.75% to 5%) for both Margin-Based and Equity-Based position sizing. A compact table on the main chart displays Risk per Trade, Frahm Factor, and Average Candle Size, making it an essential tool for traders aligning risk with market conditions.
Calculates a volatility score (1-10) using true range percentile rank over a customizable look-back window (default 24 hours).
Dynamically sets risk percentage based on volatility:
Low volatility (score ≤ 3): 5% risk for bolder trades.
High volatility (score ≥ 8): 1.75% risk for caution.
Medium volatility (score 4-7): Smoothly interpolated (e.g., 4 → 4.3%, 5 → 3.6%).
Adjustable sensitivity via Frahm Scale Multiplier (default 9) for tailored volatility response.
Position Sizing:
Margin-Based: Risk as a percentage of total margin (e.g., $175 for 1.75% of $10,000 at high volatility).
Equity-Based: Risk as a percentage of (equity - minimum balance) (e.g., $175 for 1.75% of ($15,000 - $5,000)).
Compact 1-3 row table shows:
Risk per Trade with Frahm score (e.g., “$175.00 (Frahm: 8)”).
Frahm Factor (e.g., “Frahm Factor: 8”).
Average Candle Size (e.g., “Avg Candle: 50 t”).
Toggles to show/hide Frahm Factor and Average Candle Size rows, with no empty backgrounds.
Four sizes: XL (18x7, large text), L (13x6, normal), M (9x5, small, default), S (8x4, tiny).
Repositionable (9 positions, default: top-right).
Customizable cell color, text color, and transparency.
Set Frahm Factor:
Frahm Window (hrs): Pick how far back to measure volatility (e.g., 24 hours). Shorter for fast markets, longer for chill ones.
Frahm Scale Multiplier: Set sensitivity (1-10, default 9). Higher makes the score jumpier; lower smooths it out.
Set Margin-Based:
Total Margin: Enter your account balance (e.g., $10,000). Risk auto-adjusts via Frahm Factor.
Set Equity-Based:
Total Equity: Enter your total account balance (e.g., $15,000).
Minimum Balance: Set to the lowest your account can go before liquidation (e.g., $5,000). Risk is based on the difference, auto-adjusted by Frahm Factor.
Customize Display:
Calculation Method: Pick Margin-Based or Equity-Based.
Table Position: Choose where the table sits (e.g., top_right).
Table Size: Select XL, L, M, or S (default M, small text).
Table Cell Color: Set background color (default blue).
Table Text Color: Set text color (default white).
Table Cell Transparency: Adjust transparency (0 = solid, 100 = invisible, default 80).
Show Frahm Factor & Show Avg Candle Size: Check to show these rows, uncheck to hide (default on).
Mean Amplitude (300 candles)Displays the average candle amplitude (volatility) as % over a selected period. Useful for gauging market activity compression or expansion.
RAHA Strategy - Short
Roni's Adjusted Hybrid Average – a formula developed by Aharon Roni Pesach.
What is RAHA?
This is an adjusted hybrid average that gives different weight to outliers:
The extreme values (particularly high or low) receive a lower weight.
The calculation is based on the standard deviation and average of the data.
This results in a more sensitive but stable average that does not ignore outliers – but rather considers them in proportion.
The RAHA Short Strategy identifies a negative trend and enters when clear technical conditions are met, such as a downward slope of RAHA 40, RAHA 10 crossing below RAHA 20, and the absence of a sequence of 3 red candles.
Entry is also made in the exceptional case of a red candle above the Bollinger Band.
The position size is determined by 1% of the capital divided by the stop.
The exit is carried out by a stop above the high, or under additional conditions below the profit target (TP).
אסטרטגיית השורט RAHA מבוססת על נוסחת ממוצע ייחודית בשם RAHA – ראשי תיבות של:
Roni's Adjusted Hybrid Average – נוסחה שפיתח אהרון רוני פסח.
מהו RAHA?
מדובר בממוצע היברידי מתואם המעניק משקל שונה לנתונים חריגים:
הערכים הקיצוניים (גבוהים או נמוכים במיוחד) מקבלים משקל נמוך יותר.
החישוב מבוסס על סטיית התקן והממוצע של הנתונים.
כך מתקבל ממוצע רגיש אך יציב יותר, שאינו מתעלם מהחריגים – אלא מתחשב בהם בפרופורציה.
אסטרטגיית השורט RAHA מזהה מגמה שלילית ומבצעת כניסה כשמתקיימים תנאים טכניים ברורים, כמו שיפוע יורד של RAHA 40, חציית RAHA 10 מתחת ל‑RAHA 20, והיעדר רצף של 3 נרות אדומים.
הכניסה מבוצעת גם במקרה חריג של נר אדום מעל רצועת בולינגר.
גודל הפוזיציה נקבע לפי 1% מההון חלקי הסטופ.
היציאה מבוצעת לפי סטופ מעל הגבוה, או בתנאים נוספים מתחת ליעד הרווח (TP).
✅ SMA20 Trend Table -(MAJOAK)Trend table of Bullish or Bearish to the SMA 20. Displays 1 Day, 1Hr, 15 Min and 5 min.
Liquidity Break Probability [PhenLabs]📊 Liquidity Break Probability
Version: PineScript™ v6
The Liquidity Break Probability indicator revolutionizes how traders approach liquidity levels by providing real-time probability calculations for level breaks. This advanced indicator combines sophisticated market analysis with machine learning inspired probability models to predict the likelihood of high/low breaks before they happen.
Unlike traditional liquidity indicators that simply draw lines, LBP analyzes market structure, volume profiles, momentum, volatility, and sentiment to generate dynamic break probabilities ranging from 5% to 95%. This gives traders unprecedented insight into which levels are most likely to hold or break, enabling more confident trading decisions.
🚀 Points of Innovation
Advanced 6-factor probability model weighing market structure, volatility, volume, momentum, patterns, and sentiment
Real-time probability updates that adjust as market conditions change
Intelligent trading style presets (Scalping, Day Trading, Swing Trading) with optimized parameters
Dynamic color-coded probability labels showing break likelihood percentages
Professional tiered input system - from quick setup to expert-level customization
Smart volume filtering that only highlights levels with significant institutional interest
🔧 Core Components
Market Structure Analysis: Evaluates trend alignment, level strength, and momentum buildup using EMA crossovers and price action
Volatility Engine: Incorporates ATR expansion, Bollinger Band positioning, and price distance calculations
Volume Profile System: Analyzes current volume strength, smart money proxies, and level creation volume ratios
Momentum Calculator: Combines RSI positioning, MACD strength, and momentum divergence detection
Pattern Recognition: Identifies reversal patterns (doji, hammer, engulfing) near key levels
Sentiment Analysis: Processes fear/greed indicators and market breadth measurements
🔥 Key Features
Dynamic Probability Labels: Real-time percentage displays showing break probability with color coding (red >70%, orange >50%, white <50%)
Trading Style Optimization: One-click presets automatically configure sensitivity and parameters for your trading timeframe
Professional Dashboard: Live market state monitoring with nearest level tracking and active level counts
Smart Alert System: Customizable proximity alerts and high-probability break notifications
Advanced Level Management: Intelligent line cleanup and historical analysis options
Volume-Validated Levels: Only displays levels backed by significant volume for institutional-grade analysis
🎨 Visualization
Recent Low Lines: Red lines marking validated support levels with probability percentages
Recent High Lines: Blue lines showing resistance zones with break likelihood indicators
Probability Labels: Color-coded percentage labels that update in real-time
Professional Dashboard: Customizable panel showing market state, active levels, and current price
Clean Display Modes: Toggle between active-only view for clean charts or historical view for analysis
📖 Usage Guidelines
Quick Setup
Trading Style Preset
Default: Day Trading
Options: Scalping, Day Trading, Swing Trading, Custom
Description: Automatically optimizes all parameters for your preferred trading timeframe and style
Show Break Probability %
Default: True
Description: Displays percentage labels next to each level showing break probability
Line Display
Default: Active Only
Options: Active Only, All Levels
Description: Choose between clean active-only view or comprehensive historical analysis
Level Detection Settings
Level Sensitivity
Default: 5
Range: 1-20
Description: Lower values show more levels (sensitive), higher values show fewer levels (selective)
Volume Filter Strength
Default: 2.0
Range: 0.5-5.0
Description: Controls minimum volume threshold for level validation
Advanced Probability Model
Market Trend Influence
Default: 25%
Range: 0-50%
Description: Weight given to overall market trend in probability calculations
Volume Influence
Default: 20%
Range: 0-50%
Description: Impact of volume analysis on break probability
✅ Best Use Cases
Identifying high-probability breakout setups before they occur
Determining optimal entry and exit points near key levels
Risk management through probability-based position sizing
Confluence trading when multiple high-probability levels align
Scalping opportunities at levels with low break probability
Swing trading setups using high-probability level breaks
⚠️ Limitations
Probability calculations are estimations based on historical patterns and current market conditions
High-probability setups do not guarantee successful trades - risk management is essential
Performance may vary significantly across different market conditions and asset classes
Requires understanding of support/resistance concepts and probability-based trading
Best used in conjunction with other analysis methods and proper risk management
💡 What Makes This Unique
Probability-Based Approach: First indicator to provide quantitative break probabilities rather than simple S/R lines
Multi-Factor Analysis: Combines 6 different market factors into a comprehensive probability model
Adaptive Intelligence: Probabilities update in real-time as market conditions change
Professional Interface: Tiered input system from beginner-friendly to expert-level customization
Institutional-Grade Filtering: Volume validation ensures only significant levels are displayed
🔬 How It Works
1. Level Detection:
Identifies pivot highs and lows using configurable sensitivity settings
Validates levels with volume analysis to ensure institutional significance
2. Probability Calculation:
Analyzes 6 key market factors: structure, volatility, volume, momentum, patterns, sentiment
Applies weighted scoring system based on user-defined factor importance
Generates probability score from 5% to 95% for each level
3. Real-Time Updates:
Continuously monitors price action and market conditions
Updates probability calculations as new data becomes available
Adjusts for level touches and changing market dynamics
💡 Note: This indicator works best on timeframes from 1-minute to 4-hour charts. For optimal results, combine with proper risk management and consider multiple timeframe analysis. The probability calculations are most accurate in trending markets with normal to high volatility conditions.
Logarithmic Moving Average (LMA) [QuantAlgo]🟢 Overview
The Logarithmic Moving Average (LMA) uses advanced logarithmic weighting to create a dynamic trend-following indicator that prioritizes recent price action while maintaining statistical significance. Unlike traditional moving averages that use linear or exponential weights, this indicator employs logarithmic decay functions to create a more sophisticated price averaging system that adapts to market volatility and momentum conditions.
The indicator displays a smoothed signal line that oscillates around zero, with positive values indicating bullish momentum and negative values indicating bearish momentum. The signal incorporates trend quality assessment, momentum confirmation, and multiple filtering mechanisms to help traders and investors identify trend continuation and reversal opportunities across different timeframes and asset classes.
🟢 How It Works
The indicator's core innovation lies in its logarithmic weighting system, where weights are calculated using the formula: w = 1.0 / math.pow(math.log(i + steepness), 2) The steepness parameter controls how aggressively recent data is prioritized over historical data, creating a dynamic weight decay that can be fine-tuned for different trading styles. This logarithmic approach provides more nuanced weight distribution compared to exponential moving averages, offering better responsiveness while maintaining stability.
The LMA calculation combines multiple sophisticated components. First, it calculates the logarithmic weighted average of closing prices. Then it measures the slope of this average over a 10-period lookback: lmaSlope = (lma - lma ) / lma * 100 The system also incorporates trend quality assessment using R-squared correlation analysis of log-transformed prices, measuring how well the price data fits a linear trend model over the specified period.
The final signal generation uses the formula: signal = lmaSlope * (0.5 + rSquared * 0.5) which combines the LMA slope with trend quality weighting. When momentum confirmation is enabled, the indicator calculates annualized log-return momentum and applies a multiplier when the momentum direction aligns with the signal direction, strengthening confirmed signals while filtering out weak or counter-trend movements.
🟢 How to Use
1. Signal Interpretation and Threshold Zones
Positive Values (Above Zero): LMA slope indicating bullish momentum with upward price trajectory relative to logarithmic baseline
Negative Values (Below Zero): LMA slope indicating bearish momentum with downward price trajectory relative to logarithmic baseline
Zero Line Crosses: Signal transitions between bullish and bearish regimes, indicating potential trend changes
Long Entry Threshold Zone: Area above positive threshold (default 0.5) indicating confirmed bullish signals suitable for long positions
Short Entry Threshold Zone: Area below negative threshold (default -0.5) indicating confirmed bearish signals suitable for short positions
Extreme Values: Signals exceeding ±1.0 represent strong momentum conditions with higher probability of continuation
2. Momentum Confirmation and Visual Analysis
Signal Color Intensity: Gradient coloring shows signal strength, with brighter colors indicating stronger momentum
Bar Coloring: Optional price bar coloring matches signal direction for quick visual trend identification
Position Labels: Real-time position classification (Bullish/Bearish/Neutral) displayed on the latest bar
Momentum Weight Factor: When short-term log-return momentum aligns with LMA signal direction, the signal receives additional weight confirmation
Trend Quality Component: R-squared values weight the signal strength, with higher correlation indicating more reliable trend conditions
3. Examples: Preconfigured Settings
Default: Universally applicable configuration balanced for medium-term investing and general trading across multiple timeframes and asset classes.
Scalping: Highly responsive setup with shorter period and higher steepness for ultra-short-term trades on 1-15 minute charts, optimized for quick momentum shifts.
Swing Trading: Extended period with moderate steepness and increased smoothing for multi-day positions, designed to filter noise while capturing larger price swings on 1-4 hour and daily charts.
Trend Following: Maximum smoothing with lower steepness for established trend identification, generating fewer but more reliable signals optimal for daily and weekly timeframes.
Mean Reversion: Shorter period with high steepness for counter-trend strategies, more sensitive to extreme moves and reversal opportunities in ranging market conditions.
Avg daily rangeThe Average Daily Range (ADR) is a technical indicator that measures the average price movement of a financial instrument over a specific period.
Price Reaction Analysis by Day of WeekOverview
The "Price Reaction Analysis by Day of Week" indicator is a tool that enables traders to analyze historical price reaction patterns to technical indicator signals on a selected day of the week. It examines price behavior on a chosen candle (from 1 to 30) in the next day or subsequent days after a signal, depending on the timeframe, and provides success rate statistics to support data-driven trading decisions. The indicator is optimized for timeframes up to 1 day (e.g., 1D, 12H, 8H, 6H, 4H, 1H, 15M), as the analysis relies on day-of-week comparisons. Lower timeframes generate more signals due to the higher number of candles per day.
Key Features
1. Flexible Technical Indicator Selection
Users can choose one of four technical indicators: RSI, SMI, MA, or Bollinger Bands. Each indicator has configurable parameters, such as:
RSI length, oversold/overbought levels.
SMI length, %K and %D smoothing, signal levels.
MA length.
Bollinger Bands length and multiplier.
2. Day-of-Week Analysis
The indicator allows users to select a day of the week (Monday, Tuesday, Wednesday, Thursday, Friday) for generating signals. It analyzes price reactions on a selected candle (from 1 to 30) in the next day or subsequent days after the signal. Examples:
On a daily timeframe, a signal on Monday can be analyzed for the first, fourth, or later candle (up to 30) in subsequent days (e.g., Tuesday, Wednesday).
On timeframes lower than 1 day (e.g., 12H, 8H, 6H, 4H, 1H, 15M), the analysis targets the selected candle in the next day or subsequent days. For example, on a 4H timeframe, you can analyze the second Tuesday candle following a Monday signal. The maximum timeframe is 1 day to ensure consistent day-of-week analysis.
3. Visual Signals
Signals for the analysis period are marked with background highlights in real-time when the indicator’s conditions are met. The last highlighted candle of the selected day is always analyzed. Arrows are displayed on the chart at the candle specified by the “Candles to Compare” setting (e.g., the first candle if set to 1):
Green upward triangles (below the candle) for successful buy signals (the closing price of the selected candle is higher than the signal candle’s close).
Red downward triangles (above the candle) for successful sell signals (the closing price of the selected candle is lower than the signal candle’s close).
Gray “x” marks for unsuccessful signals (no price reversal in the expected direction). Arrow positions are intuitive: buy signals below the candle, sell signals above. Highlights and arrows do not require waiting for future signals but are essential for calculating statistics.
Note: The first candle of the next day may appear shifted on the chart due to timezone differences, which can affect the timing of signal appearance.
4. Signal Conditions (Highlights) for Each Indicator
RSI: The oscillator is in oversold (buy) or overbought (sell) zones.
SMI: SMI returns from oversold (buy) or overbought (sell) zones.
MA: Price crosses the MA (upward for buy, downward for sell).
Bollinger Bands: Price returns inside the bands (from below for buy, from above for sell).
5. Success Rate Statistics
A table in the top-right corner of the chart displays:
The number of buy and sell signals for the selected day of the week.
The percentage of cases where the price of the selected candle in the next day or subsequent days reversed as expected (e.g., rising after a buy signal). Statistics are based on comparing the closing price of the signal candle with the closing price of the selected candle (e.g., first, fourth) in the next day or subsequent days.
Important: Statistics do not account for price movements within the candle or after its close. The price on the selected candle (e.g., fourth) may be lower than earlier candles but still higher than the signal candle, counting as a positive buy signal, though it does not guarantee profit.
6. Date Range
Users can specify the analysis date range, enabling strategy testing on historical data from a chosen period. Ensure the start and end dates are set correctly.
Applications
The indicator is designed for traders who want to leverage historical patterns for position planning. Examples:
On a 4-hour timeframe: If a sell signal highlight appears on Monday and statistics show an 80% chance that the fourth Tuesday candle is bearish, traders may consider playing a correction at the open of that candle.
On a daily timeframe: If a highlight indicates market overheating, traders may consider entering a position at the open of the first candle after the signal (e.g., Tuesday), provided statistics suggest an edge. Users can analyze the signal on the first candle and check later candles to validate results, increasing confidence in consistent patterns.
Key Settings
Indicator Type: Choose between RSI, SMI, MA, or Bollinger Bands.
Selected Day: Monday, Tuesday, Wednesday, Thursday, or Friday.
Candles to Compare: The number of the candle in the next day or subsequent days (from 1 to 30).
Indicator Parameters: Lengths, levels (e.g., oversold/overbought for RSI).
Background Colors: Configurable highlights for buy and sell signals.
Notes
Timeframes: The indicator is optimized for timeframes up to 1 day (e.g., 1D, 12H, 8H, 6H, 4H, 1H, 15M), as the analysis relies on day-of-week patterns. Timeframes lower than 1 day generate more signals due to the higher number of candles per day.
Candle Shift: The first candle of the next day may appear shifted on the chart due to timezone differences, affecting the timing of signals across markets or platforms.
Statistical Limitations: Results are based on the closing prices of the selected candle, ignoring fluctuations in earlier candles, within the candle, or subsequent price movements. Traders must assess whether entering at the open or after the close of the selected candle is profitable.
Testing: Effectiveness depends on historical data and parameter settings. Testing different configurations across markets and timeframes is recommended.
Who Is It For?
Swing and position traders who base decisions on technical analysis and historical patterns.
Market analysts seeking patterns in price behavior by day of the week.
TradingView users of all experience levels, thanks to an intuitive interface and flexible settings.
Automated ChecklistWeekly Bias (Auto / Bullish / Bearish)
Daily Bias (Auto / Bullish / Bearish)
PDH/L Taken (Auto / Yes / No)
🔁 Logic:
If input is Auto, use calculated values.
If Bullish, Bearish, or Yes/No selected, use the manual input.
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.
Close vs 50SMA % (Bars colored by 20SMA)This indicator plots the percentage difference between the Close price and the 50-period Simple Moving Average (SMA50), and colors each bar based on whether the Close is above or below the 20-period SMA (SMA20).
Trading Sessionsthis indicator labels asia, london, and new york sessions with accurate times for trading indexes like nq, es, or ym. It gives a range from the session lows to session highs which can be used to identify liquidity grabs and price action.
Micro Futures Contract Calculator Micro Futures Contract Calculator
Synopsis: The Micro Futures Contract Calculator is a sleek, minimalist indicator that calculates the number of Micro E-mini Nasdaq-100 (MNQ) or S&P 500 (MES) contracts you can trade based on a fixed dollar risk and stop-loss (in ticks). Displayed in a compact, professional table in the top-right corner, it shows your risk, stop-loss, contract type, and calculated contracts, helping traders maintain consistent risk management.
How to Use:
Add the indicator to your chart (search “Micro Futures Contract Calculator”).
In settings, input:
Maximum Risk ($): Your total risk per trade (e.g., $100).
Stop-Loss (Ticks): Stop-loss size in ticks (e.g., 20 ticks = 5 points).
Contract Type: Select MNQ or MES.
Check the top-right table for:
Risk, stop-loss, contract type, and number of contracts (e.g., “10” for MNQ, “4” for MES).
Use the contract number to size trades, ensuring risk stays fixed.
Why Standardized Risk is Important:
Consistency: Fixed risk per trade (e.g., $100) prevents oversized losses, stabilizing long-term performance.
Discipline: Removes emotional guesswork, enforcing a systematic approach across MNQ/MES trades.
Capital Protection: Limits exposure, preserving your account during losing streaks and volatile markets.
Scalability: Aligns position sizing with your risk tolerance, enabling confident scaling as your account grows.
This indicator simplifies risk management, making it essential for disciplined futures trading.
RATE OF CHANGE ROLLING INTEGRALAdded an integral balance to the ROC subchart.
just tracks the balance of area back to the ROC length.
OI Bahavior MapThis indicator visualizes Open Interest (OI) changes for Binance Futures and highlights the behavior of market participants — whether takers or makers are opening or closing positions.
📊 Supported display modes:
• Taker or Maker
• Longs or Shorts
• Cumulative or Per-Bar
• Displayed in USD or Coins
💡 Each candle color reflects the dominant trade direction (delta):
🟢 Green = Aggressive buying (Delta Buy)
🔴 Red = Aggressive selling (Delta Sell)
OI direction (↑/↓) determines whether positions are being opened or closed.
🛠️ Optional metrics:
• Moving average of OI (SMA, EMA, WMA, VWMA, LSMA)
• Volatility channels (Bollinger Bands or Extremums)
⚙️ How it works:
• Fetches OI data from the SYMBOL_OI ticker (e.g., BTCUSDT_OI)
• Compares current OI with the previous bar
• Uses signed volume delta (close - open) to infer intent
• Classifies bar as open/close, long/short, taker/maker
• Displays the net effect as a colored candle on a secondary chart
🤔 How to interpret Taker and Maker?
• Taker: The aggressive participant who removes liquidity (initiates the trade)
• Maker: The passive participant who provides liquidity (places resting orders)
You can choose to display the same event from either the Taker or Maker perspective — the chart will look the same, but the interpretation changes.
🧠 Core Logic Mapping
```
🟢 Green: Taker Longs (Buy, OI↑) | Maker Shorts (Buy, OI↓)
🔴 Red: Taker Shorts (Sell, OI↑) | Maker Longs (Sell, OI↓)
```
⚠️ Limitations:
• Works only for Binance Futures
• Requires existence of SYMBOL_OI ticker on TradingView
• Represents approximate intent based on OI + volume behavior
💬 Open Source
The script is open for the community. Suggestions and feedback are welcome in the comments!
__________________________________________________________________________________
Этот индикатор визуализирует изменения открытого интереса (OI) для Binance Futures и показывает поведение участников рынка — открывают или закрывают позиции тейкеры или мейкеры.
📊 Доступные режимы отображения:
• Taker или Maker
• Longs или Shorts
• Кумулятивный или по бару
• В USD или в монетах
💡 Каждый цвет свечи отражает преобладающее направление сделок (дельта):
🟢 Зеленый = Агрессивные покупки (Delta Buy)
🔴 Красный = Агрессивные продажи (Delta Sell)
Направление OI (↑/↓) показывает, открываются или закрываются позиции.
🛠️ Дополнительные метрики:
• Скользящая средняя OI (SMA, EMA, WMA, VWMA, LSMA)
• Волатильностные каналы (Bollinger Bands или экстремумы)
⚙️ Как работает:
• Получает данные OI из тикера SYMBOL_OI (например, BTCUSDT_OI)
• Сравнивает текущий OI с предыдущим баром
• Использует направленную дельту объема (close - open) для определения намерения
• Классифицирует бар как открытие/закрытие, лонг/шорт, тейкер/мейкер
• Отображает итог в виде цветной свечи на дополнительном графике
🤔 Как интерпретировать Taker и Maker?
• Taker: Агрессивный участник, который изымает ликвидность (инициирует сделку)
• Maker: Пассивный участник, который создает ликвидность (выставляет лимитные заявки)
Вы можете выбрать отображение события с позиции тейкера или мейкера — график будет одинаковым, но смысл меняется.
🧠 Схема логики
```
🟢 Зеленый: Taker Longs (Покупка, OI↑) | Maker Shorts (Покупка, OI↓)
🔴 Красный: Taker Shorts (Продажа, OI↑) | Maker Longs (Продажа, OI↓)
```
⚠️ Ограничения:
• Работает только для Binance Futures
• Требуется наличие тикера SYMBOL_OI на TradingView
• Показывает приблизительное намерение на основе OI и дельты объема
💬 Open Source
Скрипт открыт для сообщества. Предложения и обратная связь приветствуются в комментариях!