Cari dalam skrip untuk "session"
VPOC [cem_trades]Session-Based Volume POC with Naked VPOC Visualization
This indicator dynamically calculates and visualizes the Volume Point of Control (VPOC) — the price level with the highest traded volume — for custom, user-defined session windows (e.g., 60-minute, 120-minute, or any other interval). Unlike standard VPOC indicators that rely on fixed sessions (daily, weekly, etc.), this tool allows you to define granular intra-session ranges, giving greater flexibility and precision in volume profile analysis.
In addition to current VPOCs, the indicator also highlights "naked" VPOCs — past VPOC levels that have not yet been revisited by price — which are commonly used to identify high-probability reaction zones. These levels often act as powerful support or resistance areas in both intraday and swing trading contexts.
Key Features:
Fully adjustable session length and time zone configuration
Supports RTH/ETH market hours
Naked VPOCs are clearly marked for visibility and strategic planning
Compatible with any asset and timeframe
This script is invite-only due to its unique implementation of dynamic session logic, which is not available in existing open-source versions.
To use:
Select your desired session duration (e.g., 90min)
Choose your time zone and trading hours (RTH or ETH)
Observe real-time VPOC shifts and naked VPOC levels on your chart
A clean chart is recommended for full visibility of levels. No external indicators are required for operation.
timer/tr/atr [keypoems]Session and Instant Volatility Ticker
What it actually does:
- Session ATR – Reports the historical (e.g. “0200-0600”) average true range of the past x sessions, reports the +1Stdev value.
- Real-time ATR feed – streams the current ATR value every tick.
- Ticker line – Sess. ATR +1Stdev | Current ATR | Previous TR | 🕒 Time-left-in-bar |
Think of it as a volatility check: a single glance tells you if the average candle size is compatible with your usual stop or not.
Open Source.
Sessions High/LowIndicator lines to show the prior days NY high/low, overnight Asian high/low, and recent London high/low. Time frame variables are included as well as the option to change colors for both the high and low. Good luck.
Sessions Rainbow EST with overlapsThis script displays the trading zones with overlaps based on the color of the rainbow. It is used with a Point&Figure chart to show trends associated with trading periods and overlapping trading periods.
Sessions - London NY overlapOther scripts show London closing at 5pm GMT whereas i believe the forex market on London closes at 4pm GMT. So i have adjusted an already published script to reflect this
Session Moving AveragesAdds EMAs and SMAs to chart using 8am-8pm EST values. Completely configurable in settings.
Some platforms allow users to configure what time frame they would like to view market data. One popular selection is 8am-8pm EST as 8am is when institutional orders go through. An argument can be made that price action before 8am EST is not valid yet moving averages will use that data.
This matters less for shorter moving averages such as a 9 or 20 ema, but it dramatically changes the 200 or the 50 sma for example.
This script allows you to ignore that pre-market data (or any data you choose to configure in the settings) and select up to 3 moving averages (either Exponential or Simple) for a set time.
By default the moving averages include the 9-ema (gray), 20-ema (green), and 200-sma (purple) and is set to 8am-8pm EST
This is configurable in the settings including the time frame you would like the moving averages to start using market data.
By default the script will use your charts timeframe. You are able to use multi-time frames with this script just scroll down to "timeframe", then click "chart" in settings... this will then allow you to select a timeframe.
A popular choice is 5-minute value of 8am-8pm EST moving averages. This means regardless of the time frame you are on (sub 1-minute, 1-minute, etc.) the script will display 5-minute data.
Final note: In settings you are able to turn on/off shapes (the gray lines at the bottom) which shows when the data is being used. This can be helpful on certain tickers that trade continuously such as /ES or /NQ.
Session Time RangesHave you ever wondered if you are trading at the right time of the day or feel like all the good trades happen when you are sleeping? Well now you can check your theory :)
This Script allows you to highlight a time range on your chart over a 24hour time period. For example 3AM to 6AM
The script has two time variables, set your start time and end time based on a 24 hour clock and set the time zone offset variable to match your charts time zone. For example New York -4 (for utc just enter 0 for no offset )
This is a quick script I put together so hopefully it is error free enjoy :)
Session Trader2This is the second version of our work on developing signals for day trading stock index futures. In addition to finding signals that trade with the trend this script also looks for key reversal points during the day so that traders can now trade both ways. The signals are designed to operate on an intraday basis and have holding periods of 30 minutes or less. The script uses price action only as its signal generation trades rather than relying upon lagging indicator data. For info on how to obtain this scrip please see our signature file or message us directly on TV. We would be happy to show you.
Session P4L MTFCorrected indicator for better support of smaller time frames. version 3.0 with better interface. thank you
Session P EdgesThis is an attempt to chart the primary balance ranges, however,
I have been having difficulty getting the lows to work in the graph, any assistance would be welcome
Forever Model [Pro+] (Sniper) Blueprint//@version=5
indicator("Forever Model Replica", overlay=true, dynamic_requests=true)
// Inputs
nasdaq = input.string("NASDAQ:NDX", "Nasdaq Symbol")
dow = input.string("DJ:DJI", "Dow Jones Symbol")
sp500 = input.string("SP:SPX", "S&P 500 Symbol")
fvg_min_range = input.float(0.5, "Min FVG Range (% of ATR)", minval=0.1)
bias = input.string("Neutral", "Directional Bias", options= )
session_filter = input.bool(true, "Filter by US Session (9 AM–5 PM UTC)")
start_hour = input.int(9, "Start Hour (UTC)", minval=0, maxval=23)
end_hour = input.int(17, "End Hour (UTC)", minval=0, maxval=23)
// ATR and Time Filter
atr = ta.atr(14)
in_time_window = not session_filter or (hour >= start_hour and hour <= end_hour)
// Arrays for active zones (FVGs and OBs)
var active_tops = array.new_float(0)
var active_bottoms = array.new_float(0)
var active_types = array.new_string(0)
var active_boxes = array.new_box(0)
// Pre-fetch price data for 14 bars for each timeframe
var float high_series_1h = array.new_float(14)
var float low_series_1h = array.new_float(14)
var float high_series_4h = array.new_float(14)
var float low_series_4h = array.new_float(14)
var float high_series_d = array.new_float(14)
var float low_series_d = array.new_float(14)
array.set(high_series_1h, 0, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 0, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 1, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 1, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 2, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 2, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 3, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 3, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 4, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 4, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 5, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 5, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 6, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 6, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 7, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 7, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 8, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 8, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 9, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 9, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 10, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 10, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 11, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 11, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 12, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 12, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 13, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 13, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 0, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 0, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 1, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 1, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 2, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 2, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 3, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 3, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 4, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 4, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 5, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 5, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 6, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 6, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 7, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 7, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 8, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 8, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 9, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 9, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 10, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 10, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 11, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 11, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 12, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 12, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 13, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 13, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 0, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 0, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 1, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 1, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 2, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 2, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 3, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 3, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 4, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 4, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 5, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 5, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 6, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 6, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 7, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 7, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 8, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 8, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 9, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 9, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 10, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 10, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 11, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 11, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 12, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 12, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 13, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 13, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
// Manual ATR calculation function (simplified for 14 periods)
manual_atr(high_series, low_series) =>
var float tr_sum = 0.0
for i = 0 to 13
high_prev = nz(array.get(high_series, i + 1), array.get(high_series, i))
low_prev = nz(array.get(low_series, i + 1), array.get(low_series, i))
tr = math.max(array.get(high_series, i), high_prev) - math.min(array.get(low_series, i), low_prev)
tr_sum := tr_sum + tr
tr_sum / 14 // Average True Range over 14 periods
// FVG Detection for Higher Timeframes (1H, 4H, D)
// 1H (60 minutes)
atr_1h = manual_atr(high_series_1h, low_series_1h)
low_1h = request.security(syminfo.tickerid, "60", low, lookahead=barmerge.lookahead_on)
high_1h = request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on)
close_1h = request.security(syminfo.tickerid, "60", close , lookahead=barmerge.lookahead_on)
open_1h = request.security(syminfo.tickerid, "60", open , lookahead=barmerge.lookahead_on)
low_1h_bear = request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on)
high_1h_bear = request.security(syminfo.tickerid, "60", high, lookahead=barmerge.lookahead_on)
fvg_bull_1h = low_1h > high_1h and close_1h > open_1h and (low_1h - high_1h) >= fvg_min_range * atr_1h and (low_1h - high_1h) > 0
fvg_bear_1h = high_1h_bear < low_1h_bear and close_1h < open_1h and (low_1h_bear - high_1h_bear) >= fvg_min_range * atr_1h and (low_1h_bear - high_1h_bear) > 0
new_fvg_bull_1h = fvg_bull_1h and not fvg_bull_1h
new_fvg_bear_1h = fvg_bear_1h and not fvg_bear_1h
if new_fvg_bull_1h and in_time_window and (bias == "Bullish" or bias == "Neutral") and barstate.isconfirmed
array.push(active_tops, low_1h)
array.push(active_bottoms, high_1h)
array.push(active_types, "fvg_bullish")
new_box = box.new(left=bar_index, top=low_1h, right=bar_index+10, bottom=high_1h, bgcolor=color.new(color.green, 80))
array.push(active_boxes, new_box)
if new_fvg_bear_1h and in_time_window and (bias == "Bearish" or bias == "Neutral") and barstate.isconfirmed
array.push(active_tops, low_1h_bear)
array.push(active_bottoms, high_1h_bear)
array.push(active_types, "fvg_bearish")
new_box = box.new(left=bar_index, top=low_1h_bear, right=bar_index+10, bottom=high_1h_bear, bgcolor=color.new(color.red, 80))
array.push(active_boxes, new_box)
// 4H (240 minutes)
atr_4h = manual_atr(high_series_4h, low_series_4h)
low_4h = request.security(syminfo.tickerid, "240", low, lookahead=barmerge.lookahead_on)
high_4h = request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on)
close_4h = request.security(syminfo.tickerid, "240", close , lookahead=barmerge.lookahead_on)
open_4h = request.security(syminfo.tickerid, "240", open , lookahead=barmerge.lookahead_on)
low_4h_bear = request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on)
high_4h_bear = request.security(syminfo.tickerid, "240", high, lookahead=barmerge.lookahead_on)
fvg_bull_4h = low_4h > high_4h and close_4h > open_4h and (low_4h - high_4h) >= fvg_min_range * atr_4h and (low_4h - high_4h) > 0
fvg_bear_4h = high_4h_bear < low_4h_bear and close_4h < open_4h and (low_4h_bear - high_4h_bear) >= fvg_min_range * atr_4h and (low_4h_bear - high_4h_bear) > 0
new_fvg_bull_4h = fvg_bull_4h and not fvg_bull_4h
new_fvg_bear_4h = fvg_bear_4h and not fvg_bear_4h
if new_fvg_bull_4h and in_time_window and (bias == "Bullish" or bias == "Neutral") and barstate.isconfirmed
array.push(active_tops, low_4h)
array.push(active_bottoms, high_4h)
array.push(active_types, "fvg_bullish")
new_box = box.new(left=bar_index, top=low_4h, right=bar_index+10, bottom=high_4h, bgcolor=color.new(color.green, 80))
array.push(active_boxes, new_box)
if new_fvg_bear_4h and in_time_window and (bias == "Bearish" or bias == "Neutral") and barstate.isconfirmed
array.push(active_tops, low_4h_bear)
array.push(active_bottoms, high_4h_bear)
array.push(active_types, "fvg_bearish")
new_box = box.new(left=bar_index, top=low_4h_bear, right=bar_index+10, bottom=high_4h_bear, bgcolor=color.new(color.red, 80))
array.push(active_boxes, new_box)
// Daily (D)
atr_d = manual_atr(high_series_d, low_series_d)
low_d = request.security(syminfo.tickerid, "D", low, lookahead=barmerge.lookahead_on)
high_d = request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on)
close_d = request.security(syminfo.tickerid, "D", close , lookahead=barmerge.lookahead_on)
open_d = request.security(syminfo.tickerid, "D", open , lookahead=barmerge.lookahead_on)
low_d_bear = request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on)
high_d_bear = request.security(syminfo.tickerid, "D", high, lookahead=barmerge.lookahead_on)
fvg_bull_d = low_d > high_d and close_d > open_d and (low_d - high_d) >= fvg_min_range * atr_d and (low_d - high_d) > 0
fvg_bear_d = high_d_bear < low_d_bear and close_d < open_d and (low_d_bear - high_d_bear) >= fvg_min_range * atr_d and (low_d_bear - high_d_bear) > 0
new_fvg_bull_d = fvg_bull_d and not fvg_bull_d
new_fvg_bear_d = fvg_bear_d and not fvg_bear_d
if new_fvg_bull_d and in_time_window and (bias == "Bullish" or bias == "Neutral") and barstate.isconfirmed
array.push(active_tops, low_d)
array.push(active_bottoms, high_d)
array.push(active_types, "fvg_bullish")
new_box = box.new(left=bar_index, top=low_d, right=bar_index+10, bottom=high_d, bgcolor=color.new(color.green, 80))
array.push(active_boxes, new_box)
if new_fvg_bear_d and in_time_window and (bias == "Bearish" or bias == "Neutral") and barstate.isconfirmed
array.push(active_tops, low_d_bear)
array.push(active_bottoms, high_d_bear)
array.push(active_types, "fvg_bearish")
new_box = box.new(left=bar_index, top=low_d_bear, right=bar_index+10, bottom=high_d_bear, bgcolor=color.new(color.red, 80))
array.push(active_boxes, new_box)
// FVG Detection for Current Timeframe (15M)
gap_bull_15m = low - high
gap_bear_15m = low - high
fvg_bull_15m = low > high and close > open and gap_bull_15m >= fvg_min_range * atr and gap_bull_15m > 0 and barstate.isconfirmed
fvg_bear_15m = high < low and close < open and gap_bear_15m >= fvg_min_range * atr and gap_bear_15m > 0 and barstate.isconfirmed
if fvg_bull_15m and in_time_window and (bias == "Bullish" or bias == "Neutral")
array.push(active_tops, low)
array.push(active_bottoms, high )
array.push(active_types, "fvg_bullish")
new_box = box.new(left=bar_index, top=low, right=bar_index+10, bottom=high , bgcolor=color.new(color.green, 80))
array.push(active_boxes, new_box)
if fvg_bear_15m and in_time_window and (bias == "Bearish" or bias == "Neutral")
array.push(active_tops, low )
array.push(active_bottoms, high)
array.push(active_types, "fvg_bearish")
new_box = box.new(left=bar_index, top=low , right=bar_index+10, bottom=high, bgcolor=color.new(color.red, 80))
array.push(active_boxes, new_box)
// OB Detection for Current Timeframe (15M)
htf_sweep_bull = request.security(syminfo.tickerid, "60", low < low and close > high , lookahead=barmerge.lookahead_on)
htf_sweep_bear = request.security(syminfo.tickerid, "60", high > high and close < low , lookahead=barmerge.lookahead_on)
is_bull_ob = low < low and close > open and close > high and htf_sweep_bull and barstate.isconfirmed
is_bear_ob = high > high and close < open and close < low and htf_sweep_bear and barstate.isconfirmed
if is_bull_ob and in_time_window and (bias == "Bullish" or bias == "Neutral")
array.push(active_tops, high)
array.push(active_bottoms, low)
array.push(active_types, "ob_bullish")
new_box = box.new(left=bar_index, top=high, right=bar_index+10, bottom=low, bgcolor=color.new(color.blue, 80))
array.push(active_boxes, new_box)
if is_bear_ob and in_time_window and (bias == "Bearish" or bias == "Neutral")
array.push(active_tops, high)
array.push(active_bottoms, low)
array.push(active_types, "ob_bearish")
new_box = box.new(left=bar_index, top=high, right=bar_index+10, bottom=low, bgcolor=color.new(color.orange, 80))
array.push(active_boxes, new_box)
// SMT Divergence Detection
nasdaq_l = request.security(nasdaq, "15", low, lookahead=barmerge.lookahead_on)
nasdaq_h = request.security(nasdaq, "15", high, lookahead=barmerge.lookahead_on)
dow_l = request.security(dow, "15", low, lookahead=barmerge.lookahead_on)
dow_h = request.security(dow, "15", high, lookahead=barmerge.lookahead_on)
sp500_l = request.security(sp500, "15", low, lookahead=barmerge.lookahead_on)
sp500_h = request.security(sp500, "15", high, lookahead=barmerge.lookahead_on)
bull_div_n = low < low and nasdaq_l > nasdaq_l
bull_div_d = low < low and dow_l > dow_l
bull_div_s = low < low and sp500_l > sp500_l
bear_div_n = high > high and nasdaq_h < nasdaq_h
bear_div_d = high > high and dow_h < dow_h
bear_div_s = high > high and sp500_h < sp500_h
div_count_bull = (bull_div_n ? 1 : 0) + (bull_div_d ? 1 : 0) + (bull_div_s ? 1 : 0)
div_count_bear = (bear_div_n ? 1 : 0) + (bear_div_d ? 1 : 0) + (bear_div_s ? 1 : 0)
smt_bull = div_count_bull >= 2 and in_time_window and (bias == "Bullish" or bias == "Neutral") and barstate.isconfirmed
smt_bear = div_count_bear >= 2 and in_time_window and (bias == "Bearish" or bias == "Neutral") and barstate.isconfirmed
plotshape(smt_bull, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small)
plotshape(smt_bear, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small)
// Mitigation Logic for Active Zones
for i = array.size(active_tops) - 1 to 0
type = array.get(active_types, i)
top = array.get(active_tops, i)
bottom = array.get(active_bottoms, i)
if (type == "fvg_bullish" and close < bottom) or (type == "fvg_bearish" and close > top) or (type == "ob_bullish" and close < bottom) or (type == "ob_bearish" and close > top)
box.delete(array.get(active_boxes, i))
array.remove(active_tops, i)
array.remove(active_bottoms, i)
array.remove(active_types, i)
array.remove(active_boxes, i)
// Array Size Limit
if array.size(active_boxes) > 50
box.delete(array.get(active_boxes, 0))
array.remove(active_tops, 0)
array.remove(active_bottoms, 0)
array.remove(active_types, 0)
array.remove(active_boxes, 0)
// Alerts
alertcondition(fvg_bull_15m or fvg_bull_1h or fvg_bull_4h or fvg_bull_d, "Bullish FVG Detected", "Bullish FVG on {{ticker}}")
alertcondition(fvg_bear_15m or fvg_bear_1h or fvg_bear_4h or fvg_bear_d, "Bearish FVG Detected", "Bearish FVG on {{ticker}}")
alertcondition(is_bull_ob, "Bullish OB Detected", "Bullish OB on {{ticker}}")
alertcondition(is_bear_ob, "Bearish OB Detected", "Bearish OB on {{ticker}}")
alertcondition(smt_bull, "Bullish SMT Divergence", "Bullish SMT Divergence on {{ticker}}")
alertcondition(smt_bear, "Bearish SMT Divergence", "Bearish SMT Divergence on {{ticker}}")
ORB ALL TFs London A range is formed from the first 9:00 AM candle London Time.
Session opening is visualized with a background color.
The ORB (Opening Range Breakout) automatically adjusts to the current timeframe.
The indicator only displays the current session.
VWAP is displayed and resets/re-anchors at market open.
Gray lines mark pivot levels, showing where the ORB range doubles (1x, 2x, 3x).
Purpose: To identify 1:1 to 1:3 risk-reward zones for securing/taking profits on positions.
Key Features:
ORB based on London Open
Dynamic Timeframe Adjustment
Session-Specific Visualization
Auto-Resetting VWAP
Pivot Levels for Profit Targets (1x, 2x, 3x ORB Range)
Previous Day OHLC# Previous Day OHLC Levels Indicator
## Overview
The Previous Day OHLC indicator is a simple yet powerful tool that plots the Open, High, Low, and Close levels from previous trading sessions. This indicator helps traders identify key support and resistance levels based on historical price action, making it easier to spot potential reversal zones and breakout levels.
## Key Features
### 📊 **Previous Day OHLC Levels**
- Displays the Open, High, Low, and Close prices from 1-5 days ago
- Lines automatically extend to the right for easy visualization
- Updates daily to show the most relevant levels
### 🎨 **Fully Customizable Styling**
- **Individual Line Colors**: Choose unique colors for each OHLC level
- **Line Styles**: Select from Solid, Dashed, or Dotted lines for each level
- **Line Width**: Adjust thickness from 1-4 pixels for better visibility
- **Price Labels**: Display actual price values on each line with customizable sizing
### ⚙️ **Flexible Settings**
- **Lookback Period**: Choose to display levels from 1-5 days ago (maximum safety limit)
- **Label Control**: Toggle price labels on/off and adjust their size
- **Performance Optimized**: Clean code that won't slow down your charts
## How to Use
1. **Add to Chart**: Apply the indicator to any timeframe chart
2. **Customize Settings**: Adjust colors, styles, and lookback period to your preference
3. **Identify Levels**: Use the plotted lines as potential support/resistance zones
4. **Trade Setup**: Look for price reactions at these key levels for entry/exit signals
## Best Practices
- **Day Trading**: Use 1-day lookback for intraday support/resistance
- **Swing Trading**: Extend lookback to 2-5 days for broader context
- **Multi-Timeframe**: Combine with other timeframe analysis for confirmation
- **Risk Management**: Use these levels for stop-loss and take-profit placement
## Color Coding (Default)
- **Open**: Blue - Starting price of the previous session
- **High**: Green - Highest price reached
- **Low**: Red - Lowest price reached
- **Close**: Orange - Final price of the session
## Why This Indicator Works
Previous day OHLC levels are among the most watched price points by professional traders. These levels often act as:
- **Support/Resistance**: Price tends to react at these historical levels
- **Breakout Confirmation**: Strong moves beyond these levels can signal trend continuation
- **Reversal Zones**: Price often bounces from these key levels
- **Psychological Levels**: Market participants remember these important price points
## Technical Specifications
- **Pine Script Version**: v6
- **Overlay**: Yes (plots directly on price chart)
- **Performance**: Optimized for smooth chart operation
- **Compatibility**: Works on all timeframes and instruments
Perfect for traders of all experience levels who want to incorporate previous day levels into their technical analysis toolkit!
AMDX/XAMD indicatorThe AMDX/XAMD indicator is designed to highlight specific trading sessions on the chart using distinct colors and optional vertical lines. Users can choose between two session types, AMDX or XAMD, and customize the visual appearance of the sessions. This tool is particularly useful for traders who want to analyze market behavior during different trading periods.
Meaning of AMDX:
A: Accumulation
M: Manipulation
D: Distribution
X: Continuation Or Reversal
Features:
Session Highlighting:
AMDX Sessions: Split into four segments - A, M, D, X.
XAMD Sessions: Split into four segments - X, A, M, D.
Customizable Colors:
Choose individual colors for each session (A, M, D, X).
Adjust the transparency of the session boxes for better visual integration with the chart.
Drawing Styles:
Box Style: Draws colored boxes around the session ranges.
Line Style: Draws vertical lines at session start and end times.
Vertical Lines:
Option to enable or disable vertical lines at session boundaries.
Customizable line style: Solid, Dotted, or Dashed.
Session Labels:
Automatically labels each session for easy identification.
Customization Options:
Session Type: Select between AMDX and XAMD session types.
Colors: Set custom colors for each session and vertical lines.
Border Width: Adjust the width of the session box borders.
Transparency: Control the transparency level of the session boxes.
Drawing Style: Choose between Box and Line styles for session representation.
Vertical Lines: Enable or disable vertical lines and select the line style.
How It Works:
The indicator calculates the start and end times for each session based on the selected session type (AMDX or XAMD). It then draws either boxes or lines to highlight these sessions on the chart. The indicator also includes options to draw vertical lines at the session boundaries and labels each session with a corresponding letter (A, M, D, X).
Use Cases:
Market Session Analysis: Easily identify and analyze market behavior during different trading sessions.
Intraday Trading: Helps intraday traders to focus on specific time segments of the trading day.
Visual Segmentation: Provides a clear visual segmentation of the trading day, aiding in better decision-making.
Times for AMDX/XAMD session:
A Session: 18:00 (previous day) to 03:00 (current day)
M Session: 03:00 to 09:00
D Session: 09:00 to 12:00
X Session: 12:00 to 18:00
Time for the XAMD session :
X Session: 18:00 (previous day) to 00:00 (current day)
A Session: 00:00 to 09:00
M Session: 09:00 to 12:00
D Session: 12:00 to 18:00
Rango LØNNSOMThis is a TradingView indicator called "LØNNSOM Range" that is designed for analyzing forex trading sessions. I'll explain its main features:
Main Functionality
The indicator identifies and draws price ranges based on the highs and lows of different trading sessions:
Trading Sessions
New York Session: 7:30 - 11:30 (EST)
Asia Session: 7:30 - 11:30 (EST)
London Session: 2:00 - 5:00 (EST)
Visual Features
Background Coloring: Each session colors the chart background with customizable colors:
NY Session: Gray (default)
Asia Session: Blue (default)
London Session: Gray (default)
Range Lines: At the end of each session, the indicator draws three horizontal lines:
PSH (Previous Session High): High line
PSL (Previous Session Low): Low line
MR (Middle Range): Midpoint line
Calculation Logic
The indicator combines data from Sessions to create wider ranges:
At the end of the NY Session: Combines NY and London highs/lows
At the end of the Asian Session: Combines NY and Asian highs/lows
At the end of the London Session: Combines London and Asian highs/lows
Trading Application
This type of indicator is useful for:
Identifying support and resistance levels based on previous sessions
Analyzing market structure during different time periods
Planning entries and exits using PSH, PSL, and MR levels as a reference
Trading breakouts when the price breaks out of the established range
The lines extend forward in time, providing reference levels for subsequent sessions.