SessionBarThis PineScript is designed to display various visual elements on a chart to help traders track session activity within the lower time frames, specifically for the USA main session. Here's a breakdown of the script's functionality:
Session Tracking
The script tracks the USA main session, defined as 9:30 AM to 4:00 PM ET, Monday through Friday.
Visual Elements
The script displays various visual elements, including:
1. Session Open and Close Lines: Lines marking the open and close of the USA main session.
2. Session High and Low Lines: Lines marking the high and low of the USA sessions.
3. Active Session Bar: A Realtime Candle as the current session bar.
4. Overnight Session Bar: A Realtime Candle as the overnight session bar.
5. Session Timer: A label displaying the time left until the next session.
6. Background Colors: Colors indicating different session periods, such as pre-market, post-market, and active session.
Customization
The script allows users to customize various aspects, including:
1. Session Time: Users can adjust the session time.
2. Colors: Users can choose colors for different visual elements.
3. Display Options: Users can toggle the display of various visual elements.
Overall, this script provides a educational tool for traders to track session activity and visualize key market data.
Candlestick analysis
The GOAT Short/Long term D,M,W,QY, VWAP 3xrvol Vs 2🧠 Description:
This advanced tool is designed to detect high-probability turning points and continuation signals by combining:
Trend confirmation (via EMA)
Institutional positioning (via VWAP from multiple timeframes)
Volume conviction (via 3x RVOL detection)
Potential reversal warnings (via volume pressure drop)
It tracks both bullish and bearish confluences between price, a customizable EMA, and higher-timeframe VWAPs — offering exceptional clarity for intraday and swing traders.
🔀 VWAP Confluence Types:
🔹 Short-Term Confluences:
EMA + Session VWAP
EMA + Daily VWAP
EMA + Weekly VWAP
🔸 Long-Term Confluences:
EMA + Monthly VWAP
EMA + Quarterly VWAP
EMA + Yearly VWAP
Each setup has:
✅ Arrows (up/down)
✅ Background highlight (color-coded)
✅ Alerts for bullish/bearish crosses
📊 Volume Logic:
Volume Signal Trigger Condition Candle Paint Color
Bullish RVOL Volume > 3× average and candle is green 🔷 Aqua
Bearish RVOL Volume > 3× average and candle is red 🔴 Fuchsia
Volume Drop Reversal Current volume < 50% avg after RVOL spike 🟤 Dark Maroon
🔔 Alerts Built In:
Bullish/Bearish VWAP + EMA crosses for all 6 VWAP types
RVOL surge alert
Volume drop reversal alert
🧩 Customizable Features:
EMA Length
VWAP timeframe toggles (short vs. long)
All paint colors
RVOL + Volume drop thresholds
Floating chart legend (optional)
🎯 Best For:
Traders who want high-confluence, high-volume entry signals
Confirmation of breakouts or pullbacks
Detection of institutional activity across multiple timeframes
Spotting exhaustion or reversal zones with volume drop logic
simple scalpingHybrid Plus Scalping Pro is a scalping indicator designed for fast markets (BTC, Gold, Oil) on low timeframes (1–5 min).
It identifies momentum shifts using EMA crossovers (fast vs slow) and confirms trend direction with a longer-term moving average.
Once a signal is triggered, it calculates a defined entry, stop loss (0.5%), and three progressive take-profit levels (0.3%, 0.6%, 0.9%).
The script provides a clear visual table of these levels on the chart for easier execution.
Use it in trending market conditions to catch short-term momentum moves.
Note: This script does not include auto-trading logic or risk management; it’s intended as a visual scalping aid.
Burr 5 Minute SHASHA candles to show trend and also provide buy sell signals with volume spike 1.5%. Adjustable settings
Burr 5 MIN SHASmooth Heiken Ashi candles with Volume Spike setting to give accurate Buy and Sell Signals.
EZWay Trading FractalEZWay Trading Fractal
This is an indicator based on EZWay Trading to identify high and low points of the formation
Rango HAThis script calculates the range of Heikin-Ashi candles and offers a unique perspective on the expansion and contraction of the smoothed price. The "Range Scale" option allows users to adjust the indicator's sensitivity for backtesting and comparison with other indicators.
Display:
Dynamically colored columns indicate changes in the range compared to the previous candle, differentiating between bullish and bearish for momentum and gray columns for weakness or exhaustion.
Analytical examples:
In this case the price tries to cross a previous low but it does so with grey candles and divergence in the oscillator, this is a possible bullish scenario and all that remains is to wait for a signal such as a bullish engulfing candle with ascending columns.
Here, two hypothetical trades are observed using the same strategy. The price struggles to break and remain above a previous high. We observe divergence in the oscillator and gray or low dango candles in the price, followed by a bearish engulfing candle that acts as a trigger. The same thing works in reverse in the bullish example seen on the right.
Another case where engulfing candles act as triggers that indicate an increase in momentum after signs of weakness.
I recommend using this indicator in conjunction with price action, as seen above, to identify weak movements and the beginnings of strong movements, relative to previous highs and lows. I add candle colors relative to the oscillator bar size to improve the clarity of the price reading, but I don't add signals to avoid cluttering the price display. Furthermore, if the signals aren't used in conjunction with other key levels, it can lead to poor decisions.
All images shown are on the M1 timeframe, but everyone can use whatever they like.
I hope it helps. If you want to make any changes or additions, please feel free to request them in the comments.
Good luck with your trading!
ProfitFX full indicatorProfitFX персональный индикатор для правильной торговли по FVG!
Самое необходимое есть уже в нём.
- FVG
- Общая сессия для торговли
FVG имеет интересную особенность для проторговки!
_________________________________________________________________
ProfitFX personal indicator for correct trading on FVG!
The most necessary is already in it.
- FVG
- General session for trading
FVG has an interesting feature for trading!
asami.RSI T3-PMax### **1\. Overview**
**Indicator**: asami.PMax on RSI w T3 (Short: **PmR3**)
**Pane**: Separate (`overlay=false`)
**Goal**: Smooth classic RSI with Tillson T3, overlay ATR-based PMax stops, and highlight momentum shifts with built-in alerts.
### **2\. Code Breakdown**
1. **WWMA-Based RSI**
* Use weighted moving average on up/down moves (`avUp`, `avDown`) to compute `rsi = 100 - 100/(1 + avUp/avDown)`.
2. **ATR on RSI**
* Define true range (`tr`) from RSI high/low differences; compute `atr = sma(tr, periodsATR)`.
3. **Tillson T3 Smoothing**
* Concatenate six EMAs of length `lenT3`, then blend via coefficients derived from `T3a1` to form `mAvg`.
4. **PMax Stop Bands**
* `longStop = mAvg - multiplier * atr` and `shortStop = mAvg + multiplier * atr`.
* Enforce monotonic expansion and pick inner band based on trend direction `dir`.
5. **Signals & Alerts**
* `crossover(mAvg, pMax)` → Buy signal
* `crossunder(mAvg, pMax)` → Sell signal
* Additional alerts on price vs. PMax crosses.
### **3\. Inputs**
| Input Name | Default | Description |
| :---- | :---- | :---- |
| Source | hl2 | Base price series (e.g., (High+Low)/2) |
| ATR Multiplier | 3.0 | Width factor for PMax band |
| Tillson T3 Length | 8 | EMA chain length for T3 smoothing |
| TILLSON T3 Volume Factor | 0.7 | Blending factor for T3 smoothing |
| ATR Length | 10 | Period for ATR calculation |
| RSI Length | 14 | Period for RSI calculation |
| Show RSI? | true | Toggle RSI plot |
| Show Moving Average? | true | Toggle T3-RSI centerline |
| Show Crossing Signals? | true | Toggle Buy/Sell markers |
| Highlighter On/Off? | true | Toggle background color highlights (green/red) |
### **4\. Plots & Signals**
* **RSI \+ Bands**: Plots RSI with 70/30 horizontal lines and semi-transparent background fill.
* **Center Line (T3-RSI)**: Thick black line (`linewidth=2`).
* **PMax**: Thick red line.
* **Buy/Sell Labels**: Tiny up/down labels along the PMax line when enabled.
* **Background Highlight**: Green when `mAvg > pMax`; red when `<`.
### **5\. Use Cases**
* **Day & Swing Trading**: Ideal on 5 min–4 h charts for clean momentum flip detection.
* **Directional Filter**: Restrict long trades to price above PMax, shorts below.
* **Automated Execution**: Hook alerts into webhook-driven bots for live order placement.
### **6\. Tips & Caveats**
* **Whipsaw Control**: In low volatility, ATR contracts excessively—consider longer ATR or additional volatility filters.
* **Multi-Timeframe Alignment**: Validate trend direction on higher timeframes to reduce false signals.
* **Risk Management**: Oscillator-based stops often trigger tight exits; adjust position sizing accordingly.
### **7\. Conclusion**
PmR3 combines RSI, ATR, and Tillson T3 techniques to deliver a noise-reduced, trend-aware momentum indicator. With intuitive color highlights and ready-to-use alerts, it fits both discretionary and algorithmic TradingView strategies.
NY Key Open Lines (UTC-4 with Individual Lengths)📌 NY Key Open Lines (UTC-4 Based) — Indicator Description
This TradingView indicator automatically draws horizontal lines at four key New York session opening times:
08:30, 09:30, 10:30, and 18:00 (based on New York time, UTC-4).
✅ Key Features
Auto-draws lines at:
Custom line length per time: You can independently set how far each line extends to the right (in number of bars).
Label above line: Each line shows a clean time label (e.g., 09:30) slightly above the right edge of the line.
Customizable style:
Line color
Line width
Label font size
Label vertical offset
🔥 Daily Range by JafarDaily Range Indicator. This indicatior shows current day's range with opening price line.
CVD Candlestick - Milana TradesThe CVD Candlestick indicator visualizes Cumulative Volume Delta (CVD) in the form of candlesticks, providing a deeper insight into intrabar buying and selling pressure.
Instead of plotting CVD as a simple line, this indicator displays it as a candle chart, allowing traders to analyze the momentum of volume delta just like price action.
How it Works
Delta is calculated as the difference between the bar’s close and open: delta = close - open.
Divergence + ICT-Based Confirmation
This indicator can be used effectively to detect CVD-price divergences, which may signal early signs of weakness in the current trend. When integrated with ICT (Inner Circle Trader) concepts, it becomes a powerful tool for precision-based trading setups.
CVD Divergence Logic:
A bearish divergence occurs when price makes a higher high while CVD makes a lower high — suggesting weakening buyer aggression.
A bullish divergence occurs when price makes a lower low while CVD makes a higher low — signaling potential seller exhaustion.
ICT Confirmation Methods:
After identifying divergence on CVD, traders may look for confirmation using ICT techniques, such as:
1) Liquidity sweeps (e.g. price takes out a prior high/low into a divergence zone)
2) Breaker blocks or order blocks aligning with the divergence area
3) Market structure shifts following divergence
4) Optimal Trade Entry (OTE) levels confluencing with CVD-based signals
Example Setup:
Identify divergence between price and CVD.
Wait for liquidity sweep or market structure break in the same zone.
Confirm entry with lower time frame precision, if needed.
Data Candle
CVD is computed as the cumulative sum of delta over time.
For each bar, a synthetic candlestick is generated based on:
CVD Open = previous CVD value
CVD Close = current CVD value
High/Low = relative range based on Open/Close
Candlestick color indicates whether buyers (green) or sellers (red) dominated the bar.
Note : This implementation uses price-based delta for simplicity and works universally across assets. For bid/ask-based delta, a feed with order book data is required, which is not accessible in Pine Script.
Use Cases
Identify divergences between price and volume delta
Confirm or question breakouts and trend strength
Use in combination with VWAP, volume profile, or liquidity zones
Analyze intrabar sentiment in a candlestick format
Features
CVD represented as full candlesticks
Clear color distinction for delta direction
Works on all symbols and timeframes
Lightweight and responsive
Volume Alertit gives big move for the day, it gives the volume pop ups so that you can see the big moves
Stoch RSI Golden/Death Cross + Alert FilterStochastic RSI Indicator which labels golden crosses and death crosses on the chart
AAPL Multi-Strategy (5 Strategies Beta)✅ Momentum Reversal
✅ Moving Average Crossover
✅ Heikin-Ashi Reversal
✅ Swing Day Trading
✅ Candlestick Patterns
Color Shape Signal Type Meaning
🟡 Yellow Circle Momentum Reversal Dot Stochastic overbought (>80) or oversold (<20) → possible trend reversal area
🟢 Green Triangle Up Moving Average Crossover → BUY EMA20 crossed above EMA50 AND price above EMA200 → bullish crossover confirmation
🔴 Red Triangle Down Moving Average Crossover → SELL EMA20 crossed below EMA50 AND price below EMA200 → bearish crossover confirmation
🟩 Lime Circle Heikin-Ashi Bull Heikin-Ashi candle closed bullish (HA close > HA open)
🟫 Maroon Circle Heikin-Ashi Bear Heikin-Ashi candle closed bearish (HA close < HA open)
🔵 Blue Flag Swing Day Trading BUY Price crosses above EMA20 from below → pullback BUY signal
🟠 Orange Flag Swing Day Trading SELL Price crosses below EMA20 from above → pullback SELL signal
🟢 Green Label Up Bullish Engulfing Pattern Classic bullish engulfing candlestick pattern detected → possible trend reversal up
🔴 Red Label Down Bearish Engulfing Pattern Classic bearish engulfing candlestick pattern detected → possible trend reversal down
AlgoRanger Fibonacci Synthesis//@version=5
indicator("AlgoRanger Fibonacci Synthesis", overlay=true)
// --- Inputs for Supertrend ---
atrPeriod = input(10, title="ATR Period")
factor = input.float(3.0, title="Multiplier", step=0.1)
// --- Calculate Supertrend ---
= ta.supertrend(factor, atrPeriod)
// --- Plot Supertrend ---
uptrend = direction > 0 ? supertrend : na
downtrend = direction < 0 ? supertrend : na
plot(uptrend, "Uptrend", color=color.green, linewidth=2)
plot(downtrend, "Downtrend", color=color.red, linewidth=2)
// --- Fibonacci Retracement Levels ---
fibLevels = array.new_float()
array.push(fibLevels, 0.0) // Low (0%)
array.push(fibLevels, 0.236) // 23.6%
array.push(fibLevels, 0.382) // 38.2%
array.push(fibLevels, 0.5) // 50%
array.push(fibLevels, 0.618) // 61.8%
array.push(fibLevels, 0.786) // 78.6%
array.push(fibLevels, 1.0) // High (100%)
// --- Detect Swing High & Swing Low (last 50 bars) ---
swingHigh = ta.highest(high, 50)
swingLow = ta.lowest(low, 50)
// --- Draw Fibonacci Retracement ---
if barstate.islast
fibStart = swingHigh
fibEnd = swingLow
// Adjust if trend is bullish/bearish
if direction > 0 // Uptrend (use recent low as base)
fibStart := swingLow
fibEnd := swingHigh
fibDiff = fibEnd - fibStart
// Plot Fibonacci Levels
for i = 0 to array.size(fibLevels) - 1
level = array.get(fibLevels, i)
priceLevel = fibStart + (fibDiff * level)
// Customize line color/style
lineColor = level == 0.0 or level == 1.0 ? color.blue :
level == 0.382 or level == 0.618 ? color.purple :
color.gray
line.new(bar_index - 50, priceLevel, bar_index, priceLevel,
color=lineColor, width=1, style=level == 0.0 or level == 1.0 ? line.style_solid : line.style_dashed)
// Label Fibonacci Levels
label.new(bar_index, priceLevel, str.tostring(level * 100, "#.##") + "%",
color=lineColor, style=label.style_label_left, textcolor=color.white)
AAPL Multi-Strategy (5 Strategies Beta)AAPL Multi-Strategy (5 Strategies Beta)
✅ Momentum Reversal
✅ Moving Average Crossover
✅ Heikin-Ashi Reversal
✅ Swing Day Trading
✅ Candlestick Pattern
Uptrend Filter: Price > 50 & 200 MA + Upward SlopeThis indicator is designed to help traders instantly identify strong uptrend conditions based on two simple yet powerful criteria:
Price is above both the 50-day and 200-day moving averages
Both moving averages are sloping upward (positive momentum)
When both conditions are met, the indicator plots a green “UP” label below the candle, signaling a valid uptrend setup. This filter is ideal for asset selection in strategy-building, portfolio rotation, or trend-following systems.
🧠 Why it works:
The 50-day MA reflects medium-term momentum.
The 200-day MA represents the long-term trend.
When both are aligned and sloping upward, it confirms strong market structure and trend health.
🧰 Best used for:
Token screening (e.g., filtering altcoins)
Momentum-based entries
Trend confirmation
Risk filtering in strategy backtesting
CVD Divergence Detector)CVD Divergence indicator will help you to find reversal points, and will give good confidence in trades. Combine it with other trading logic with good levels for better results.
Ultimate BAMF Indicator//@version=6
indicator("Ultimate BAMF Indicator", overlay=true)
// =============================================================================
// Section 1: OHLC Annotations
// =============================================================================
// Input to toggle OHLC annotations
ohlc_show = input.bool(true, title="Show OHLC Annotations", group="OHLC Settings")
// Adjustable colors and transparency for resistance (tops)
ohlc_high_body_color = input.color(color.red, title="Body High Color (Resistance)", group="OHLC Colors")
ohlc_high_body_transparency = input.int(50, title="Body High Transparency (0-100)", minval=0, maxval=100, group="OHLC Colors")
ohlc_high_wick_color = input.color(color.new(color.red, 20), title="Wick High Color (Resistance)", group="OHLC Colors")
ohlc_high_wick_transparency = input.int(50, title="Wick High Transparency (0-100)", minval=0, maxval=100, group="OHLC Colors")
ohlc_high_shade_color = input.color(color.red, title="Resistance Shade Color", group="OHLC Colors")
ohlc_high_shade_transparency = input.int(80, title="Resistance Shade Transparency (0-100)", minval=0, maxval=100, group="OHLC Colors")
// Adjustable colors and transparency for support (bottoms)
ohlc_low_wick_color = input.color(color.green, title="Wick Low Color (Support)", group="OHLC Colors")
ohlc_low_wick_transparency = input.int(50, title="Wick Low Transparency (0-100)", minval=0, maxval=100, group="OHLC Colors")
ohlc_low_body_color = input.color(color.new(color.green, 20), title="Body Low Color (Support)", group="OHLC Colors")
ohlc_low_body_transparency = input.int(50, title="Body Low Transparency (0-100)", minval=0, maxval=100, group="OHLC Colors")
ohlc_low_shade_color = input.color(color.green, title="Support Shade Color", group="OHLC Colors")
ohlc_low_shade_transparency = input.int(80, title="Support Shade Transparency (0-100)", minval=0, maxval=100, group="OHLC Colors")
// Variables to store lines, boxes, and labels for deletion
var line ohlc_body_high_line = na
var line ohlc_wick_high_line = na
var box ohlc_high_shade_box = na
var label ohlc_body_high_label = na
var label ohlc_wick_high_label = na
var label ohlc_wick_low_label = na
var label ohlc_body_low_label = na
var box ohlc_low_shade_box = na
// Variables to control circle visibility
var float ohlc_wick_low_shape = na
var float ohlc_body_low_shape = na
// Extend lines and boxes to the right edge of the chart (within 500-bar limit)
ohlc_right_edge = bar_index + 500 // Limit to 500 bars into the future to avoid runtime error
// Detect when a new bar starts using time comparison (store result in global variable)
ohlc_is_new_bar = ta.change(time) != 0
// Use the global variable in the condition
if ohlc_show and ohlc_is_new_bar
// Delete previous lines, boxes, and labels
if not na(ohlc_body_high_line)
line.delete(ohlc_body_high_line )
if not na(ohlc_wick_high_line)
line.delete(ohlc_wick_high_line )
if not na(ohlc_high_shade_box)
box.delete(ohlc_high_shade_box )
if not na(ohlc_body_high_label)
label.delete(ohlc_body_high_label )
if not na(ohlc_wick_high_label)
label.delete(ohlc_wick_high_label )
if not na(ohlc_wick_low_label)
label.delete(ohlc_wick_low_label )
if not na(ohlc_body_low_label)
label.delete(ohlc_body_low_label )
if not na(ohlc_low_shade_box)
box.delete(ohlc_low_shade_box )
// Clear previous circles
ohlc_wick_low_shape := na
ohlc_body_low_shape := na
// Calculate OHLC values for the previous candle
ohlc_prev_open = open
ohlc_prev_close = close
ohlc_prev_high = high
ohlc_prev_low = low
// Determine body high and body low for the previous candle
ohlc_prev_body_high = math.max(ohlc_prev_open, ohlc_prev_close)
ohlc_prev_body_low = math.min(ohlc_prev_open, ohlc_prev_close)
// Draw shaded area between body high and wick high (resistance)
if ohlc_prev_body_high < ohlc_prev_high
ohlc_high_shade_box := box.new(bar_index , ohlc_prev_body_high, ohlc_right_edge, ohlc_prev_high, border_color=na, bgcolor=color.new(ohlc_high_shade_color, ohlc_high_shade_transparency))
else
ohlc_high_shade_box := box.new(bar_index , ohlc_prev_high, ohlc_right_edge, ohlc_prev_body_high, border_color=na, bgcolor=color.new(ohlc_high_shade_color, ohlc_high_shade_transparency))
// Draw horizontal lines for body high and wick high with adjustable transparency
ohlc_body_high_line := line.new(bar_index , ohlc_prev_body_high, ohlc_right_edge, ohlc_prev_body_high, color=color.new(ohlc_high_body_color, ohlc_high_body_transparency), style=line.style_solid)
ohlc_wick_high_line := line.new(bar_index , ohlc_prev_high, ohlc_right_edge, ohlc_prev_high, color=color.new(ohlc_high_wick_color, ohlc_high_wick_transparency), style=line.style_dotted)
// Draw shaded area between wick low and body low (support)
if ohlc_prev_low < ohlc_prev_body_low
ohlc_low_shade_box := box.new(bar_index , ohlc_prev_low, ohlc_right_edge, ohlc_prev_body_low, border_color=na, bgcolor=color.new(ohlc_low_shade_color, ohlc_low_shade_transparency))
else
ohlc_low_shade_box := box.new(bar_index , ohlc_prev_body_low, ohlc_right_edge, ohlc_prev_low, border_color=na, bgcolor=color.new(ohlc_low_shade_color, ohlc_low_shade_transparency))
// Circles for wick low and body low with adjustable transparency
ohlc_wick_low_shape := ohlc_prev_low
ohlc_body_low_shape := ohlc_prev_body_low
// Labels for the previous bar's values with matching colors and adjustable transparency
ohlc_body_high_label := label.new(bar_index , ohlc_prev_body_high, text="H: " + str.tostring(ohlc_prev_body_high, format.mintick), color=color.new(ohlc_high_body_color, 70), textcolor=color.white, style=label.style_label_left, textalign=text.align_left)
ohlc_wick_high_label := label.new(bar_index , ohlc_prev_high, text="H: " + str.tostring(ohlc_prev_high, format.mintick), color=color.new(ohlc_high_wick_color, 70), textcolor=color.white, style=label.style_label_left, textalign=text.align_left)
ohlc_wick_low_label := label.new(bar_index , ohlc_prev_low, text="L: " + str.tostring(ohlc_prev_low, format.mintick), color=color.new(ohlc_low_wick_color, 70), textcolor=color.white, style=label.style_label_up, textalign=text.align_center)
ohlc_body_low_label := label.new(bar_index , ohlc_prev_body_low, text="L: " + str.tostring(ohlc_prev_body_low, format.mintick), color=color.new(ohlc_low_body_color, 70), textcolor=color.white, style=label.style_label_up, textalign=text.align_center)
// Plot circles for wick low and body low with adjustable transparency
plotshape(ohlc_wick_low_shape, style=shape.circle, location=location.absolute, color=color.new(ohlc_low_wick_color, ohlc_low_wick_transparency), size=size.tiny)
plotshape(ohlc_body_low_shape, style=shape.circle, location=location.absolute, color=color.new(ohlc_low_body_color, ohlc_low_body_transparency), size=size.tiny)
// =============================================================================
// Section 2: Real-Time Stock Analysis with Trade Automation Signals
// =============================================================================
// --- Inputs ---
rt_smaLength = input.int(10, "SMA Length for Trend", group="Real-Time Analysis Settings")
rt_rsiLength = input.int(9, "RSI Length", group="Real-Time Analysis Settings")
rt_macdFast = input.int(12, "MACD Fast Length", group="Real-Time Analysis Settings")
rt_macdSlow = input.int(26, "MACD Slow Length", group="Real-Time Analysis Settings")
rt_macdSignal = input.int(9, "MACD Signal Length", group="Real-Time Analysis Settings")
rt_bbLength = input.int(20, "Bollinger Bands Length", group="Real-Time Analysis Settings")
rt_bbMult = input.float(2.0, "Bollinger Bands Multiplier", group="Real-Time Analysis Settings")
rt_volumeThreshold = input.float(0.8, "Volume Threshold (x Average)", group="Real-Time Analysis Settings")
// --- Trend Analysis (SMC-like) for Current Timeframe ---
rt_sma = ta.sma(close, rt_smaLength)
rt_trendBias = close > rt_sma ? "Bullish" : close < rt_sma ? "Bearish" : "Neutral"
// --- MTF Trend Analysis ---
f_getTrendBias(tf) =>
close_tf = request.security(symbol=syminfo.tickerid, timeframe=tf, expression=close, gaps=barmerge.gaps_off)
sma_tf = ta.sma(close_tf, rt_smaLength)
trend = close_tf > sma_tf ? "Bullish" : close_tf < sma_tf ? "Bearish" : "Neutral"
trend
rt_trendBias_30m = f_getTrendBias("30")
rt_trendBias_1h = f_getTrendBias("60")
rt_trendBias_4h = f_getTrendBias("240")
// --- Volume Analysis ---
rt_avgVolume = ta.sma(volume, 20)
rt_volumeRatio = volume / rt_avgVolume
rt_volumeStatus = rt_volumeRatio >= rt_volumeThreshold ? "High Vol" : "Thin Vol"
// --- RSI ---
rt_rsi = ta.rsi(close, rt_rsiLength)
rt_rsiStatus = rt_rsi > 70 ? "Overbought" : rt_rsi < 30 ? "Oversold" : "Neutral"
// --- MACD ---
= ta.macd(close, rt_macdFast, rt_macdSlow, rt_macdSignal)
rt_macdStatus1 = rt_macdLine > rt_signalLine ? "Bullish" : "Bearish"
rt_macdStatus2 = rt_macdLine > 0 ? "Bullish" : "Bearish"
rt_macdStatus3 = rt_hist > 0 ? "Bullish" : "Bearish"
rt_macdStatus = rt_macdStatus1 + ", " + rt_macdStatus2 + ", " + rt_macdStatus3
// --- Bollinger Bands ---
rt_basis = ta.sma(close, rt_bbLength)
rt_dev = rt_bbMult * ta.stdev(close, rt_bbLength)
rt_upperBB = rt_basis + rt_dev
rt_lowerBB = rt_basis - rt_dev
rt_bbStatus = close > rt_upperBB ? "Above Upper" : close < rt_lowerBB ? "Below Lower" : "Within"
// --- Improved Candle Analysis ---
rt_bodySize = math.abs(close - open)
rt_avgBodySize = ta.sma(rt_bodySize, 10)
rt_isSignificantCandle = rt_bodySize > 0.5 * rt_avgBodySize
rt_candleDirection = close > open ? "Bullish" : close < open ? "Bearish" : "Neutral"
var string rt_prevCandleDirection = "Neutral"
rt_candleStatus = rt_isSignificantCandle ? (rt_candleDirection != rt_prevCandleDirection ? rt_candleDirection + " Change" : rt_candleDirection) : "Neutral"
rt_prevCandleDirection := rt_candleDirection
// --- Enhanced Target Zone & Stop-Loss ---
rt_swingHigh = ta.highest(high, 10)
rt_swingLow = ta.lowest(low, 10)
rt_prevSwingHigh = ta.highest(high , 10)
rt_prevSwingLow = ta.lowest(low , 10)
rt_marketStructure = rt_swingHigh > rt_prevSwingHigh and rt_swingLow > rt_prevSwingLow ? "Bullish" : rt_swingHigh < rt_prevSwingHigh and rt_swingLow < rt_prevSwingLow ? "Bearish" : "Ranging"
// Define Target and Stop-Loss based on market structure
rt_targetZone = rt_marketStructure == "Bullish" ? rt_swingHigh : rt_marketStructure == "Bearish" ? rt_swingLow : na
rt_stopLoss = rt_marketStructure == "Bullish" ? rt_swingLow : rt_marketStructure == "Bearish" ? rt_swingHigh : na
// Ensure 3:1 RRR by adjusting target if needed
rt_entryPrice = close
rt_distanceToStop = math.abs(rt_entryPrice - rt_stopLoss)
rt_targetZone := rt_marketStructure == "Bullish" ? rt_entryPrice + 3 * rt_distanceToStop : rt_marketStructure == "Bearish" ? rt_entryPrice - 3 * rt_distanceToStop : rt_targetZone
// RRR Calculation
rt_denominator = rt_distanceToStop
rt_rrr = math.abs(rt_denominator) > 0.01 ? (rt_targetZone - rt_entryPrice) / rt_denominator : na
rt_rrrText = not na(rt_rrr) ? str.tostring(math.round(rt_rrr, 1), "#.#") : "N/A"
// --- Momentum (Rate of Change) ---
rt_roc = ta.roc(close, 5)
rt_momentumBullish = rt_roc > 0
rt_momentumBearish = rt_roc < 0
// --- Market Structure Analysis ---
rt_marketTrendBias = rt_trendBias
rt_trendStrength = rt_rsi > 50 and rt_macdLine > rt_signalLine ? "Strong Bullish" : rt_rsi < 50 and rt_macdLine < rt_signalLine ? "Strong Bearish" : "Neutral"
rt_whatToWatch = "Price may stall if vol weak Hold > " + str.tostring(math.round(close * 0.95, 2), "#.##") + " = continue Break < " + str.tostring(math.round(close * 0.85, 2), "#.##") + " = invalid Trail stops if in profit"
// --- Mini Gauge Metrics ---
rt_heat = rt_trendStrength == "Strong Bullish" ? "Strong Bull" : rt_trendStrength == "Strong Bearish" ? "Strong Bear" : "Neutral"
rt_trendScore = rt_rsi > 70 ? "5/5" : rt_rsi > 60 ? "4/5" : rt_rsi > 50 ? "3/5" : rt_rsi > 40 ? "2/5" : "1/5"
rt_choppy = ta.stdev(close, 20) > ta.stdev(close , 20) ? "Trending" : "Choppy"
rt_entryFilter = rt_rsi > 70 or rt_rsi < 30 ? "Not worth risk" : "Potential entry"
rt_exitNote = "Monitor key lvl or momentum"
rt_miniTradeSuggestion = "Momentum favors " + (rt_trendBias == "Bullish" ? "bulls" : "bears") + ". Await CHOCH/BOS"
// --- Trade Signals ---
rt_buySignal = rt_momentumBullish and rt_volumeRatio >= rt_volumeThreshold and rt_marketStructure == "Bullish"
rt_sellSignal = rt_momentumBearish and rt_volumeRatio >= rt_volumeThreshold and rt_marketStructure == "Bearish"
rt_setupStatus = rt_buySignal ? "Long/Call Active" : rt_sellSignal ? "Short/Put Active" : "No Signal"
// --- Colors ---
rt_red = color.red
rt_green = color.green
rt_blue = color.blue
rt_gray = color.gray
rt_yellow = color.yellow
rt_white = color.white
rt_black = color.black
rt_sectionHeaderColor = color.new(rt_gray, 70)
// --- Precompute Colors for Dashboard ---
rt_trendColor = rt_trendBias == "Bullish" ? rt_green : rt_trendBias == "Bearish" ? rt_red : rt_yellow
rt_trendColor_30m = rt_trendBias_30m == "Bullish" ? rt_green : rt_trendBias_30m == "Bearish" ? rt_red : rt_yellow
rt_trendColor_1h = rt_trendBias_1h == "Bullish" ? rt_green : rt_trendBias_1h == "Bearish" ? rt_red : rt_yellow
rt_trendColor_4h = rt_trendBias_4h == "Bullish" ? rt_green : rt_trendBias_4h == "Bearish" ? rt_red : rt_yellow
rt_volumeColor = rt_green
rt_macdColor = rt_macdStatus1 == "Bullish" ? rt_green : rt_red
rt_tradeColor = rt_buySignal ? rt_green : rt_sellSignal ? rt_red : rt_yellow
rt_trendStrengthColor = rt_trendStrength == "Strong Bullish" ? rt_yellow : rt_trendStrength == "Strong Bearish" ? rt_red : rt_white
rt_heatColor = rt_heat == "Strong Bull" ? rt_yellow : rt_heat == "Strong Bear" ? rt_red : rt_white
rt_structureColor = rt_marketStructure == "Bullish" ? rt_green : rt_marketStructure == "Bearish" ? rt_red : rt_yellow
// --- Consolidated Table for Real-Time Analysis ---
var table rt_dashboardTable = table.new(position.top_right, 2, 23, border_width=2)
if ta.change(time) != 0
// Market Scan Section
table.cell(rt_dashboardTable, 0, 0, "MARKET SCAN", text_color=rt_white, bgcolor=rt_sectionHeaderColor)
table.cell(rt_dashboardTable, 1, 0, "", text_color=rt_white, bgcolor=rt_sectionHeaderColor)
table.cell(rt_dashboardTable, 0, 1, "Trend Bias", text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 1, 1, rt_marketTrendBias, text_color=rt_trendColor, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 0, 2, "30m Trend", text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 1, 2, rt_trendBias_30m, text_color=rt_trendColor_30m, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 0, 3, "1h Trend", text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 1, 3, rt_trendBias_1h, text_color=rt_trendColor_1h, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 0, 4, "4h Trend", text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 1, 4, rt_trendBias_4h, text_color=rt_trendColor_4h, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 0, 5, "Setup", text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 1, 5, rt_setupStatus, text_color=rt_tradeColor, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 0, 6, "Trend Strength", text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 1, 6, rt_trendStrength, text_color=rt_trendStrengthColor, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 0, 7, "Structure", text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 1, 7, rt_marketStructure, text_color=rt_structureColor, bgcolor=color.new(rt_black, 90))
// Signal Engine Section
table.cell(rt_dashboardTable, 0, 8, "SIGNAL ENGINE", text_color=rt_white, bgcolor=rt_sectionHeaderColor)
table.cell(rt_dashboardTable, 1, 8, "", text_color=rt_white, bgcolor=rt_sectionHeaderColor)
table.cell(rt_dashboardTable, 0, 9, "Volume", text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 1, 9, rt_volumeStatus + " (" + str.tostring(rt_volumeRatio, "#.##") + "x)", text_color=rt_volumeColor, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 0, 10, "Candle", text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 1, 10, rt_candleStatus, text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 0, 11, "RSI, MACD, BBP", text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 1, 11, rt_rsiStatus + ", " + rt_macdStatus1 + ", " + rt_bbStatus, text_color=rt_macdColor, bgcolor=color.new(rt_black, 90))
// Target Zone Section
table.cell(rt_dashboardTable, 0, 12, "TARGET ZONE", text_color=rt_white, bgcolor=rt_sectionHeaderColor)
table.cell(rt_dashboardTable, 1, 12, "", text_color=rt_white, bgcolor=rt_sectionHeaderColor)
table.cell(rt_dashboardTable, 0, 13, "Target", text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 1, 13, str.tostring(rt_targetZone, "#.##") + " (RRR: " + rt_rrrText + ")", text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 0, 14, "Stop Loss", text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 1, 14, str.tostring(rt_stopLoss, "#.##"), text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 0, 15, "Watch", text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 1, 15, rt_whatToWatch, text_color=rt_white, bgcolor=color.new(rt_black, 90))
// Mini Gauge Section
table.cell(rt_dashboardTable, 0, 16, "MINI GAUGE", text_color=rt_white, bgcolor=rt_sectionHeaderColor)
table.cell(rt_dashboardTable, 1, 16, "", text_color=rt_white, bgcolor=rt_sectionHeaderColor)
table.cell(rt_dashboardTable, 0, 17, "Heat", text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 1, 17, rt_heat, text_color=rt_heatColor, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 0, 18, "Trend Score", text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 1, 18, rt_trendScore, text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 0, 19, "Choppy", text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 1, 19, rt_choppy, text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 0, 20, "Entry Filter", text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 1, 20, rt_entryFilter, text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 0, 21, "Exit Note", text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 1, 21, rt_exitNote, text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 0, 22, "Trade Suggest", text_color=rt_white, bgcolor=color.new(rt_black, 90))
table.cell(rt_dashboardTable, 1, 22, rt_miniTradeSuggestion, text_color=rt_white, bgcolor=color.new(rt_black, 90))
// --- Plotting ---
plot(rt_sma, "SMA", color=rt_blue)
plot(rt_upperBB, "Upper BB", color=rt_gray)
plot(rt_lowerBB, "Lower BB", color=rt_gray)
plot(rt_targetZone, "Target", color=rt_green, style=plot.style_circles)
plot(rt_stopLoss, "Stop-Loss", color=rt_red, style=plot.style_circles)
// =============================================================================
// Section 3: Fair Value Gaps (5M & 1M)
// =============================================================================
// Inputs for enabling/disabling timeframes and aesthetics
fvg_show_5m = input.bool(true, "Show 5M FVGs", group="FVG Settings")
fvg_show_1m = input.bool(true, "Show 1M FVGs", group="FVG Settings")
fvg_extend_bars = input.int(10, "Extend FVG Bars", minval=1, group="FVG Settings")
fvg_bull_color = input.color(color.new(#2962FF, 85), "Bullish FVG Color", group="FVG Colors")
fvg_bear_color = input.color(color.new(#E91E63, 85), "Bearish FVG Color", group="FVG Colors")
// Function to identify FVGs on a given timeframe
f_fvg_data(string timeframe) =>
fvg_high_tf = request.security(syminfo.tickerid, timeframe, high, gaps=barmerge.gaps_off)
fvg_low_tf = request.security(syminfo.tickerid, timeframe, low, gaps=barmerge.gaps_off)
fvg_high_tf_2 = request.security(syminfo.tickerid, timeframe, high , gaps=barmerge.gaps_off)
fvg_low_tf_2 = request.security(syminfo.tickerid, timeframe, low , gaps=barmerge.gaps_off)
// Detect Bullish FVG: Current low > high
fvg_bull_fvg = fvg_low_tf > fvg_high_tf_2
fvg_bull_top = fvg_low_tf
fvg_bull_bottom = fvg_high_tf_2
// Detect Bearish FVG: Current high < low
fvg_bear_fvg = fvg_high_tf < fvg_low_tf_2
fvg_bear_top = fvg_low_tf_2
fvg_bear_bottom = fvg_high_tf
// Identify FVGs on 5M and 1M timeframes
= f_fvg_data("5")
= f_fvg_data("1")
// Plot FVGs as background boxes (transparent, no text)
if fvg_show_5m and fvg_bull_fvg_5m and not na(fvg_bull_top_5m) and not na(fvg_bull_bottom_5m)
box.new(left=bar_index , top=fvg_bull_top_5m, right=bar_index + fvg_extend_bars, bottom=fvg_bull_bottom_5m, border_color=color.new(color.gray, 100), bgcolor=fvg_bull_color)
if fvg_show_5m and fvg_bear_fvg_5m and not na(fvg_bear_top_5m) and not na(fvg_bear_bottom_5m)
box.new(left=bar_index , top=fvg_bear_top_5m, right=bar_index + fvg_extend_bars, bottom=fvg_bear_bottom_5m, border_color=color.new(color.gray, 100), bgcolor=fvg_bear_color)
if fvg_show_1m and fvg_bull_fvg_1m and not na(fvg_bull_top_1m) and not na(fvg_bull_bottom_1m)
box.new(left=bar_index , top=fvg_bull_top_1m, right=bar_index + fvg_extend_bars, bottom=fvg_bull_bottom_1m, border_color=color.new(color.gray, 100), bgcolor=fvg_bull_color)
if fvg_show_1m and fvg_bear_fvg_1m and not na(fvg_bear_top_1m) and not na(fvg_bear_bottom_1m)
box.new(left=bar_index , top=fvg_bear_top_1m, right=bar_index + fvg_extend_bars, bottom=fvg_bear_bottom_1m, border_color=color.new(color.gray, 100), bgcolor=fvg_bear_color)
// Plot the candlestick chart (shared across all sections)
plotcandle(open, high, low, close, "Candles", color.green, color.red)
Candle Color by Timeframe (Candle View)Just makes you able to see multiple time frames at the bottom, in a separate pane