Volume Weighted Average Pricehelps my strategy and allows my trades to hit tp allowing me to gain profit
Indicators and strategies
BARTRADINGPREDV4Please note, that all of the indicators on the chart are working together. I am showing all of the indicators so that you might see the benefits of these indicators working as one. Do your own research. Trade smart. I code tools not advice. So please make decisions based on your trading style and knowledge. Use my scripts freely but please note they are protected by Mozilla.
Script Summary: BARTRADINGPREDV4
This Pine Script indicator is a comprehensive trading tool that overlays on your TradingView chart. It combines moving averages, regression channels, volume analysis, RSI filtering, and pattern recognition to assist in making trading decisions. It also provides a forward-looking projection to help anticipate future price movement.
Key Features & Logic
1. Moving Averages
HMA (High Moving Average): Simple moving average of the high price over a user-defined lookback period.
LMA (Low Moving Average): Simple moving average of the low price over the same period.
HLMA (High-Low Moving Average): The average of HMA and LMA, providing a midline reference.
2. RSI Filtering
Optionally enables a Relative Strength Index (RSI) filter to help avoid trades when the market is not trending strongly.
Only allows buy signals if RSI is above 50, and sell signals if RSI is below 50 (if enabled).
3. Signal Generation
BUY Signal: Triggered when HL2 (average of OHLC) crosses over LMA and (optionally) RSI > 50.
SELL Signal: Triggered when HL2 crosses under HMA and (optionally) RSI < 50.
XSB (Extra Strong Buy): HL2 crosses over HMA, is above HLMA, up volume is greater than down volume, and (optionally) RSI > 50.
XBS (Extra Strong Sell): HL2 crosses under LMA, is below HLMA, down volume is greater than up volume, and (optionally) RSI < 50.
Enable/Disable XSB/XBS: You can turn these signals on or off via script inputs.
4. Take Profit (TP) and Stop Loss (SL) Levels
TP and SL are dynamically calculated based on the difference between HMA and LMA, providing contextually relevant exit levels.
5. Regression Channel and Prediction
Linear Regression Line: Plots a regression line over the lookback period to show the underlying trend.
ATR Channel: Adds an upper and lower channel around the regression line using ATR (Average True Range) for a realistic prediction envelope.
Forward Projection: Projects the regression line forward by a user-defined number of bars, visually showing where the trend could extend if current momentum persists.
6. Pattern Recognition
Higher Highs/Lows and Lower Highs/Lows: Marks bars where new higher highs/lows or lower highs/lows are set, helping you spot trend continuation or reversal points.
7. Status Table
A table shows the current price’s relationship to HMA, HLMA, and LMA, color-coded for quick visual interpretation.
User Instructions
Inputs
Number of Lookback Bars: Sets the period for all moving averages and regression calculations.
Prediction Length: (Legacy; not used in current logic.)
TURN ON OR OFF XSB/XBS Signal: Toggle extra strong buy/sell signals.
Enable RSI Filter: Only allow signals when RSI is in the correct zone.
RSI Period: Sets the sensitivity of the RSI filter.
Table Position: Choose where the status table appears on your chart.
ATR Length & Multiplier: Control the width of the regression prediction channel.
Bars Forward (Projection): Number of bars to project the regression line into the future.
How to Use
Add the script to your TradingView chart.
Adjust inputs to suit your asset and timeframe.
Interpret signals:
BUY (B) and SELL (S): Appear as green/red labels below/above bars.
XSB (blue) and XBS (orange): Indicate extra strong buy/sell conditions.
HH/HL (green triangles): New higher highs/lows.
LH/LL (red triangles): New lower highs/lows.
Watch the regression channel: The yellow regression line shows the trend; the shaded band indicates expected volatility.
Check the projection: The dashed magenta line projects the regression trend forward, giving a visual target for price continuation.
Use the table: Quickly see if price is above or below each moving average.
Interpreting the Prediction Aspects
Regression Line & Channel
Regression Line (Yellow): Represents the best-fit line of price over the lookback period, showing overall trend direction.
ATR Channel: The upper and lower bands (yellow, semi-transparent) account for typical volatility, suggesting a range where price is likely to stay if the trend continues.
Forward Projection
Dashed Magenta Line: Projects the regression line forward by the specified number of bars, using the current slope. This is a trend continuation forecast—not a guarantee, but a statistically reasonable path if current conditions persist.
How to use: If price is respecting the regression trend and within the channel, the projection provides a visual target for where price might go in the near future.
TP/SL Levels
TP (Take Profit): Suggests a price target above the current HL2, based on recent volatility.
SL (Stop Loss): Suggests a protective stop below HL2.
Best Practices & Warnings
No indicator is perfect! Always combine signals with your own analysis and risk management.
Regression projection is not a crystal ball: It simply extends the current trend, which can and will change, especially after big news or at support/resistance.
Use on liquid, trending assets for best results.
Adjust lookback and ATR settings for your market and timeframe.
Summary Table Example
Price vs HMA vs HLMA vs LMA
43000 +100 +50 -20
Green: Price is above average (bullish).
Red: Price is below average (bearish).
Yellow: Price is very close to the average (neutral).
Final Notes
This script is designed to be a multi-tool for trend trading and prediction, combining classic and modern techniques. The forward projection helps visualize possible future price action, while signals and overlays keep you informed of trend shifts and trade opportunities.
Penguin Trend with RSI on Diff🐧 Penguin Trend with RSI on Diff
Overview
This is a modified version of the original "Penguin Trend" indicator. Instead of displaying the magnitude of volatility with a histogram, this version uses an RSI oscillator to analyze the "momentum of volatility".
The main goal is to help traders see whether volatility is accelerating or decelerating, while still providing color signals on the price bars to indicate the primary trend direction during periods of volatility expansion.
---
How It Works
1. Volatility Difference Calculation
The indicator still calculates the difference value (diff) between the Bollinger Bands and Keltner Channels in the background. This value remains the core component for identifying a Squeeze (consolidation) or a Squeeze Release (volatility expansion).
2. RSI of Volatility Difference
Instead of plotting the diff value as a histogram, this script calculates an RSI based on the diff value. The result is an oscillator line (ranging from 0-100).
This RSI line represents the "momentum" or "rate of change" of the volatility itself.
- A rising RSI indicates that volatility is expanding at an increasing rate.
- A falling RSI indicates that volatility is decelerating or contracting.
3. Bar Coloring
This feature remains identical to the original version. The colors on the price bars are determined by MACD and EMA conditions to reflect the price trend and momentum.
- Lime: Strong bullish trend.
- Red: Strong bearish trend.
- Yellow: Pullback or weakening trend.
Important: The bar colors will only appear during a Squeeze Release (when diff > 0).
---
How to Use
1. Analyze Volatility Momentum with the RSI:
- RSI crossing above 50: Signals that volatility momentum is increasing; the market may be starting to trend.
- RSI above 70: Volatility expansion is in an "overbought" state and might slow down soon.
- RSI below 30: Volatility is very low ("oversold"), which could be a precursor to a new volatility expansion.
2. Confirm with Bar Colors:
After observing that the volatility RSI is rising, look for the bar colors on the main chart to confirm a trade.
- Example: If the RSI line crosses above 50 and, at the same time, the price bars turn "Lime", it could be a strong signal to enter a long position.
Tip: This version is ideal for traders who want a deeper analysis of the strength of a volatility breakout. As always, use it in conjunction with other technical analysis tools for confirmation.
My scriptProprietary by Yogesh Bhosale
Supertrend (by KivancOzbilgic)
QQE MOD (by Mihkel00)
UT Bot Alerts (by QuantNomad)
Pivot Reversal Strategy (built-in)
EMA 21 & EMA 200 (built-in Moving Average, set length manually)
Money Printer 1.0bollinger band candle body closes, while using the 100,200 ema for shorts, longs, take profit at the middle of the bollinger bands
3 Bullish Candles + No Wick + SL unter BoS (Swing Low)1m strategie basierend auf price action and volume candle sticks
Time Range Marker By BCB ElevateThe Time Range Marker is a simple yet powerful visual tool for traders who want to focus on specific time intervals within the trading day. This indicator highlights a custom time range on your chart using a background color, helping you visually isolate key trading sessions or event windows such as:
Market open/close hours
News release periods
High-volatility trading zones
Personal strategy testing windows
⚙️ Key Features:
Customizable start and end time (hour & minute)
Works across all intraday timeframes
Adjustable highlight color to match your chart theme
Built using Pine Script v5 for speed and flexibility
🔧 Settings:
Start Hour / Minute – Set the beginning of the time range (in 24-hour format)
End Hour / Minute – Define when the range ends
Highlight Color – Choose the background color for better visibility
🕒 Timezone Note:
The indicator uses UTC time by default to ensure accuracy across markets. If your broker uses a different timezone (like EST, IST, etc.), the script can be adjusted to reflect your local market hours.
✅ How to Use the Time Range Marker Indicator
This indicator is used to visually highlight a specific time window each trading day, such as:
Market open or close sessions (e.g., NYSE, London, Tokyo)
High-impact news release periods
Custom time slots for strategy testing or scalping
🛠️ Installation Steps
Open TradingView and go to any chart.
Click on Pine Editor at the bottom of the screen.
Copy and paste the full Pine Script (shared above) into the editor.
Click the “Add to Chart” ▶️ button.
The indicator will appear on the chart with a highlighted background during the time range you set.
⚙️ How to Customize the Time Range
After adding the indicator:
Click the gear icon ⚙️ next to the indicator’s name on the chart.
Adjust the following settings:
Start Hour / Start Minute: The beginning of your time range (in 24-hour format).
End Hour / End Minute: When the highlight should stop.
Highlight Color: Pick a color and transparency for visual clarity.
Click OK to apply changes.
🕒 Timezone Consideration
By default, the indicator uses UTC (Coordinated Universal Time).
To match your broker’s timezone (e.g., EST, IST, etc.), you'll need to adjust the script by changing:
sessStart = timestamp("Etc/UTC", ...)
sessEnd = timestamp("Etc/UTC", ...)
to your correct timezone, like "Asia/Kolkata" for IST or "America/New_York" for EST.
Let me know your broker or local timezone, and I’ll update it for you.
📈 Tips for Traders
Combine this with volume, price action, or breakout indicators to focus your strategy on high-probability time windows.
Use multiple versions of this script if you want to highlight more than one time range in a day.
Improved Weinstein Stage AnalysisThe code provides an actionable, disciplined, and visually informative implementation of the “Stage Analysis” approach pioneered by Stan Weinstein, with enhancements to modernize, automate, and clarify the methodology for today’s traders using TradingView. It faithfully follows the workflow recommended: identify long-term cycles, confirm with volume and relative strength, and only engage aggressively with the market during the advancing (bullish) stage with all “clues” aligned.
Sessions with timeframe filter🕒 Smart Timeframe Filtering
This session indicator includes an automatic filter that disables all session boxes when the chart timeframe is greater than the user-defined input. This helps keep higher-timeframe charts clean and focused by hiding intraday sessions when they’re no longer relevant — especially helpful for multi-timeframe traders.
🔍 Features:
📦 Draws up to 3 customizable session boxes with dynamic high/low tracking.
⏱️ Auto-disables on higher timeframes (Smart Timeframe Filter).
🌍 Fully customizable session times, box colors, and time zone (GMT-based).
⚡ Optimized for performance using lightweight, non-overlapping box logic.
👨🍳 UI is organized like a chef’s kitchen: clean, intuitive, and easy to navigate. Settings are grouped and filtered to avoid clutter.
✅ Best Use:
This indicator is most useful for intraday traders on 1m–15m charts.
It’s designed to keep your workspace clean on 30m+ charts or whatever threshold you define.
المتوسط المتحرك الأسي - 3 متوسطاتThe indicator is the same as the exponential moving average indicator, but this one has three averages and is parsed.
PdH e PdL (Dia Anterior)Simple line that shows with labels the Previous day high and previous day low.
Combined Predictive Indicator### Summary
The **Combined Predictive Indicator** is a comprehensive tool designed to provide traders with a multi-faceted view of potential future price action. It merges several well-known analytical concepts into a single, cohesive indicator, helping to identify key levels of support, resistance, and volatility-based price targets.
This script is an amalgamation of two different concepts:
1. A prediction model based on historical range, ATR, and Fibonacci levels.
2. The "Predictive Ranges" concept, which uses an adaptive ATR-based moving average to project dynamic support and resistance zones.
### Key Components
**1. Original Prediction Model:**
* **Bollinger Bands (BB):** Standard volatility bands that help gauge whether prices are high or low on a relative basis.
* **ATR-Based Predicted Range:** A channel calculated using the Average True Range (ATR) and the average historical bar range. This provides a statistically-based estimate of the potential trading range for the next period. The upper band (green) and lower band (red) represent potential bullish and bearish targets.
* **Fibonacci Levels:** Automatically drawn based on the highest high and lowest low over a user-defined lookback period. These classic 0.382 and 0.618 levels act as potential retracement or target zones.
* **HH/LL Markers:** Small triangles appear above or below the price bars to signal a new Highest High (HH) or Lowest Low (LL) within the lookback period, helping to identify shifts in market structure.
**2. Predictive Ranges (PR):**
* This component calculates five dynamic levels based on an adaptive moving average. When the price moves significantly away from the average, the levels recalculate and project new zones.
* **Resistance Levels (PR Upper 1 & 2):** Red zones that indicate potential areas of selling pressure.
* **Support Levels (PR Lower 1 & 2):** Green zones that indicate potential areas of buying pressure.
* **Average (PR Average):** The blue line serves as the centerline or equilibrium point for the ranges.
**3. Data Table:**
* A convenient table is displayed on the top-right of the chart, showing the real-time values of all key predictive levels. This allows for a quick glance without having to hover over the plotted lines.
### How to Use
* **Confluence is Key:** Look for areas where multiple levels from different components overlap. For example, if the `Predicted Upper Range` aligns with a `PR Upper` resistance level and a `Fibonacci` level, it signifies a strong area of potential resistance.
* **Range Trading:** The `Predicted Range` (gray-filled area) can be used to identify the expected volatility. Prices moving outside this range could signal a strong breakout.
* **Trend Confirmation:** Use the `New HH/LL` markers to confirm trend direction. A series of new higher highs and higher lows suggests an uptrend, and vice-versa.
* **Dynamic S/R:** The `Predictive Ranges` are excellent for identifying dynamic support and resistance in trending or ranging markets. Watch for price reactions as it approaches these zones.
### Settings
* **Original Indicators:** Customize the lengths for Bollinger Bands, ATR, and the HH/LL lookback period. Adjust Fibonacci levels if needed.
* **Predictive Ranges:** Adjust the `Length`, `Factor` (multiplier for ATR), `Timeframe`, and `Source` to fine-tune the sensitivity and responsiveness of the PR levels.
*Disclaimer: This indicator is for educational and analytical purposes only. It is not financial advice. Always perform your own due diligence before making any trading decisions.*
Combined Time and Price IndicatorThis is what my brain sees. Time slots for good trading hours will colorize candles, green is above yesterday's highs and within the time slot and red is below yesterday's highs and within the time slot I trade
Smart Trend Predictor (EMA + Vol + Volatility)//@version=5
indicator("Smart Trend Predictor (EMA + Vol + Volatility)", overlay=true)
// === Inputs ===
emaFastLength = input.int(20, title="Fast EMA")
emaSlowLength = input.int(50, title="Slow EMA")
volatilityLength = input.int(14, title="Volatility Period")
volumeLength = input.int(20, title="Volume MA Length")
// === Indicators ===
emaFast = ta.ema(close, emaFastLength)
emaSlow = ta.ema(close, emaSlowLength)
volatility = ta.stdev(close - close , volatilityLength)
volumeMA = ta.sma(volume, volumeLength)
// === Signal Conditions ===
buySignal = ta.crossover(emaFast, emaSlow) and volatility > ta.sma(volatility, 14) and volume > volumeMA
sellSignal = ta.crossunder(emaFast, emaSlow) and volatility > ta.sma(volatility, 14) and volume > volumeMA
// === Plot EMAs ===
plot(emaFast, title="Fast EMA", color=color.lime)
plot(emaSlow, title="Slow EMA", color=color.orange)
// === Plot Signals ===
plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.arrowup, size=size.small)
plotshape(sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.arrowdown, size=size.small)
Short-Indicator + Exit-AlertThis simple yet effective indicator is designed for beginners and provides a clear trading signal when three conditions are met:
- The stock price is below the EMA200, indicating a bearish trend.
- The MACD histogram changes from positive to negative, a signal for momentum reversal from bullish to bearish.
- The Volume Oscillator is positive (above the zero line), suggesting increasing trading activity.
Alert: When all three conditions are fulfilled, an alert is triggered for a potential short entry.
- Take Profit (TP): When the price hits the lower boundary of the Donchian Channel, the trade is exited with a profit.
- Stop Loss (SL): When the price touches the upper boundary of the Donchian Channel, the position is closed to limit losses.
📊 استراتيجية 5 مؤشرات + تنبيهات//@version=5
indicator("📊 استراتيجية 5 مؤشرات + تنبيهات", overlay=true)
// === المؤشرات الأساسية ===
ema20 = ta.ema(close, 20)
ema50 = ta.ema(close, 50)
sma200 = ta.sma(close, 200)
rsi = ta.rsi(close, 14)
volumeNow = volume
volumeAvg = ta.sma(volume, 20)
// === حساب نقاط القوة ===
bullScore = 0
bullScore += close > sma200 ? 1 : 0
bullScore += ema20 > ema50 ? 1 : 0
bullScore += rsi > 55 ? 1 : 0
bullScore += volumeNow > volumeAvg ? 1 : 0
bearScore = 0
bearScore += close < sma200 ? 1 : 0
bearScore += ema20 < ema50 ? 1 : 0
bearScore += rsi < 45 ? 1 : 0
bearScore += volumeNow > volumeAvg ? 1 : 0
// === نسبة السيطرة ===
bullPercent = (bullScore / 4) * 100
bearPercent = (bearScore / 4) * 100
// === إشارات مؤكدة للدخول ===
buySignal = bullPercent >= 100
sellSignal = bearPercent >= 100
// === رسم الإشارات فقط عند تحقق 100% ===
plotshape(buySignal, title="BUY Signal", location=location.belowbar, style=shape.labelup, text="BUY", color=color.green)
plotshape(sellSignal, title="SELL Signal", location=location.abovebar, style=shape.labeldown, text="SELL", color=color.red)
// === عرض النسبة في لابل (اختياري) ===
label.new(bar_index, high, text="🐂 Bulls: " + str.tostring(bullPercent, "#.##") + "%", style=label.style_label_up, size=size.tiny, color=color.green, textcolor=color.white)
label.new(bar_index, low, text="🐻 Bears: " + str.tostring(bearPercent, "#.##") + "%", style=label.style_label_down, size=size.tiny, color=color.red, textcolor=color.white)
// === التنبيهات ===
alertcondition(buySignal, title="✅ تنبيه شراء", message="🚀 تم دخول الثيران بقوة! فرصة شراء مؤكدة.")
alertcondition(sellSignal, title="⚠️ تنبيه بيع", message="🔥 تم دخول الدببة بقوة! فرصة بيع مؤكدة.")
Current Hourly Open Line with Sweep DetectionThis indicator marks out the high and low of the current hourly open candle.
Stats show, if the current hourly candle takes the high or low of the previous 1H candle there is a chance price returns to the hourly open depending on the time the sweep on the high or low occurred.
There is a high chance >75% price returns to hourly open of current candle if the sweep happens in the first 20 minutes.
There is a medium chance 50% price returns to hourly open of current candle if the sweep happens in the 20-40 minute range of the current candle.
There is a low 25% chance if sweep happens from :40-:59 minutes of the hour.
We use this to spot manipulation on the hourly timeframe, we only want to target hourly open if it happens in the first 20 minutes. We then want to trade in opposite direction of the first move of the hourly, w/ context of course.
The indicator / line will change colors based on the time the first sweep occurred. You can change them to how you want. For default, blue is just the hourly open with no sweep yet.
Green means go, and the sweep happens within the first 20 minutes, Yellow is medium chance, and Red is small chance.
Daily 16:45 LineDaily start & end indicator at 16:45. Instead of manually doing it on the charts, it will automatically appears, with no manual labor
EMA Trend ScreenerEMA Trend Screener" instantly shows whether 40+ crypto pairs are bullish (green) or bearish (red) based on their position relative to a customizable EMA. The compact table display saves time by eliminating chart switching, while adjustable settings adapt to any trading style. Perfect for quick market analysis, it helps spot trading opportunities at a glance
RSS-Stochastik [afterworktrading]Hi all,
this is the first script from the series "afterworktrading". The goal is to develop and provide tools for traders with a fulltime job or little time for trading/analyzing charts.
Over time some of the scripts will also be linked to complete trading systems.
Let's start with my favourite one, the "RSS-Stochastik" with alert function.
The RSS-concept (Relative Spread Strength, developed by Ian Copsey) is based on the variance between a "short" and a "long" moving averages (or "slow" and "fast"), here between two EMA.
This variance is calculated and plotted in a RSI-diagram to show "overbought" and "oversold" conditions, helping to identify an ideal entry setup for trend continuation or catching a possible reversal.
Compared to the conventional RSI etc., possible reversal or trend continuation areas are often better represented in terms of quality, as an example see the Amazon-Chart.
The EMA-values, limit value thresholds and background colors can be set in the script. As a special feature, alarms can be set to be notified when a value has reached the extreme range. This reduces the screen time to the minimum.
In my personal trading, this indicator forms the basis for almost all trades, but is not a pure signal indicator on its own.
However, the informative value can be further improved if volume or support/resistance zones etc. are linked to the RSS, see example NASDAQ future with support zone price or 200 EMA.
Example for a possible RSS-Trade-Setup:
- choose an asset with a strong trend
- set alerts for crossing the oversold or overbought condition in direction of the trend
- in case of an alert check possible support/resistance areas on the current chart level (EMA, price zones, volume zones, anchored VWAP etc.)
- trade in the direction of the trend using your preferred entry setup
In my opinion, the system can be used very well, especially in trend phases, in order to obtain optimal entries.
Does it works also on lower timeframes?
Yes, it might work on every timeframe with a strong trend of high quality. Please see attached a 5m-Chart of GPBUSD-pair, notice the signal quality in direction of the trend.
Like every trading system this is not the "holy grail setup" and you will have losing trades. But handling this indicator with care you can have better entries especially in trend direction with less screen time due to the alert function.
Good luck with it! Further indicators will be published in the coming months, some will also be based on the RSS system.
As always: no liability for losing trades, no investment advice etc. Observe the risk limit for every trade!
VWAP Combo: Bands + MACD + Volume + AlertsBands: These are dynamic bands using a 20-period standard deviation and 1.5× width by default. Adjust lookback or bandMultiplier to tighten or widen.
Candle Colors: Green = MACD bullish, Red = bearish.
Volume Spike: Orange triangle when volume > 1.5× average.
Alerts: Fire on breakout, bounce, or combo confirmation.
Four Trading SessionsIve adapted this from someone else's script to include 4 sessions instead of 3
TradingView Indicator Description: Trading Sessions
Overview:
The "Trading Sessions" indicator, written in Pine Script v5, visually highlights major forex trading sessions (Tokyo, London, New York, and Sydney) on intraday charts. It displays session ranges as colored boxes, with optional open/close lines, average price lines, and labels showing session names, tick ranges, and average prices. Users can customize session times, time zones, colors, and display options.
Key Features:
Customizable Sessions: Supports up to four trading sessions (Tokyo, London, New York, Sydney) with user-defined names, time ranges, and time zones (e.g., "Asia/Tokyo", "America/New_York").
Visual Elements:
Draws semi-transparent boxes to mark session price ranges (high/low).
Optional dashed lines for session open and close prices.
Optional dotted line for the session's average price.
Labels displaying session name, tick range, and/or average price (configurable).
Time Zone Support: Specify time zones using IANA database names (e.g., "Australia/Sydney") or GMT notation, with a recommendation for IANA to handle daylight savings.
Display Options: Toggle session names, open/close lines, tick range, and average price visibility.
Intraday Restriction: Works only on intraday timeframes, with an error for daily/weekly/monthly charts.
Performance Optimized: Limits boxes, lines, and labels to 500 each to ensure smooth performance.
Inputs:
General Settings:
Show session names, open/close lines, tick range, and average price (all enabled by default).
Per Session (Tokyo, London, New York, Sydney):
Enable/disable session display.
Custom session name (e.g., "Tokyo").
Session time range (e.g., "0900-1500" for Tokyo).
Time zone (e.g., "Asia/Tokyo").
Session color (semi-transparent blue, orange, green, purple by default).
How It Works:
The script checks if the current bar falls within a session’s time range (adjusted for the specified time zone).
For each active session, it creates a box spanning the session’s high/low and updates it bar-by-bar.
Optional open/close lines and an average price line are drawn and updated dynamically.
Labels display user-selected metrics (name, range, average price) at the bottom of each session box.
Sessions reset daily, ensuring accurate representation across days.
Use Case:
Ideal for forex traders who want to analyze price action during specific trading sessions. The indicator helps identify session-specific volatility, key price levels, and trends, with clear visual cues and customizable settings.
Limitations:
Only works on intraday timeframes.
Limited to 500 boxes, lines, and labels to prevent performance issues.
Requires accurate time zone settings for proper session alignment.
Example:
Enable the Tokyo and New York sessions, set their respective time zones, and toggle on all display options to see colored boxes, open/close lines, average price lines, and labels with tick ranges and averages for each session.
DR V966 - Smart Money Concepts// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © DR.BASL
//
//@version=5
indicator("DR V966 - Smart Money Concepts", "DR V966 - Smart Money Concepts ",
overlay = true,
max_bars_back = 5000,
max_boxes_count = 500,
max_labels_count = 500,
max_lines_count = 500,
max_polylines_count = 100)
plot(na)
//
MSG = "MARKET STRUCTURE"
VBG = "VOLUMETRIC ORDER BLOCKS"
MST = "Limit market structure calculation to improve memory speed time"
SLT = " Limit swing structure to tot bars back"
IDT = " Start date of the internal structure"
CST = "Color candle based on trend detection system"
OBT = "Display internal buy and sell activity"
OBD = "Show Last number of orderblock"
OBMT = " Use Length to adjust cordinate of the orderblocks Use whole candle body"
_ ='
------------
–––––––––––––––––––––––––– INPUTS –––––––––––––––––––––––––––
------------ '//{
bool windowsis = input.bool(true, "Window", inline="kla", group=MSG)
int mswindow = input.int(5000, "", tooltip=MST,group=MSG, inline="kla", minval=1000)
bool showSwing = input.bool(true, "Swing", inline="scss", group=MSG)
int swingLimit = input.int(100, "", tooltip=SLT, inline="scss", group=MSG, minval=10, maxval=200)
color swingcssup = input.color(#089981, "", inline="scss", group=MSG)
color swingcssdn = input.color(#f23645, "", inline="scss", group=MSG)
bool showMapping = input.bool(false, "Mapping Structure", inline="mapping", group=MSG)
string mappingStyle = input.string("----", "", options= , inline="mapping", group=MSG)
color mappingcss = input.color(color.silver, "", tooltip="Display Mapping Structure", inline="mapping", group=MSG)
bool candlecss = input.bool(false, "Color Candles", tooltip=CST, group=MSG, inline="txt")
string mstext = input.string("Tiny", "", options= ,
inline="txt", group=MSG)
string msmode = input.string("Adjusted Points", "Algorithmic Logic", options=
, inline="node", group=MSG)
int mslen = input.int(5, "", inline="node", group=MSG, minval=2)
bool buildsweep = input.bool(true, "Build Sweep (x)", "Build sweep on market structure", "znc", MSG)
bool msbubble = input.bool(true, "Bubbles", tooltip="Display Circle Bubbles", inline="bubbles", group=MSG)
bool obshow = input.bool(true, "Show Last", tooltip=OBD, group=VBG, inline="obshow")
int oblast = input.int(5, "", group=VBG, inline="obshow", minval=0)
color obupcs = input.color(color.new(#089981, 90), "", inline="obshow", group=VBG)
color obdncs = input.color(color.new(#f23645, 90), "", inline="obshow", group=VBG)
bool obshowactivity = input.bool(true, "Show Buy/Sell Activity", inline="act", group=VBG, tooltip=OBT)
color obactup = input.color(color.new(#089981, 50), "", inline="act", group=VBG)
color obactdn = input.color(color.new(#f23645, 50), "", inline="act", group=VBG)
obshowbb = input.bool(false, "Show Breakers", inline="bb", group=VBG, tooltip="Display Breakers")
color bbup = input.color(color.new(#089981, 100), "", inline="bb", group=VBG)
color bbdn = input.color(color.new(#f23645, 100), "", inline="bb", group=VBG)
obmode = input.string("Length", "Construction", options= , tooltip=OBMT, inline="atr", group=VBG)
len = input.int(5, "", inline="atr", group=VBG, minval=1)
obmiti = input.string("Close", "Mitigation Method", options= ,
tooltip="Mitigation method for when to trigger order blocks", group=VBG)
obtxt = input.string("Normal", "Metric Size", options= ,
tooltip="Order block Metrics text size", inline="txt", group=VBG)
showmetric = input.bool(true, "Show Metrics", group=VBG)
showline = input.bool(true, "Show Mid-Line", group=VBG)
overlap = input.bool(true, "Hide Overlap", group=VBG, inline="ov")
wichlap = input.string("Recent", "", options= , inline="ov", group=VBG)
fvg_enable = input.bool(false, "", inline="1", group="FAIR VALUE GAP", tooltip="Display fair value gap")
what_fvg = input.string("FVG", "", inline="1", group="FAIR VALUE GAP", tooltip="Display fair value gap",
options= )
fvg_num = input.int(5, "Show Last", inline="1a", group="FAIR VALUE GAP", tooltip="Number of fvg to show", minval=0)
fvg_upcss = input.color(color.new(#089981, 80), "", inline="1", group="FAIR VALUE GAP")
fvg_dncss = input.color(color.new(#f23645, 80), "", inline="1", group="FAIR VALUE GAP")
fvgbbup = input.color(color.new(#089981, 100), "", inline="1", group="FAIR VALUE GAP")
fvgbbdn = input.color(color.new(#f23645, 100), "", inline="1", group="FAIR VALUE GAP")
fvg_src = input.string("Close", "Mitigation",
inline="3",
group="FAIR VALUE GAP",
tooltip=" Use the close of the body as trigger Use the extreme point of the body as trigger",
options= )
fvgthresh = input.float(0, "Threshold", tooltip="Filter out non significative FVG", group="FAIR VALUE GAP",
inline="asd", minval=0, maxval=2, step=0.1)
fvgoverlap = input.bool(true, "Hide Overlap", "Hide overlapping FVG", group="FAIR VALUE GAP")
fvgline = input.bool(true, "Show Mid-Line", group="FAIR VALUE GAP")
fvgextend = input.bool(false, "Extend FVG", group="FAIR VALUE GAP")
dispraid = input.bool(false, "Display Raids", inline="raid", group="FAIR VALUE GAP")
// إعدادات تفعيل/تعطيل وتخصيص لكل مستوى فيبوناتشي
show_fib_0 = input.bool(true, "إظهار 0.0" , group="Fibonacci")
show_fib_236 = input.bool(true, "إظهار 0.236" , group="Fibonacci")
show_fib_382 = input.bool(true, "إظهار 0.382" , group="Fibonacci")
show_fib_5 = input.bool(true, "إظهار 0.5" , group="Fibonacci")
show_fib_618 = input.bool(true, "إظهار 0.618" , group="Fibonacci")
show_fib_786 = input.bool(true, "إظهار 0.786" , group="Fibonacci")
show_fib_1 = input.bool(true, "إظهار 1.0" , group="Fibonacci")
show_fib_1272 = input.bool(true, "إظهار 1.272" , group="Fibonacci")
show_fib_1618 = input.bool(true, "إظهار 1.618" , group="Fibonacci")
show_fib_180 = input.bool(true, "إظهار 1.80" , group="Fibonacci")
show_fib_2 = input.bool(true, "إظهار 2.0" , group="Fibonacci")
show_fib_2272 = input.bool(true, "إظهار 2.272" , group="Fibonacci")
show_fib_2618 = input.bool(true, "إظهار 2.618" , group="Fibonacci")
fib_color_0 = input.color(color.white, "لون 0.0" , group="Fibonacci")
fib_color_236 = input.color(color.white, "لون 0.236" , group="Fibonacci")
fib_color_382 = input.color(color.white, "لون 0.382" , group="Fibonacci")
fib_color_5 = input.color(color.white, "لون 0.5" , group="Fibonacci")
fib_color_618 = input.color(color.white, "لون 0.618" , group="Fibonacci")
fib_color_786 = input.color(color.white, "لون 0.786" , group="Fibonacci")
fib_color_1 = input.color(color.white, "لون 1.0" , group="Fibonacci")
fib_color_1272 = input.color(color.white, "لون 1.272" , group="Fibonacci")
fib_color_1618 = input.color(color.white, "لون 1.618" , group="Fibonacci")
fib_color_180 = input.color(color.white, "لون 1.80" , group="Fibonacci")
fib_color_2 = input.color(color.white, "لون 2.0" , group="Fibonacci")
fib_color_2272 = input.color(color.white, "لون 2.272" , group="Fibonacci")
fib_color_2618 = input.color(color.white, "لون 2.618" , group="Fibonacci")
fib_size = input.string("normal", "حجم الخط", options= , group="Fibonacci")
fib_shift = input.int(0, "تحريك خطوط الفيبوناتشي إلى اليمين", minval=0, maxval=100, group="Fibonacci")
//}
_ ='
------------
–––––––––––––––––––––––––– UDT –––––––––––––––––––––––––––
------------ '//{
type hqlzone
box pbx
box ebx
box lbx
label plb
label elb
label lbl
type Zphl
line top
line bottom
label top_label
label bottom_label
bool stopcross
bool sbottomcross
bool itopcross
bool ibottomcross
string txtup
string txtdn
float topy
float bottomy
float topx
float bottomx
float tup
float tdn
int tupx
int tdnx
float itopy
float itopx
float ibottomy
float ibottomx
float uV
float dV
type entered
bool normal = false
bool breaker = false
type store
line ln
label lb
box bx
linefill lf
type structure
int zn
float zz
float bos
float choch
int loc
int temp
int trend
int start
float main
int xloc
bool upsweep
bool dnsweep
string txt = na
type drawms
int x1
int x2
float y
string txt
color css
string style
type ob
bool bull
float top
float btm
float avg
int loc
color css
float vol
int dir
int move
int blPOS
int brPOS
int xlocbl
int xlocbr
bool isbb = false
int bbloc
type FVG
float top = na
float btm = na
int loc = bar_index
bool isbb = false
int bbloc = na
bool israid = false
float raidy = na
int raidloc = na
int raidx2 = na
bool active = false
color raidcs = na
type SFP
float y
int loc
float ancor
type sfpbuildlbl
int x
float y
string style
color css
string txt
type sfpbuildline
int x1
int x2
float y
color css
float ancor
int loc
type equalbuild
int x1
float y1
int x2
float y2
color css
string style
type equalname
int x
float y
string txt
color css
string style
type ehl
float pt
int t
float pb
int b
type sellbuyside
float top
float btm
int loc
color css
string txt
float vol
type timer
bool start = false
int count = 0
//}
_ ='
------------
–––––––––––––––––––––––––– SETUP –––––––––––––––––––––––––––
------------ '//{
var store bin = store.new(
array.new< line >()
, array.new< label >()
, array.new< box >()
, array.new()
)
var entered blobenter = entered.new()
var entered brobenter = entered.new()
var entered blfvgenter = entered.new()
var entered brfvgenter = entered.new()
var entered blarea = entered.new()
var entered brarea = entered.new()
var timer lc = timer.new ()
if barstate.islast
for obj in bin.ln
obj.delete()
for obj in bin.lb
obj.delete()
for obj in bin.bx
obj.delete()
for obj in bin.lf
obj.delete()
bin.ln.clear()
bin.lb.clear()
bin.bx.clear()
bin.lf.clear()
invcol = #ffffff00
float atr = (ta.atr(200) / (5/len))
//}
_ ='
------------
–––––––––––––––––––––––––– UTILITY –––––––––––––––––––––––––––
------------ '//{
method txSz(string s) =>
out = switch s
"Tiny" => size.tiny
"Small" => size.small
"Normal" => size.normal
"Large" => size.large
"Huge" => size.huge
"Auto" => size.auto
out
method lstyle(string style) =>
out = switch style
'⎯⎯⎯⎯' => line.style_solid
'----' => line.style_dashed
'····' => line.style_dotted
ghl() => [high , low , close , open , close, open, high, low, high , low , ta.atr(200)]
method IDMIDX(bool use_max, int loc) =>
min = 99999999.
max = 0.
idx = 0
if use_max
for i = 0 to (bar_index - loc)
max := math.max(high , max)
min := max == high ? low : min
idx := max == high ? i : idx
else
for i = 0 to (bar_index - loc)
min := math.min(low , min)
max := min == low ? high : max
idx := min == low ? i : idx
idx
SFPData() => [high, high , high , low, low , low , close, volume, time, bar_index , time ]
SFPcords() =>
RealTF = barstate.isrealtime ? 0 : 1
= SFPData()
[h , h1 , h2 , l , l1 , l2 , c , v , t , n , t1 ]
method find(structure ms, bool use_max, bool sweep, bool useob) =>
min = 99999999.
max = 0.
idx = 0
if not sweep
if ((bar_index - ms.loc) - 1) > 0
if use_max
for i = 0 to (bar_index - ms.loc) - 1
max := math.max(high , max)
min := max == high ? low : min
idx := max == high ? i : idx
if useob
if high > high
max := high
min := low
idx := idx + 1
else
for i = 0 to (bar_index - ms.loc) - 1
min := math.min(low , min)
max := min == low ? high : max
idx := min == low ? i : idx
if useob
if low < low
max := high
min := low
idx := idx + 1
else
if use_max
for i = 0 to (bar_index - ms.loc)
max := math.max(high , max)
min := max == high ? low : min
idx := max == high ? i : idx
if useob
if high > high
max := high
min := low
idx := idx + 1
else
for i = 0 to (bar_index - ms.loc)
min := math.min(low , min)
max := min == low ? high : max
idx := min == low ? i : idx
if useob
if low < low
max := high
min := low
idx := idx + 1
else
if ((bar_index - ms.xloc) - 1) > 0
if use_max
for i = 0 to (bar_index - ms.xloc) - 1
max := math.max(high , max)
min := max == high ? low : min
idx := max == high ? i : idx
if useob
if high > high
max := high
min := low
idx := idx + 1
else
for i = 0 to (bar_index - ms.xloc) - 1
min := math.min(low , min)
max := min == low ? high : max
idx := min == low ? i : idx
if useob
if low < low
max := high
min := low
idx := idx + 1
else
if use_max
for i = 0 to (bar_index - ms.xloc)
max := math.max(high , max)
min := max == high ? low : min
idx := max == high ? i : idx
if useob
if high > high
max := high
min := low
idx := idx + 1
else
for i = 0 to (bar_index - ms.xloc)
min := math.min(low , min)
max := min == low ? high : max
idx := min == low ? i : idx
if useob
if low < low
max := high
min := low
idx := idx + 1
idx
method fnOB(ob block, bool bull, float cords, int idx) =>
switch bull
true =>
blobenter.normal := false
blobenter.breaker := false
block.unshift(
ob.new(
true
, cords
, low
, math.avg(cords, low )
, time
, obupcs
, volume
, close > open ? 1 : -1
, 1
, 1
, 1
, time
)
)
false =>
brobenter.normal := false
brobenter.breaker := false
block.unshift(
ob.new(
false
, high
, cords
, math.avg(cords, high )
, time
, obdncs
, volume
, close > open ? 1 : -1
, 1
, 1
, 1
, time
)
)
method mitigated(ob block) =>
if barstate.isconfirmed
for in block
if not stuff.isbb
switch stuff.bull
true =>
if obmiti == "Close" ? math.min(close, open) < stuff.btm : obmiti == "Wick" ? low < stuff.btm : obmiti == "Avg" ? low < stuff.avg : na
stuff.isbb := true
stuff.bbloc := time
if not obshowbb
block.remove(i)
false =>
if obmiti == "Close" ? math.max(close, open) > stuff.top : obmiti == "Wick" ? high > stuff.top : obmiti == "Avg" ? high > stuff.avg : na
stuff.isbb := true
stuff.bbloc := time
if not obshowbb
block.remove(i)
else
switch stuff.bull
true =>
if obmiti == "Close" ? math.max(close, open) > stuff.top : obmiti == "Wick" ? high > stuff.top : obmiti == "Avg" ? high > stuff.avg : na
block.remove(i)
false =>
if obmiti == "Close" ? math.min(close, open) < stuff.btm : obmiti == "Wick" ? low < stuff.btm : obmiti == "Avg" ? low < stuff.avg : na
block.remove(i)
overlap(ob bull, ob bear) =>
if bull.size() > 1
for i = bull.size() - 1 to 1
stuff = bull.get(i)
current = bull.get(0)
v = wichlap == "Recent" ? i : 0
switch
stuff.btm > current.btm and stuff.btm < current.top => bull.remove(v)
stuff.top < current.top and stuff.btm > current.btm => bull.remove(v)
stuff.top > current.top and stuff.btm < current.btm => bull.remove(v)
stuff.top < current.top and stuff.top > current.btm => bull.remove(v)
if bear.size() > 1
for i = bear.size() - 1 to 1
stuff = bear.get(i)
current = bear.get(0)
v = wichlap == "Recent" ? i : 0
switch
stuff.btm > current.btm and stuff.btm < current.top => bear.remove(v)
stuff.top < current.top and stuff.btm > current.btm => bear.remove(v)
stuff.top > current.top and stuff.btm < current.btm => bear.remove(v)
stuff.top < current.top and stuff.top > current.btm => bear.remove(v)
if bull.size() > 0 and bear.size() > 0
for i = bull.size() - 1 to 0
stuff = bull.get(i)
current = bear.get(0)
v = wichlap == "Recent" ? 0 : i
switch
stuff.btm > current.btm and stuff.btm < current.top => bull.remove(v)
stuff.top < current.top and stuff.btm > current.btm => bull.remove(v)
stuff.top > current.top and stuff.btm < current.btm => bull.remove(v)
stuff.top < current.top and stuff.top > current.btm => bull.remove(v)
if bull.size() > 0 and bear.size() > 0
for i = bear.size() - 1 to 0
stuff = bear.get(i)
current = bull.get(0)
v = wichlap == "Recent" ? 0 : i
switch
stuff.btm > current.btm and stuff.btm < current.top => bear.remove(v)
stuff.top < current.top and stuff.btm > current.btm => bear.remove(v)
stuff.top > current.top and stuff.btm < current.btm => bear.remove(v)
stuff.top < current.top and stuff.top > current.btm => bear.remove(v)
overlapFVG(FVG blFVG, FVG brFVG) =>
if blFVG.size() > 1
for i = blFVG.size() - 1 to 1
stuff = blFVG.get(i)
current = blFVG.get(0)
switch
stuff.btm > current.btm and stuff.btm < current.top => blFVG.remove(i)
stuff.top < current.top and stuff.btm > current.btm => blFVG.remove(i)
stuff.top > current.top and stuff.btm < current.btm => blFVG.remove(i)
stuff.top < current.top and stuff.top > current.btm => blFVG.remove(i)
if brFVG.size() > 1
for i = brFVG.size() - 1 to 1
stuff = brFVG.get(i)
current = brFVG.get(0)
switch
stuff.btm > current.btm and stuff.btm < current.top => brFVG.remove(i)
stuff.top < current.top and stuff.btm > current.btm => brFVG.remove(i)
stuff.top > current.top and stuff.btm < current.btm => brFVG.remove(i)
stuff.top < current.top and stuff.top > current.btm => brFVG.remove(i)
if blFVG.size() > 0 and brFVG.size() > 0
for i = blFVG.size() - 1 to 0
stuff = blFVG.get(i)
current = brFVG.get(0)
switch
stuff.btm > current.btm and stuff.btm < current.top => blFVG.remove(i)
stuff.top < current.top and stuff.btm > current.btm => blFVG.remove(i)
stuff.top > current.top and stuff.btm < current.btm => blFVG.remove(i)
stuff.top < current.top and stuff.top > current.btm => blFVG.remove(i)
if blFVG.size() > 0 and brFVG.size() > 0
for i = brFVG.size() - 1 to 0
stuff = brFVG.get(i)
current = blFVG.get(0)
switch
stuff.btm > current.btm and stuff.btm < current.top => brFVG.remove(i)
stuff.top < current.top and stuff.btm > current.btm => brFVG.remove(i)
stuff.top > current.top and stuff.btm < current.btm => brFVG.remove(i)
stuff.top < current.top and stuff.top > current.btm => brFVG.remove(i)
method umt(ob metric) =>
switch metric.dir
1 =>
switch metric.move
1 => metric.blPOS := metric.blPOS + 1, metric.move := 2
2 => metric.blPOS := metric.blPOS + 1, metric.move := 3
3 => metric.brPOS := metric.brPOS + 1, metric.move := 1
-1 =>
switch metric.move
1 => metric.brPOS := metric.brPOS + 1, metric.move := 2
2 => metric.brPOS := metric.brPOS + 1, metric.move := 3
3 => metric.blPOS := metric.blPOS + 1, metric.move := 1
if (time - time ) == (time - time )
metric.xlocbl := metric.loc + (time - time ) * metric.blPOS
metric.xlocbr := metric.loc + (time - time ) * metric.brPOS
method display(ob id, ob full, int i) =>
if not id.isbb
bin.bx.unshift(box.new (top = id.top, bottom = id.btm, left = id.loc, right = time , border_color = na , bgcolor = id.css, xloc = xloc.bar_time))
bin.bx.unshift(box.new (top = id.top, bottom = id.btm, left = time , right = time + 1 , border_color = na , bgcolor = id.css, xloc = xloc.bar_time, extend = extend.right))
else
bin.bx.unshift(box.new (top = id.top, bottom = id.btm, left = id.loc , right = id.bbloc , border_color = na , bgcolor = id.css , xloc = xloc.bar_time))
bin.bx.unshift(box.new (top = id.top, bottom = id.btm, left = id.bbloc , right = time , border_color = id.css , bgcolor = id.bull ? bbup : bbdn , xloc = xloc.bar_time, border_width = 2))
bin.bx.unshift(box.new (top = id.top, bottom = id.btm, left = time , right = time + 1 , border_color = id.css , bgcolor = id.bull ? bbup : bbdn , xloc = xloc.bar_time, extend = extend.right))
if obshowactivity
bin.bx.unshift(box.new (top = id.top, bottom = id.avg, left = id.loc , right = id.xlocbl, border_color = na , bgcolor = obactup, xloc = xloc.bar_time))
bin.bx.unshift(box.new (top = id.avg, bottom = id.btm, left = id.loc , right = id.xlocbr, border_color = na , bgcolor = obactdn, xloc = xloc.bar_time))
if showline
bin.ln.unshift(line.new(
x1 = id.loc
, x2 = time
, y1 = id.avg
, y2 = id.avg
, color = color.new(id.css, 0)
, xloc = xloc.bar_time
, style = line.style_dashed
)
)
if showmetric
if i == math.min(oblast - 1, full.size() - 1)
float tV = 0
float dV = array.new()
seq = math.min(oblast - 1, full.size() - 1)
for j = 0 to seq
cV = full.get(j)
tV += cV.vol
if j == seq
for y = 0 to seq
dV.push(
math.floor(
(full.get(y).vol / tV) * 100)
)
ids = full.get(y)
bin.lb.unshift(label.new(
bar_index - 1
, ids.avg
, textcolor = color.new(ids.css, 0)
, style = label.style_label_left
, size = obtxt.txSz()
, color = #ffffff00
, text =
str.tostring(
math.round(full.get(y).vol, 3), format = format.volume) + " (" + str.tostring(dV.get(y)) + "%)"
)
)
method dispFVG(FVG fvg, int i, bool bull) =>
ext = fvgextend ? extend.right : extend.none
if not fvg.isbb
bin.bx.unshift(box .new(top = fvg.top, bottom = fvg.btm, left = fvg.loc , right = time , border_color = na , bgcolor = bull ? fvg_upcss : fvg_dncss , xloc = xloc.bar_time, extend = ext))
if fvgline
bin.ln.unshift(line.new(x1 = fvg.loc, x2 = time , y1 = math.avg(fvg.top, fvg.btm), y2 = math.avg(fvg.top, fvg.btm), xloc = xloc.bar_time, color = color.new(bull ? fvg_upcss : fvg_dncss, 0) , extend = ext))
if dispraid
bin.ln.unshift(line.new(x1 = fvg.raidloc, x2 = fvg.raidx2, y1 = fvg.raidy, y2 = fvg.raidy, xloc = xloc.bar_time, color = fvg.raidcs))
bin.lb.unshift(label.new(x = int(math.avg(fvg.raidloc, fvg.raidx2)), y = fvg.raidy, text = "x", xloc = xloc.bar_time, textcolor = fvg.raidcs, style = bull ? label.style_label_up : label.style_label_down, size = size.small, color = #ffffff00))
else
bin.bx.unshift(box .new(top = fvg.top , bottom = fvg.btm, left = fvg.loc , right = fvg.bbloc , border_color = na , bgcolor = bull ? fvg_upcss : fvg_dncss, xloc = xloc.bar_time))
bin.bx.unshift(box .new(top = fvg.top , bottom = fvg.btm, left = fvg.bbloc , right = time , border_color = bull ? fvg_dncss : fvg_upcss , bgcolor = bull ? fvg_dncss : fvg_upcss, xloc = xloc.bar_time, extend = ext))
if fvgline
bin.ln.unshift(line.new(x1 = fvg.loc , x2 = fvg.bbloc , y1 = math.avg(fvg.top, fvg.btm), y2 = math.avg(fvg.top, fvg.btm), color = color.new(bull ? fvg_upcss : fvg_dncss, 0) , xloc = xloc.bar_time))
bin.ln.unshift(line.new(x1 = fvg.bbloc, x2 = time , y1 = math.avg(fvg.top, fvg.btm), y2 = math.avg(fvg.top, fvg.btm), color = color.new(bull ? fvg_dncss : fvg_upcss, 0) , xloc = xloc.bar_time, extend = ext, style = line.style_dashed))
//}
_ ='
------------
–––––––––––––––––––––––––– FUNCTION –––––––––––––––––––––––––––
------------ '//{
mapping() =>
var float up = na
var float dn = na
var float point = na
var int trend = 0
var int idx = na
var int sum = na
var int project = na
var chart.point charts = array.new()
if na(up)
up := high
idx := bar_index
if na(dn)
dn := low
idx := bar_index
if high > up
if trend == -1
id = IDMIDX(false, idx)
charts.unshift(
chart.point.from_time(
time
, low
)
)
idx := bar_index
point := low
sum := time
up := high
dn := low
project := time
trend := 1
if low < dn
if trend == 1
id = IDMIDX(true, idx)
charts.unshift(
chart.point.from_time(
time
, high
)
)
idx := bar_index
point := high
sum := time
up := high
dn := low
project := time
trend := -1
if barstate.islast
var line ln = na
var polyline pl = na
ln.delete()
pl.delete()
ln := na
pl := na
ln := line.new(
x1 = sum
, x2 = project
, y1 = point
, y2 = trend == 1 ? up : dn
, xloc = xloc.bar_time
, color = color.red
)
pl := polyline.new(
charts
, line_color = mappingcss
, xloc = xloc.bar_time
, line_style = mappingStyle.lstyle()
)
dFVG() =>
= ghl()
var FVG blFVG = array.new()
var FVG brFVG = array.new()
bool upfvg = false
bool dnfvg = false
float blth = l1 + (fvatr * fvgthresh)
float brth = h1 - (fvatr * fvgthresh)
cc = timeframe.change()
switch
what_fvg == "FVG" or what_fvg == "Breakers" =>
if l > h2 and cc and c1 > blth
upfvg := true
if l2 > h and cc and c1 < brth
dnfvg := true
if upfvg
if blFVG.size() > 0
fvg = blFVG.get(0)
if fvg.israid == true and fvg.active == false
fvg.active := true
fvg.raidloc := na
fvg.raidx2 := na
fvg.raidy := na
fvg.raidcs := #ffffff00
blFVG.unshift(
FVG.new(
l
, h2
, time
, false
, na
)
)
if dnfvg
if brFVG.size() > 0
fvg = brFVG.get(0)
if fvg.israid == true and fvg.active == false
fvg = brFVG.get(0)
fvg.active := true
fvg.active := true
fvg.raidloc := na
fvg.raidx2 := na
fvg.raidy := na
fvg.raidcs := #ffffff00
brFVG.unshift(
FVG.new(
l2
, h
, time
, false
, na
)
)
if blFVG.size() > 0
for in blFVG
if not fvg.isbb
if fvg_src == "Close" ? math.min(c, o) < fvg.btm : fvg_src == "Wick" ? l < fvg.btm : fvg_src == "Avg" ? l < math.avg(fvg.top, fvg.btm) : na
fvg.isbb := true
fvg.bbloc := time
if what_fvg == "FVG"
blFVG.remove(i)
else
if (fvg_src == "Close" ? math.max(c, o) > fvg.top : fvg_src == "Wick" ? h > fvg.top : fvg_src == "Avg" ? h > math.avg(fvg.top, fvg.btm) : na) and what_fvg == "Breakers"
blFVG.remove(i)
if brFVG.size() > 0
for in brFVG
if not fvg.isbb
if (fvg_src == "Close" ? math.max(c, o) > fvg.top : fvg_src == "Wick" ? h > fvg.top : fvg_src == "Avg" ? h > math.avg(fvg.top, fvg.btm) : na)
fvg.isbb := true
fvg.bbloc := time
if what_fvg == "FVG"
brFVG.remove(i)
else
if (fvg_src == "Close" ? math.min(c, o) < fvg.btm : fvg_src == "Wick" ? l < fvg.btm : fvg_src == "Avg" ? l < math.avg(fvg.top, fvg.btm) : na) and what_fvg == "Breakers"
brFVG.remove(i)
if fvgoverlap
overlapFVG(blFVG, brFVG)
if dispraid
for in blFVG
if not fvg.israid and not fvg.isbb
if low < fvg.top and close > fvg.top
fvg.israid := true
fvg.raidloc := time
fvg.raidx2 := time
fvg.raidy := low
fvg.raidcs := chart.fg_color
else
if low <= fvg.raidy and fvg.active == false and not fvg.isbb
fvg.active := true
fvg.raidx2 := time
else
if fvg.active == false and not fvg.isbb
fvg.raidx2 := time
for in brFVG
if not fvg.israid and not fvg.isbb
if high > fvg.btm and close < fvg.btm and not fvg.isbb
fvg.israid := true
fvg.raidloc := time
fvg.raidy := high
fvg.raidx2 := time
fvg.raidcs := chart.fg_color
else
if high >= fvg.raidy and fvg.active == false and not fvg.isbb
fvg.active := true
fvg.raidx2 := time
else
if fvg.active == false and not fvg.isbb
fvg.raidx2 := time
if barstate.islast
if blFVG.size() > 0 and fvg_num > 0
for i = 0 to math.min(fvg_num - 1, blFVG.size() - 1)
fvg = blFVG.get(i)
dispFVG(fvg, i, true)
if brFVG.size() > 0 and fvg_num > 0
for i = 0 to math.min(fvg_num - 1, brFVG.size() - 1)
fvg = brFVG.get(i)
dispFVG(fvg, i, false)
structure(color upcss, color dncss, bool draw, bool internal, int limit) =>
var structure ms = structure.new(start = 0)
var ob blob = array.new< ob >()
var ob brob = array.new< ob >()
var drawms bldw = array.new< drawms >()
var drawms brdw = array.new< drawms >()
var sellbuyside sellside = array.new()
var sellbuyside buyside = array.new()
bool crossup = false
bool crossdn = false
var float up = na
var float dn = na
idbull = ms.find(false, false, true)
idbear = ms.find(true , false, true)
btmP = obmode == "Length" ? (high - 1 * atr ) < low ? low : (high - 1 * atr ) : low
topP = obmode == "Length" ? (low + 1 * atr ) > high ? high : (low + 1 * atr ) : high
atr = ta.atr (200)
buy = low + atr
sel = high - atr
ph = ta.pivothigh(high, mslen, mslen)
pl = ta.pivotlow (low , mslen, mslen)
var int phn = array.new< int >(1, na)
var int pln = array.new< int >(1, na)
var float php = array.new(1, na)
var float plp = array.new(1, na)
if internal
blob.clear()
brob.clear()
if ph
phn.unshift(bar_index )
php.unshift(high )
if pl
pln.unshift(bar_index )
plp.unshift(low )
if php.size() > 0
if high > php.get(0)
php.clear()
phn.clear()
if plp.size() > 0
if low < plp.get(0)
plp.clear()
pln.clear()
if na(up)
up := high
if na(dn)
dn := low
if high > up
up := high
dn := low
crossup := true
if low < dn
up := high
dn := low
crossdn := true
if ms.start == 0
ms := structure.new(bar_index, na, high, low , bar_index, bar_index, 0, 1, na, bar_index)
if draw
bldw.unshift(drawms.new(time, time, high , "CHoCH" , upcss, line.style_dashed))
brdw.unshift(drawms.new(time, time, low , "CHoCH" , dncss, line.style_dashed))
ms.upsweep := false
ms.dnsweep := false
if ms.start == 1
switch
low <= ms.choch and close >= ms.choch and buildsweep =>
ms.dnsweep := true
ms.choch := low
ms.xloc := bar_index
if draw
dw = brdw.get(0)
dw.x2 := time
dw.style := line.style_dotted
dw.txt := "x"
brdw.unshift(
drawms.new(
time
, time
, low
, "CHoCH"
, dncss
, line.style_dashed
)
)
high >= ms.bos and close <= ms.bos and buildsweep =>
ms.upsweep := true
ms.bos := high
ms.xloc := bar_index
if draw
dw = bldw.get(0)
dw.x2 := time
dw.style := line.style_dotted
dw.txt := "x"
bldw.unshift(
drawms.new(
time
, time
, high
, "CHoCH"
, upcss
, line.style_dashed
)
)
close <= ms.choch =>
ms.txt := "choch"
lc.start := true
lc.count := 0
blob.fnOB(true, topP, idbull)
ms.trend := -1
ms.choch := ms.bos
ms.bos := na
ms.start := 2
ms.loc := bar_index
ms.main := low
ms.temp := ms.loc
ms.xloc := bar_index
if draw
dw = brdw.get(0)
dw.x2 := time
dw.style := internal ? line.style_dashed : line.style_solid
close >= ms.bos =>
ms.txt := "choch"
lc.start := true
lc.count := 0
brob.fnOB(false, btmP, idbear)
ms.trend := 1
ms.choch := ms.choch
ms.bos := na
ms.start := 2
ms.loc := bar_index
ms.main := high
ms.temp := ms.loc
ms.xloc := bar_index
if draw
dw = bldw.get(0)
dw.x2 := time
dw.style := internal ? line.style_dashed : line.style_solid
if ms.start == 2
switch ms.trend
-1 =>
if low <= ms.main
ms.main := low
ms.temp := bar_index
if bar_index % mslen * 2 == 0
if not na(ms.bos) and msmode == "Adjusted Points" and php.size() > 0
if php.get(0) < ms.choch
// ms.xloc := phn.get(0)
ms.choch := php.get(0)
ms.loc := phn.get(0)
ms.xloc := phn.get(0)
ms.temp := phn.get(0)
if draw
choch = bldw.get(0)
choch.x1 := time
choch.x2 := time
choch.y := php.get(0)
if na(ms.bos)
if crossup and close > open and close > open
ms.bos := ms.main
ms.loc := ms.temp
ms.xloc := ms.loc
if draw
brdw.unshift(
drawms.new(
time
, time
, low
, "BOS"
, dncss
, line.style_dashed
)
)
if not na(ms.bos) and draw
dw = brdw.get(0)
dw.x2 := time
if draw
choch = bldw.get(0)
choch.x2 := time
switch
low <= ms.bos and close >= ms.bos and not na(ms.bos) and buildsweep =>
ms.dnsweep := true
ms.bos := low
if draw
dw = brdw.get(0)
dw.x2 := time
dw.style := line.style_dotted
dw.txt := "x"
brdw.unshift(
drawms.new(
time
, time
, low
, "BOS"
, dncss
, line.style_dashed
)
)
ms.xloc := bar_index
close <= ms.bos and not na(ms.bos) =>
ms.txt := "bos"
ms.zz := ms.bos
ms.zn := bar_index
lc.start := true
lc.count := 0
brob.fnOB(false, btmP, idbear)
id = ms.find(true, false, false)
ms.xloc := bar_index
ms.bos := na
ms.choch := high
ms.loc := bar_index
if draw
dw = brdw.get(0)
dw.x2 := time
dw.style := internal ? line.style_dashed : line.style_solid
choch = bldw.get(0)
choch.x1 := time
choch.x2 := time
choch.y := high
switch
high >= ms.choch and close <= ms.choch and buildsweep =>
ms.upsweep := true
ms.choch := high
ms.xloc := bar_index
if draw
dw = bldw.get(0)
dw.x2 := time
dw.style := line.style_dotted
dw.txt := "x"
bldw.unshift(
drawms.new(
time
, time
, high
, "CHoCH"
, upcss
, line.style_dashed
)
)
close >= ms.choch =>
ms.txt := "choch"
ms.zz := ms.choch
ms.zn := bar_index
lc.start := true
lc.count := 0
blob.fnOB(true, topP, idbull)
id = ms.find(false, false, false)
switch
na(ms.bos) =>
ms.choch := low
if draw
brdw.unshift(
drawms.new(
time
, time
, low
, "BOS"
, dncss
, line.style_dashed
)
)
choch = brdw.get(0)
choch.x1 := time
=> ms.choch := ms.bos//low < low ? low : low
ms.bos := na
ms.main := high
ms.trend := 1
ms.loc := bar_index
ms.xloc := bar_index
ms.temp := ms.loc
if draw
dw = bldw.get(0)
dw.x2 := time
dw.txt := "CHoCH"
dw.style := internal ? line.style_dashed : line.style_solid
choch = brdw.get(0)
choch.x2 := time
choch.y := ms.choch
choch.txt := "CHoCH"
ms.xloc := bar_index
blarea.normal := false
1 =>
if high >= ms.main
ms.main := high
ms.temp := bar_index
if na(ms.bos)
if crossdn and close < open and close < open
ms.bos := ms.main
ms.loc := ms.temp
ms.xloc := ms.loc
if draw
bldw.unshift(
drawms.new(
time
, time
, high
, "BOS"
, upcss
, line.style_dashed
)
)
if bar_index % mslen * 2 == 0
if not na(ms.bos) and msmode == "Adjusted Points" and plp.size() > 0
if plp.get(0) > ms.choch
// ms.xloc := pln.get(0)
ms.choch := plp.get(0)
ms.loc := pln.get(0)
ms.xloc := pln.get(0)
ms.temp := pln.get(0)
// ms.loc := pln.get(0)
if draw
choch = brdw.get(0)
choch.x1 := time
choch.x2 := time
choch.y := plp.get(0)
if not na(ms.bos) and draw
dw = bldw.get(0)
dw.x2 := time
if draw
choch = brdw.get(0)
choch.x2 := time
switch
high >= ms.bos and close <= ms.bos and not na(ms.bos) and buildsweep =>
ms.upsweep := true
ms.bos := high
if draw
dw = bldw.get(0)
dw.x2 := time
dw.style := line.style_dotted
dw.txt := "x"
bldw.unshift(
drawms.new(
time
, time
, high
, "BOS"
, upcss
, line.style_dashed
)
)
ms.xloc := bar_index
close >= ms.bos and not na(ms.bos) =>
ms.txt := "bos"
ms.zz := ms.bos
ms.zn := bar_index
lc.start := true
lc.count := 0
blob.fnOB(true, topP, idbull)
id = ms.find(false, false, false)
ms.xloc := bar_index
ms.bos := na
ms.choch := low
ms.loc := bar_index
if draw
dw = bldw.get(0)
dw.x2 := time
dw.style := internal ? line.style_dashed : line.style_solid
choch = brdw.get(0)
choch.x1 := time
choch.x2 := time
choch.y := low
switch
low <= ms.choch and close >= ms.choch and buildsweep =>
ms.dnsweep := true
ms.choch := low
ms.xloc := bar_index
if draw
dw = brdw.get(0)
dw.x2 := time
dw.style := line.style_dotted
dw.txt := "x"
brdw.unshift(
drawms.new(
time
, time
, low
, "CHoCH"
, dncss
, line.style_dashed
)
)
close <= ms.choch =>
ms.txt := "choch"
ms.zz := ms.choch
ms.zn := bar_index
lc.start := true
lc.count := 0
brob.fnOB(false, btmP, idbear)
id = ms.find(true, false, false)
switch
na(ms.bos) =>
ms.choch := high
if draw
bldw.unshift(
drawms.new(
time
, time
, high
, "BOS"
, upcss
, line.style_dashed
)
)
choch = bldw.get(0)
choch.x1 := time
=> ms.choch := ms.bos//high > high ? high : high
ms.bos := na
ms.main := low
ms.trend := -1
ms.loc := bar_index
ms.temp := ms.loc
if draw
dw = brdw.get(0)
dw.x2 := time
dw.txt := "CHoCH"
dw.style := internal ? line.style_dashed : line.style_solid
choch = bldw.get(0)
choch.y := ms.choch
choch.x2 := time
choch.txt := "CHoCH"
ms.xloc := bar_index
if blob.size() > 0
ob = blob.get(0)
if not ob.isbb
if low < ob.top
if blobenter.normal == false
blobenter.normal := true
else
if high > ob.btm
if blobenter.breaker == false
blobenter.breaker := true
if brob.size() > 0
ob = brob.get(0)
if not ob.isbb
if high > ob.btm
if brobenter.normal == false
brobenter.normal := true
else
if low < ob.top
if brobenter.breaker == false
brobenter.breaker := true
if obshow and oblast > 0
if barstate.isconfirmed
blob.mitigated()
brob.mitigated()
if overlap
overlap(blob, brob)
if blob.size() > 0
for in blob
metric.umt()
if brob.size() > 0
for in brob
metric.umt()
if barstate.islast
if blob.size() > 0
for i = 0 to math.min(oblast - 1, blob.size() - 1)
obs = blob.get(i)
display(obs, blob, i)
if brob.size() > 0
for i = 0 to math.min(oblast - 1, brob.size() - 1)
obs = brob.get(i)
display(obs, brob, i)
if barstate.islast and draw and bldw.size() > 0 and brdw.size() > 0
for i = 0 to bldw.size() - 1
obj = bldw.get(i)
if i <= limit
bin.ln.unshift(
line.new(
x1 = obj.x1
, x2 = obj.x2
, y1 = obj.y
, y2 = obj.y
, color = obj.css
, style = obj.style
, xloc = xloc.bar_time
)
)
bin.lb.unshift(
label.new(
x = int(math.avg(bin.ln.get(0).get_x1(), bin.ln.get(0).get_x2()))
, y = obj.y
, xloc = xloc.bar_time
, color = #ffffff00
, style = label.style_label_down
, textcolor = obj.css
, size = mstext.txSz()
, text = obj.txt
)
)
if msbubble
bin.lb.unshift(
label.new(
x = obj.x1
, y = obj.y
, xloc = xloc.bar_time
, color = color.new(obj.css, 80)
, style = label.style_circle
, size = size.tiny
)
)
for i = 0 to brdw.size() - 1
obj = brdw.get(i)
if i <= limit
bin.ln.unshift(
line.new(
x1 = obj.x1
, x2 = obj.x2
, y1 = obj.y
, y2 = obj.y
, color = obj.css
, style = obj.style
, xloc = xloc.bar_time
)
)
bin.lb.unshift(
label.new(
x = int(math.avg(bin.ln.get(0).get_x1(), bin.ln.get(0).get_x2()))
, y = obj.y
, xloc = xloc.bar_time
, color = #ffffff00
, style = label.style_label_up
, textcolor = obj.css
, size = mstext.txSz()
, text = obj.txt
)
)
if msbubble
bin.lb.unshift(
label.new(
x = obj.x1
, y = obj.y
, xloc = xloc.bar_time
, color = color.new(obj.css, 80)
, style = label.style_circle
, size = size.tiny
)
)
ms
//}
_ ='
------------
–––––––––––––––––––––––––– EXECUTION –––––––––––––––––––––––––––
------------ '//{
structure ms = na
if windowsis
if (bar_index > last_bar_index - mswindow)
ms := structure(swingcssup , swingcssdn , showSwing , false, swingLimit)
if windowsis == false
ms := structure(swingcssup , swingcssdn , showSwing , false, swingLimit)
// if showInternal and inZone
// structure ims = structure(interncssup, interncssdn, showInternal, true , swingLimit)
color css = na
method darkcss(color css, float factor) =>
blue = color.b(css) * (1 - factor)
red = color.r(css) * (1 - factor)
green = color.g(css) * (1 - factor)
color.rgb(red, green, blue, 0)
if windowsis ? (bar_index > last_bar_index - mswindow) : true
css := ms.trend == 1 ? swingcssup : swingcssdn
css := (ms.txt == "bos" ? css : css.darkcss(0.3))
barcolor(candlecss ? css : na)
if fvg_enable
dFVG()
if showMapping
mapping()
var phl = Zphl.new(
na
, na
, label.new(na , na , color = invcol , textcolor = swingcssdn , style = label.style_label_down , size = size.tiny , text = "")
, label.new(na , na , color = invcol , textcolor = swingcssup , style = label.style_label_up , size = size.tiny , text = "")
, true
, true
, true
, true
, ""
, ""
, 0
, 0
, 0
, 0
, high
, low
, 0
, 0
, 0
, 0
, 0
, 0
, na
, na
)
// إعدادات تفعيل/تعطيل وتخصيص لكل مستوى فيبوناتشي
// حساب آخر قمة وقاع محوري
int fib_pivot_len = 5
ph = ta.pivothigh(high, fib_pivot_len, fib_pivot_len)
pl = ta.pivotlow(low, fib_pivot_len, fib_pivot_len)
var float last_high = na
var int last_high_x = na
var float last_low = na
var int last_low_x = na
if not na(ph)
last_high := high
last_high_x := bar_index - fib_pivot_len
if not na(pl)
last_low := low
last_low_x := bar_index - fib_pivot_len
var float fib_top = na
var float fib_bottom = na
var int fib_x1 = na
var int fib_x2 = na
if not na(last_high) and not na(last_low)
if last_high_x > last_low_x
fib_top := last_high
fib_bottom := last_low
fib_x1 := last_low_x
fib_x2 := last_high_x
else
fib_top := last_high
fib_bottom := last_low
fib_x1 := last_high_x
fib_x2 := last_low_x
var line fib_lines_pivot = array.new()
var label fib_labels_pivot = array.new()
if not na(fib_top) and not na(fib_bottom) and not na(fib_x1) and not na(fib_x2)
if barstate.islast
// حذف الخطوط والليبلات القديمة
for l in fib_lines_pivot
l.delete()
fib_lines_pivot.clear()
for lb in fib_labels_pivot
lb.delete()
fib_labels_pivot.clear()
// ...existing code...
fib_vals = array.from(0.0, 0.236, 0.382, 0.5, 0.618, 0.786, 1.0, 1.272, 1.618, 1.80, 2.0, 2.272, 2.618)
fib_shows = array.from(show_fib_0, show_fib_236, show_fib_382, show_fib_5, show_fib_618, show_fib_786, show_fib_1, show_fib_1272, show_fib_1618, show_fib_180, show_fib_2, show_fib_2272, show_fib_2618)
fib_colors = array.from(fib_color_0, fib_color_236, fib_color_382, fib_color_5, fib_color_618, fib_color_786, fib_color_1, fib_color_1272, fib_color_1618, fib_color_180, fib_color_2, fib_color_2272, fib_color_2618)
fib_texts = array.from("0.0", "23.6%", "38.2%", "50.0%", "61.8%", "78.6%", "100%", "127.2%", "161.8%", "180%", "200%", "227.2%", "261.8%")
// عند رسم الخطوط والليبلات:
for i = 0 to array.size(fib_vals) - 1
level_val = array.get(fib_vals, i)
level_show = array.get(fib_shows, i)
level_color = array.get(fib_colors, i)
level_txt = array.get(fib_texts, i)
if level_show
price = fib_bottom + (fib_top - fib_bottom) * level_val
l = line.new(x1=fib_x1, y1=price, x2=fib_x2 + fib_shift, y2=price, color=level_color, width=1, style=line.style_dotted, xloc=xloc.bar_index)
array.push(fib_lines_pivot, l)
lb = label.new(x=fib_x2 + fib_shift, y=price, text=level_txt + " | " + str.tostring(price, format.mintick), color=#ffffff00, textcolor=level_color, size=fib_size, style=label.style_label_left, xloc=xloc.bar_index)
array.push(fib_labels_pivot, lb)
London & NY Session Markers + Pip MovementThis indicator visually marks the London and New York trading sessions on your chart and optionally calculates the pip range (high-low movement) during each session. It's specifically designed for Forex traders, helping you identify volatility windows and analyze market movement within major session times.
🔍 Key Features:
✅ Session Open/Close Markers
Draws vertical dotted lines at:
London Open (08:00 UK time)
London Close (11:00 UK time)
New York Open (14:00 UK time)
New York Close (17:00 UK time)
Each marker is labeled clearly ("London Open", "NY Close", etc.)
Uses color-coding for easy identification:
Aqua for London
Lime for New York
✅ Pip Range Display (Optional)
Measures the high-low price movement during each session.
Converts this movement into pips, using:
0.0001 pip size for most pairs
0.01 pip size for JPY pairs (auto-detected)
Displays a label (e.g., "London: 42.5 pips") above the candle at session close.
This feature can be toggled on/off via the settings panel.
✅ Time-Zone Aware
Session times are aligned to Europe/London time zone.
Adjusts automatically for Daylight Saving Time (DST).
✅ User Controls
Toggle visibility for:
London session markers
New York session markers
Pip range labels
📊 Use Cases:
Identify when liquidity and volatility increase, especially during session overlaps.
Analyze historical session-based volatility (e.g., compare NY vs. London pip ranges).
Combine with price action or indicator signals that work best in high-volume hours.
Optimize entry and exit timing based on session structure.
⚙️ Best Timeframes:
5-min to 1-hour charts for precise session tracking.
Works on Forex and CFD pairs with standard tick sizes.
⚠️ Notes:
This tool does not repaint and uses only completed bar data.
Pip calculation is based on the chart’s current symbol and tick size.
Designed for spot FX, not intended for cryptocurrencies or synthetic indices.
✅ Ideal For:
Forex Day Traders
Session-based Strategy Developers
London Breakout or NY Reversal Traders
Anyone analyzing volatility by session windows