Live price distance from low of the dayThis simple indicator state the distance of the actual price from the low of the day - Simple tool to help position sizing :)
Indicadores e estratégias
Snapfront WCTφ Coherence BandsSnapfront Coherence Bands — WCTφ (v6)
The Snapfront Coherence Bands (SCB) extend classic ATR-style bands with a coherence-driven engine. Instead of simple volatility envelopes, SCB adapt dynamically to market entropy, trend stability, and regime detection.
Core Features:
📊 WCTφ (Weighted Coherence Tracking) to measure entropy & disorder
🔍 Adaptive band width scaling with chaos factor (ATR × coherence)
🎯 Regime coloring:
Trend (lime)
Breakout (aqua)
Mean reversion (yellow)
Exhaustion (orange)
⚡ Squeeze detector with percentile-based compression zones
🟢/🔴 Entry/exit arrows on crossovers (optional)
Use Cases:
Spot high-clarity trend moves vs. noisy ranges
Anticipate volatility squeezes & breakout setups
Filter trades by regime classification
Visualize price stability with adaptive banding
⚠️ Invite-Only Access:
Available exclusively via SnapfrontTech. Subscription required.
Market Clarity Index (MCI) — ProThe MCI Pro++ expands on the Lite version with deeper controls, higher-timeframe blending, slope analysis, and clarity ranking. It captures the balance between trend coherence vs. noise using entropy, drift, and volume dynamics mapped through a φ²-based sigmoid.
Key Features:
Fully adjustable weights (drift, volume shocks, entropy)
Higher-timeframe blending with adjustable weighting
Clarity slope + histogram for momentum tracking
Range rank (0–100) to spot relative extremes
Bull/Bear markers + HTF alignment markers
Optional status table with live clarity state
Trading Logic:
✅ High-clarity regime when MCI > high threshold
❌ Low-clarity regime when MCI < low threshold
Neutral otherwise; use slope, HTF alignment, and range rank as context filters.
⚠️ Invite-Only Access:
This Pro version is available by subscription through SnapfrontTech.
SCI - Snapfront Coherence IndicatorThe SMCI is an advanced, invite-only indicator designed to measure market coherence, volatility regimes, and trend stability. It combines entropy-based features, φ-cycle phase drivers, and custom exposure scaling into a single probabilistic framework.
Core outputs:
📈 I_hat (probability of upward drift) — coherence-weighted probability score.
📊 Exposure (scaled proxy) — dynamic sizing aligned with volatility and drawdown control.
💰 Equity curve (proxy) — running performance simulation.
🔎 WCTφ + dWCTφ — entropy-based coherence metrics.
⚠️ Regime detection — classifies conditions as Trend / Chop / Panic.
Signal Logic:
✅ Long bias when I_hat crosses above 0.5.
❌ Short bias when I_hat crosses below 0.5.
HUD overlay shows live coherence stats, exposure, and regime classification.
⚠️ Invite-Only Notice:
This script is restricted to approved users. Access requires subscription from Snapfront Technologies.
snapjames.gumroad.com
📌 Disclaimer:
For educational use only. This is not financial advice and should not be considered a trading recommendation.
No Wick Candle HighlighterHighlights current timeframe bullish candles without a wick low or bearish candles without a wick high.
StarterPack MAs🚀 Starter Moving Averages Indicator
This indicator was built by combining all the moving averages I personally use in my trading, organized in a clear and visual way to make market reading much easier. Instead of jumping between multiple tools, you now have everything in one place – designed to highlight trend direction, potential reversal areas, and dynamic zones of support and resistance.
📊 With this tool, you will be able to:
Quickly identify whether moving averages are aligned or diverging.
Spot moments of strong trending movement and possible shifts in momentum.
Use it as a filter for cleaner trade entries, reducing noise.
Track areas that often act as price “magnets” during intraday sessions.
💡 The idea is not to give you a rigid “buy/sell” signal, but to provide a market reading framework that adapts to different trading styles – whether you’re riding trends or looking for reversals at key levels. It brings structure, clarity, and consistency to the way you analyze your charts.
🔥 At the end of the day, this indicator is about perspective: making your screen cleaner, your decision-making faster, and your execution more confident. It’s not a magic button – it’s a powerful lens to help you see what really matters in the market.
Snapfront Market Clarity Index (MCI) — LiteMarket Clarity Index (MCI) — Lite + Signals
The Market Clarity Index (MCI) measures trend clarity vs. noise using returns, drift, and volume shock dynamics. Values are normalized through a φ²-based sigmoid for smooth, interpretable signals.
Features:
Clear 0–100 scale (Lite version)
Heatmap background for clarity regimes
Bull/Bear signal arrows with EMA filter
High/Low threshold lines for easy context
Trading Logic:
✅ Bull signal when MCI crosses into the high zone with price above EMA
❌ Bear signal when MCI crosses into the low zone with price below EMA
Use MCI as a trend filter, entry trigger, or market condition gauge across any timeframe or asset.
HEIKIN ASHI - MyOkaneAquiDemonstrates hekin ashi to smooth the chart, removing market noise and showing trend line.
Varma Fractal TEMA + Strong Move Candle DetectorIts a combined Indicator built on the concepts of Fractals, EMAs, RSI, ATR and Awesome Oscillators. A fractal is a small, repeating price pattern composed of five price bars or candlesticks that helps identify potential turning points in a market trend. It acts as a technical indicator to highlight support and resistance levels, signifying potential reversals. Specifically, a bullish fractal has the middle bar as the lowest low (a "V" shape), signaling a possible uptrend reversal, while a bearish fractal has the middle bar as the highest high (an inverted "V"), indicating a potential downtrend reversal. EMA tracks an asset's price over a specific period by placing greater weight on recent data points, making it more responsive to current market changes than a Simple Moving Average (SMA). Traders use EMAs to identify bullish and bearish trends, spot potential entry and exit points, and capture market momentum and price shifts quickly, especially in shorter time frames. RSI (Relative Strength Index) is a momentum oscillator used in trading to measure the speed and change of price movements, indicating whether a security is overbought (likely to fall) or oversold (likely to rise). Developed by J. Welles Wilder Jr., the RSI oscillates between 0 and 100, with values above 70 generally signaling an overbought condition and values below 30 indicating an oversold condition. Traders use these signals to identify potential trend reversals and time their entry and exit points more effectively.
VXN Range FilterThis indicator is based on other open source scripts. It's designed for Nasdaq futures (NQ and MNQ), combining a range filter with CBOE VXN Index (Nasdaq-100 volatility) signals to identify buy and sell opportunities.
It overlays on the price chart, using a smoothed price filter to reduce noise and dynamic bands for target zones. The VXN's EMA and SMA determine bullish (EMA < SMA, green background)
or bearish (EMA > SMA, red background) market conditions to confirm signals. Buy/sell signals are generated when the price breaks out of the filter in the trend direction, confirmed by the VXN state and a change in prior condition to avoid redundant signals.
The indicator is suitable for swing or trend-following strategies, with adjustable parameters
for customization. Visuals include colored bars (white: bullish, blue: bearish, light blue: neutral), target bands, and labeled signals. Alerts are provided for buy, sell, or both.
ORB FVG Strategy with telegram V6.1Summary
Intraday NY-session strategy with Opening-Range bias (09:30–10:00 NY), FVG entries (incl. optional HTF FVGs), momentum filters (LinReg slope & Williams %R), limit entries inside the zone, SL from FVG anchors, and TP via risk-reward. Includes session/trade caps, pending-order handling, auto-cancel at NY time, and optional Telegram webhook alerts.
Feature Overview
Opening Range & Bias: OR high/low built until 10:00 NY, then frozen. Bias from confirmed 5-minute candles (modes: Body Close, Complete Candle, Wick Only).
FVG Scanner: Bull/bear FVGs (choose wick or body gaps), min size, auto-extend, mitigation cleanup (touch or 50%).
HTF FVG (10 min): Optional – displayed after ≥ 2 consecutive FVGs; cleans up on touch/50%.
Entry/SL/TP: Entry at X% fill (+extra %) within the FVG; SL from FVG candle / FVG-1 / FVG-2 (smart) + buffer; TP via risk-reward.
Momentum Filters: LinReg slope (MLL) + Williams %R with threshold/slope filters (individually switchable).
Intrabar Mode (optional): Immediate Open/intrabar entry on touch (calc_on_every_tick=true) or classic bar-close confirmation (toggle).
Trade Management: Max trades/day, pending cap, auto-cancel at defined NY time, pause after first winner (optional).
Telegram: Programmatic alerts via alert() with Telegram-ready JSON payload.
Parameters (compact)
Group Parameter Purpose
Sessions Trading session, Opening range Trading/OR window (internal NY TZ)
Bias Body Close / Complete Candle / Wick Only Bias confirmation relative to OR
Liquidity LQ session, lookback days, cleanup points, show lines Intraday liquidity marks & cleanup
FVG Min size, wick/body, colors, extend, cleanup Detection/visualization & validity
HTF FVG (10 m) Toggle/Display/Colors Conservative HTF filter/POI
Entry Fill %, extra %, max pending, validity (bars), cancel time, intrabar switch Execution timing, order caps, auto-cancel
Stop Loss Source: Candle / -1 / -2 (smart), buffer (points) SL anchor from FVG history + safety offset
Take Profit Risk-Reward (R:R) Target calculation
Momentum LinReg length/min slope, W%R length/min slope, HUD Trend/momentum filters
Trade Mgmt Max trades/day, pause after win Daily cap / risk cooldown
Telegram Enabled, tester, interval, channel id Webhook output & test signals
Debug & Info Debug panel, rejection reasons On-chart status/diagnostics
Alerts / Telegram Webhook (Quick Setup)
Create an alert with Condition: “Any alert() function call”.
Webhook URL: api.telegram.org
Message: leave empty (the strategy provides JSON via alert() – includes chat_id, parse_mode, text).
Ensure your bot can post to the channel and the chat_id is valid.
Repainting & Backtesting
HTF series via lookahead_off on closed higher-TF candles; FVG detection on confirmed bars (barstate.isconfirmed).
Intrabar/Open entries allow earlier fills but typically cause differences between backtest and live (tick granularity/slippage, limit touch on bar OHLC).
For reproducibility, trade without intrabar (bar-close only).
Limitations
No full tick simulation; limit fills rely on bar OHLC.
Liquidity “cleanup” is rule-based (not an orderbook).
Telegram depends on correct webhook configuration.
Tips
Timeframes: M5 (intrabar)
Start with modest R:R (e.g., 1.5–2.0) and tune filters carefully.
Disclaimer
No financial advice. Past results do not guarantee future performance. Use responsibly and follow Public Library rules.
License / Credits
© 2025 Lean Trading (Lennart Pomreinke). License: MPL-2.0.
Changelog
V06.1: Intrabar switch (Open/intrabar vs bar-close), Telegram sanitizer & tester, HTF-FVG cleanup, refined pending/cancel logic, debug panel (status & rejections).
TCLC - Multi TimeFrame VWAPVWAP :
VWAP, or Volume Weighted Average Price, is a trading indicator that represents the average price of a security over a specific period, weighted by the volume of trades at each price level. It is calculated by taking the sum of the product of price and volume and dividing it by the total volume for the period. Essentially, VWAP shows the average price at which most trades occurred, giving more weight to prices with higher trading volumes.
The Indicator Plots the VWAP in Daily, WEEKLY , MONTHLY , YEARLY which helps to gauage the trend where the Volume vs Price exists....
Optimized Trend-Momentum SignalsThis indicator combines trend, momentum, and volume-strength factors into a single buy/sell signal system. It integrates:
SMA 200 → Identifies the long-term trend (price above = bullish bias, below = bearish bias).
MACD (12,26,9) → Confirms momentum direction with line crossovers.
RSI (7) → Filters strength (above 50 = bullish, below 50 = bearish).
ROC (45) → Validates positive or negative rate of change.
Signal Logic:
Buy Signal → Price above SMA 200, MACD bullish, RSI > 50, and ROC > 0.
Sell Signal → Price below SMA 200, MACD bearish, RSI < 50, and ROC < 0.
Features:
Clear arrows for BUY and SELL signals.
Long-term SMA plotted for trend visualization.
Alerts built-in for real-time notifications.
This tool helps traders filter out noise and act only when all major confirmation factors align, reducing false signals and improving decision-making.
SOM RRMA (Revolution & Reverse Magic Average)## SOM RRMA (Revolution & Reverse Magic Average)
**Description:**
The SOM RRMA (Revolution & Reverse Magic Average) indicator overlays two distinct moving average lines on any TradingView chart, providing traders with enhanced trend and reversal insights.
- The “Revolution Magic Line RMA” plots the classic Welles Wilder’s Running Moving Average (RMA) using default settings: length = 21, source = close, and timeframe = chart. This line is displayed in **green** for clear visibility.
- The “Reverse Magic Line RMA” plots an innovative reverse RMA, based on a reversed price calculation, also using default settings: length = 21, source = close, and timeframe = chart. This line appears in **red** for direct distinction.
- Both lines offer independent customization of length, source, and timeframe, enabling traders to tailor the indicator to their strategy and instrument.
**How to Use:**
- Add SOM RRMA to any TradingView instrument and timeframe.
- By default, both lines use length = 21 and source = close with the current chart’s timeframe.
- The green line tracks the standard RMA trend; the red line follows the Reverse RMA, often moving contrary to price action.
- Observe interactions and divergence between the two lines to detect trend changes, momentum shifts, or potential reversal setups.
**Features:**
- Customizable length, source, and timeframe parameters for both lines.
- Default colors: green for standard RMA, red for Reverse RMA.
- Trend-following, divergence detection, and reversal strategy support.
**Notes:**
This indicator is intended for educational and research purposes only. Please test it using demo charts before applying to live trading.
Feedback and suggestions are welcome—share your experience or questions on the script page.
Volume Cluster AlertThis script is designed to highlight unusual trading volume activity that may be relevant for users analyzing potential shifts in market behavior. It detects significant deviations in volume compared to historical averages and identifies recurring volume patterns within a user-defined timeframe.
When such activity is detected, the indicator displays visual labels above or below the price chart. Labels appearing above the chart (red by default) correspond to specific volume patterns during upward price movement. Labels below the chart (green by default) reflect similar volume behavior during downward movement.
Clusters of labels — especially when multiple of the same color appear within a short period — can be visually useful for observing potential changes in price dynamics. These groupings are meant to support the user’s own analysis and decision-making process.
Users can customize the color of the labels and adjust the sensitivity of the detection parameters to better align with their trading style or chart settings.
Please note: This indicator does not predict market direction or generate trading signals. It is a visual tool that highlights specific volume conditions, which may be interpreted by the user in combination with other technical or analytical methods.
Trade with Shyam - SimpleStrategy Overview
This is a trend-following strategy that uses two Exponential Moving Averages (EMAs) to identify trading opportunities in the market. The strategy generates buy and sell signals based on the relationship between price and the EMA lines.
How It Works
Entry Signals
ENTRY CALL (Green): Generated when the complete candle closes above the EMA 9 (candle low > EMA 9)
ENTRY PUT (Red): Generated when the complete candle closes below the EMA 9 (candle high < EMA 9)
Exit Signals
EXIT CALL (Gray): Triggered when price closes below the EMA 21 (candle high < EMA 21)
EXIT PUT (Gray): Triggered when price closes above the EMA 21 (candle low > EMA 21)
Visual Components
Red Line (Thickness 3): EMA 9 - Short-term trend indicator
Green Line (Thickness 3): EMA 21 - Medium-term trend indicator
Green Triangles: Buy entry signals
Red Triangles: Sell entry signals
Gray X Marks: Exit signals
Background Coloring:
Light green: Currently in a long position
Light red: Currently in a short position
Strategy Logic
Buy Signal: When price shows strength by closing completely above the EMA 9
Sell Signal: When price shows weakness by closing completely below the EMA 9
Exit Long: When price weakness pulls back below EMA 21
Exit Short: When price strength pushes back above EMA 21
Key Features
Trend Following: Captures momentum in the direction of the trend
Dual EMA System: Uses faster EMA (9) for entries and slower EMA (21) for exits
Complete Candle Confirmation: Only triggers signals after full candle confirmation
Position Management: Maintains only one position at a time (no simultaneous long/short)
Visual Clarity: Clear labels and color coding for easy interpretation
Best Usage Conditions
Trending Markets: Works best in markets with clear directional bias
Moderate to High Volatility: Provides better signal quality in active markets
Multiple Timeframes: Can be used on any timeframe (15min, 1H, 4H, Daily recommended)
Risk Management Notes
The strategy uses the EMA 21 as a dynamic stop-loss level
Position sizing and additional risk management should be implemented separately
Past performance does not guarantee future results
Customization
You can adjust the EMA periods in the indicator settings to suit your trading style:
Shorter periods: More sensitive, more signals (higher frequency)
Longer periods: Less sensitive, fewer but potentially higher quality signals
P/L Panel + Multi Targets (4 Entries) – HUD near Price + Avg R:R//@version=6
indicator("P/L Panel + Multi Targets (4 Entries) – HUD near Price + Avg R:R", overlay=true, max_lines_count=500, max_labels_count=500)
// ====== General =====
side = input.string("Long", "Position Side", options= )
usd_dp = input.int(2, "USD decimals", minval=0, maxval=6)
// ====== HUD Settings ======
hud_font = input.string("large", "HUD font size", options= )
hud_bg = input.color(color.new(color.black, 0), "HUD background color")
hud_txtc = input.color(color.white, "HUD text color")
hud_side = input.string("Right of price", "HUD side", options= )
hud_off_bars = input.int(3, "Horizontal offset (bars)", minval=0, maxval=50)
hud_off_atr = input.float(0.2, "Vertical offset from price (ATR)", step=0.1)
atr_len = input.int(14, "ATR length for vertical offset", minval=1)
lock_to_last_bar = input.bool(true, "Lock HUD to the last bar")
// Show HUD even when there are no entries (test text)
force_show_hud = input.bool(true, "🔍 Show HUD even with no entries")
// ====== Shared SL & Targets ======
stop_inp = input.float(0.0, "Stop Loss (shared, optional)", step=0.0001)
use_tp1 = input.bool(false, "Enable Target 1")
tp1 = input.float(0.0, "Target 1 price", step=0.0001)
use_tp2 = input.bool(false, "Enable Target 2")
tp2 = input.float(0.0, "Target 2 price", step=0.0001)
use_tp3 = input.bool(false, "Enable Target 3")
tp3 = input.float(0.0, "Target 3 price", step=0.0001)
use_tp4 = input.bool(false, "Enable Target 4")
tp4 = input.float(0.0, "Target 4 price", step=0.0001)
use_tp5 = input.bool(false, "Enable Target 5")
tp5 = input.float(0.0, "Target 5 price", step=0.0001)
// ====== Four Independent Entries ======
group1 = "Entry 1"
en1 = input.bool(true, "Enable Entry 1", inline=group1)
lev1 = input.int(10, "Leverage", minval=1, maxval=200, inline=group1)
entry1 = input.float(0.0, "Entry 1 price", step=0.0001)
set_now1 = input.bool(false, "⚡ Set Entry1 = Current Price")
mode1 = input.string("USD (USDT)", "Size unit 1", options= )
sem1 = input.string("Margin (apply leverage)", "Size meaning 1", options= )
size1 = input.float(0.0, "Position size 1", step=0.0001)
baseLev1 = input.bool(false, "Apply leverage to 'Coin Quantity' (1)")
group2 = "Entry 2"
en2 = input.bool(false, "Enable Entry 2", inline=group2)
lev2 = input.int(10, "Leverage", minval=1, maxval=200, inline=group2)
entry2 = input.float(0.0, "Entry 2 price", step=0.0001)
set_now2 = input.bool(false, "⚡ Set Entry2 = Current Price")
mode2 = input.string("USD (USDT)", "Size unit 2", options= )
sem2 = input.string("Margin (apply leverage)", "Size meaning 2", options= )
size2 = input.float(0.0, "Position size 2", step=0.0001)
baseLev2 = input.bool(false, "Apply leverage to 'Coin Quantity' (2)")
group3 = "Entry 3"
en3 = input.bool(false, "Enable Entry 3", inline=group3)
lev3 = input.int(10, "Leverage", minval=1, maxval=200, inline=group3)
entry3 = input.float(0.0, "Entry 3 price", step=0.0001)
set_now3 = input.bool(false, "⚡ Set Entry3 = Current Price")
mode3 = input.string("USD (USDT)", "Size unit 3", options= )
sem3 = input.string("Margin (apply leverage)", "Size meaning 3", options= )
size3 = input.float(0.0, "Position size 3", step=0.0001)
baseLev3 = input.bool(false, "Apply leverage to 'Coin Quantity' (3)")
group4 = "Entry 4"
en4 = input.bool(false, "Enable Entry 4", inline=group4)
lev4 = input.int(10, "Leverage", minval=1, maxval=200, inline=group4)
entry4 = input.float(0.0, "Entry 4 price", step=0.0001)
set_now4 = input.bool(false, "⚡ Set Entry4 = Current Price")
mode4 = input.string("USD (USDT)", "Size unit 4", options= )
sem4 = input.string("Margin (apply leverage)", "Size meaning 4", options= )
size4 = input.float(0.0, "Position size 4", step=0.0001)
baseLev4 = input.bool(false, "Apply leverage to 'Coin Quantity' (4)")
// Quick set entries = current price
entry1 := (en1 and set_now1) ? close : entry1
entry2 := (en2 and set_now2) ? close : entry2
entry3 := (en3 and set_now3) ? close : entry3
entry4 := (en4 and set_now4) ? close : entry4
// ====== Helpers ======
to_size(s) =>
s == "tiny" ? size.tiny : s == "small" ? size.small : s == "normal" ? size.normal : s == "large" ? size.large : size.huge
f_usd_str(_val, _decimals) =>
na(_val) ? "—" : str.tostring(math.round(_val * math.pow(10, _decimals)) / math.pow(10, _decimals))
f_qty_base(mode, sem, size, entry, baseLev, lev) =>
float _qty = na
if mode == "USD (USDT)"
_qty := (size > 0 and entry > 0) ? ((sem == "Margin (apply leverage)" ? size * lev : size) / entry) : na
else
_qty := size > 0 ? (baseLev ? size * lev : size) : na
_qty
f_notional_quote(mode, sem, size, entry, lev, baseLev) =>
if mode == "USD (USDT)"
sem == "Margin (apply leverage)" ? size * lev : size
else
(baseLev ? size * lev : size) * entry
f_pnl_quote(side, entry, qty) =>
na(qty) or na(entry) ? na : (side=="Long" ? (close - entry) : (entry - close)) * qty
f_pct(side, entry) =>
na(entry) ? na : ((close - entry) / entry * 100.0) * (side=="Long" ? 1 : -1)
f_roi_pct(side, entry, lev) =>
na(entry) ? na : f_pct(side, entry) * lev
// NOTE: _lineIn must be a line, not a float
f_stickyHLine(_price, _lineIn, _color, _width) =>
var line _out = na
_out := _lineIn
if na(_out)
_out := line.new(bar_index-1, _price, bar_index+1, _price, xloc=xloc.bar_index, extend=extend.both, width=_width, style=line.style_dashed, color=_color)
else
line.set_xy1(_out, bar_index-1, _price)
line.set_xy2(_out, bar_index+1, _price)
line.set_color(_out, _color)
line.set_width(_out, _width)
_out
// ====== 4 Entries Calculations ======
var color entryCols = array.from(color.new(color.yellow, 0), color.new(color.orange, 0), color.new(color.teal, 0), color.new(color.fuchsia, 0))
bool ens = array.from(en1, en2, en3, en4)
float entries = array.from(entry1, entry2, entry3, entry4)
int levs = array.from(lev1, lev2, lev3, lev4)
string modes = array.from(mode1, mode2, mode3, mode4)
string sems = array.from(sem1, sem2, sem3, sem4)
float sizes = array.from(size1, size2, size3, size4)
bool baseLevs = array.from(baseLev1, baseLev2, baseLev3, baseLev4)
float qtys = array.new_float(4, na)
float pnls = array.new_float(4, na)
float pcts = array.new_float(4, na)
float rois = array.new_float(4, na)
float notionals = array.new_float(4, na)
for i = 0 to 3
if array.get(ens, i) and array.get(entries, i) > 0
ent = array.get(entries, i)
levX = array.get(levs, i)
modeX= array.get(modes, i)
semX = array.get(sems, i)
sizeX= array.get(sizes, i)
bLev = array.get(baseLevs, i)
qty = f_qty_base(modeX, semX, sizeX, ent, bLev, levX)
array.set(qtys, i, qty)
pnlq = f_pnl_quote(side, ent, qty)
array.set(pnls, i, pnlq)
pct = f_pct(side, ent)
array.set(pcts, i, pct)
roi = f_roi_pct(side, ent, levX)
array.set(rois, i, roi)
notq = f_notional_quote(modeX, semX, sizeX, ent, levX, bLev)
array.set(notionals, i, notq)
// ====== Totals & Weighted Avg Entry ======
float totalPnlUSD = 0.0
float totalNotional = 0.0
float totalQty = 0.0
float wAvgEntry = na
for i = 0 to 3
if not na(array.get(pnls, i))
totalPnlUSD += array.get(pnls, i)
if not na(array.get(notionals, i))
totalNotional += array.get(notionals, i)
if not na(array.get(qtys, i)) and array.get(entries, i) > 0
totalQty += array.get(qtys, i)
if totalQty > 0
num = 0.0
for i = 0 to 3
qi = array.get(qtys, i)
ei = array.get(entries, i)
if not na(qi) and ei > 0
num += qi * ei
wAvgEntry := num / totalQty
totalROIweighted = totalNotional > 0 ? (totalPnlUSD / totalNotional) * 100.0 : na
// ====== Nearest TP & R:R ======
float nearestTP = na
float nearestDistPrice = na
float nearestDistPct = na
float risk_pct = na
float reward_pct = na
float rr = na
var float tps = array.new_float()
array.clear(tps)
if use_tp1 and tp1 > 0
array.push(tps, tp1)
if use_tp2 and tp2 > 0
array.push(tps, tp2)
if use_tp3 and tp3 > 0
array.push(tps, tp3)
if use_tp4 and tp4 > 0
array.push(tps, tp4)
if use_tp5 and tp5 > 0
array.push(tps, tp5)
// nearest target in the trade direction (from current price)
if array.size(tps) > 0
for i = 0 to array.size(tps) - 1
_tp = array.get(tps, i)
cond = side=="Long" ? (_tp > close) : (_tp < close)
if cond
distP = math.abs(_tp - close)
if na(nearestDistPrice) or distP < nearestDistPrice
nearestDistPrice := distP
nearestTP := _tp
if not na(nearestDistPrice) and close != 0
nearestDistPct := (nearestDistPrice / close) * 100.0
float stop = stop_inp > 0 ? stop_inp : na
if not na(wAvgEntry) and not na(stop)
rawRisk = (side=="Long" ? (stop - wAvgEntry) : (wAvgEntry - stop)) / wAvgEntry * 100.0
risk_pct := math.abs(rawRisk)
if not na(wAvgEntry) and not na(nearestTP)
reward_pct := math.abs((side=="Long" ? (nearestTP - wAvgEntry) : (wAvgEntry - nearestTP)) / wAvgEntry * 100.0)
rr := (not na(risk_pct) and not na(reward_pct) and risk_pct != 0) ? reward_pct / risk_pct : na
// ====== Average R:R across all valid targets ======
float rr_avg = na
if not na(wAvgEntry) and not na(stop) and array.size(tps) > 0 and not na(risk_pct) and risk_pct != 0
float sum_rr = 0.0
int cnt_rr = 0
for i = 0 to array.size(tps) - 1
_tp = array.get(tps, i)
bool validDir = side=="Long" ? (_tp > wAvgEntry) : (_tp < wAvgEntry)
if validDir
_reward = math.abs((side=="Long" ? (_tp - wAvgEntry) : (wAvgEntry - _tp)) / wAvgEntry * 100.0)
_rr = _reward / risk_pct
sum_rr += _rr
cnt_rr += 1
rr_avg := cnt_rr > 0 ? (sum_rr / cnt_rr) : na
// ====== Entry/SL/TP Lines ======
var line entryLines = array.new_line(4, na)
for i = 0 to 3
ln = array.get(entryLines, i)
if array.get(ens, i) and array.get(entries, i) > 0
col = array.get(entryCols, i)
ent = array.get(entries, i)
ln := f_stickyHLine(ent, ln, col, 2)
array.set(entryLines, i, ln)
else
if not na(ln)
line.delete(ln)
array.set(entryLines, i, na)
var line slLine = na
if not na(stop)
slLine := f_stickyHLine(stop, slLine, color.new(color.red, 0), 1)
else
if not na(slLine)
line.delete(slLine)
slLine := na
var line tpLine1 = na
var line tpLine2 = na
var line tpLine3 = na
var line tpLine4 = na
var line tpLine5 = na
if use_tp1 and tp1 > 0
tpLine1 := f_stickyHLine(tp1, tpLine1, color.new(color.teal, 0), 1)
else
if not na(tpLine1)
line.delete(tpLine1)
tpLine1 := na
if use_tp2 and tp2 > 0
tpLine2 := f_stickyHLine(tp2, tpLine2, color.new(color.teal, 0), 1)
else
if not na(tpLine2)
line.delete(tpLine2)
tpLine2 := na
if use_tp3 and tp3 > 0
tpLine3 := f_stickyHLine(tp3, tpLine3, color.new(color.teal, 0), 1)
else
if not na(tpLine3)
line.delete(tpLine3)
tpLine3 := na
if use_tp4 and tp4 > 0
tpLine4 := f_stickyHLine(tp4, tpLine4, color.new(color.teal, 0), 1)
else
if not na(tpLine4)
line.delete(tpLine4)
tpLine4 := na
if use_tp5 and tp5 > 0
tpLine5 := f_stickyHLine(tp5, tpLine5, color.new(color.teal, 0), 1)
else
if not na(tpLine5)
line.delete(tpLine5)
tpLine5 := na
// ====== Build HUD Text ======
string txt = ""
// Per-entry rows
for i = 0 to 3
if array.get(ens, i) and array.get(entries, i) > 0
idx = i + 1
ent = array.get(entries, i)
pct = array.get(pcts, i)
pnlq = array.get(pnls, i)
roi = array.get(rois, i)
levX = array.get(levs, i)
txt += (txt=="" ? "" : " ") + "📌 Entry " + str.tostring(idx) + ": " + str.tostring(ent, format.mintick)
txt += " 📊 Live: " + (na(pct) ? "—" : str.tostring(pct, format.mintick) + "%") + " | 💵 " + (na(pnlq) ? "—" : "$" + f_usd_str(pnlq, usd_dp))
txt += " 🧮 ROI(x" + str.tostring(levX) + "): " + (na(roi) ? "—" : str.tostring(roi, format.mintick) + "%")
// Summary or test HUD
if txt != ""
if totalQty > 0
txt += " — — —"
txt += " ⚖️ Weighted Avg Entry: " + str.tostring(wAvgEntry, format.mintick)
if not na(stop)
txt += " ❌ SL: " + str.tostring(stop, format.mintick)
// Nearest target (from current price)
string tpInfo = "—"
if not na(nearestTP)
tpInfo := str.tostring(nearestTP, format.mintick) + (na(nearestDistPct) ? "" : " (Δ " + str.tostring(nearestDistPct, format.mintick) + "%)")
txt += " 🎯 Nearest: " + tpInfo
// R:R (nearest)
if not na(rr)
txt += " 📐 R:R (nearest): " + str.tostring(rr, format.mintick)
// Avg R:R across all valid TPs (by direction from weighted entry)
if not na(rr_avg)
txt += " 📐 Avg R:R (all valid TPs): " + str.tostring(rr_avg, format.mintick)
// Totals
txt += " 🧾 Total P/L: " + "$" + f_usd_str(totalPnlUSD, usd_dp)
txt += " 🧮 Weighted ROI (by Notional): " + (na(totalROIweighted) ? "—" : str.tostring(totalROIweighted, format.mintick) + "%")
else if force_show_hud
txt := "🧪 HUD is active. Fill Entry prices or tick ⚡. Enable TP/SL to see lines."
// ====== HUD Placement (near live price) ======
var label hud = na
atr_val = nz(ta.atr(atr_len), 0.0)
anchor_price = close
y_pos = na(anchor_price) ? na : anchor_price + (atr_val * hud_off_atr)
x_pos_base = bar_index
off = hud_side == "Right of price" ? hud_off_bars : -hud_off_bars
x_pos = lock_to_last_bar ? (barstate.islast ? (x_pos_base + off) : x_pos_base) : (x_pos_base + off)
// Pick label style by side:
// - Right of price → pointer on LEFT edge → style_label_left
// - Left of price → pointer on RIGHT edge → style_label_right
label_style = hud_side == "Right of price" ? label.style_label_left : label.style_label_right
if not na(y_pos) and txt != ""
if na(hud)
hud := label.new(x_pos, y_pos, txt, xloc=xloc.bar_index, style=label_style, textcolor=hud_txtc, color=hud_bg, size=to_size(hud_font))
else
label.set_x(hud, x_pos)
label.set_y(hud, y_pos)
label.set_text(hud, txt)
label.set_textcolor(hud, hud_txtc)
label.set_color(hud, hud_bg)
label.set_style(hud, label_style)
label.set_size(hud, to_size(hud_font))
else
if not na(hud)
label.delete(hud)
hud := na
P/L Panel + Multi Targets (4 Entries) – HUD near Price + Avg R:R//@version=6
indicator("P/L Panel + Multi Targets (4 Entries) – HUD near Price + Avg R:R", overlay=true, max_lines_count=500, max_labels_count=500)
// ====== General ======
side = input.string("Long", "Position Side", options= )
usd_dp = input.int(2, "USD decimals", minval=0, maxval=6)
// ====== HUD Settings ======
hud_font = input.string("large", "HUD font size", options= )
hud_bg = input.color(color.new(color.black, 0), "HUD background color")
hud_txtc = input.color(color.white, "HUD text color")
hud_side = input.string("Right of price", "HUD side", options= )
hud_off_bars = input.int(3, "Horizontal offset (bars)", minval=0, maxval=50)
hud_off_atr = input.float(0.2, "Vertical offset from price (ATR)", step=0.1)
atr_len = input.int(14, "ATR length for vertical offset", minval=1)
lock_to_last_bar = input.bool(true, "Lock HUD to the last bar")
// Show HUD even when there are no entries (test text)
force_show_hud = input.bool(true, "🔍 Show HUD even with no entries")
// ====== Shared SL & Targets ======
stop_inp = input.float(0.0, "Stop Loss (shared, optional)", step=0.0001)
use_tp1 = input.bool(false, "Enable Target 1")
tp1 = input.float(0.0, "Target 1 price", step=0.0001)
use_tp2 = input.bool(false, "Enable Target 2")
tp2 = input.float(0.0, "Target 2 price", step=0.0001)
use_tp3 = input.bool(false, "Enable Target 3")
tp3 = input.float(0.0, "Target 3 price", step=0.0001)
use_tp4 = input.bool(false, "Enable Target 4")
tp4 = input.float(0.0, "Target 4 price", step=0.0001)
use_tp5 = input.bool(false, "Enable Target 5")
tp5 = input.float(0.0, "Target 5 price", step=0.0001)
// ====== Four Independent Entries ======
group1 = "Entry 1"
en1 = input.bool(true, "Enable Entry 1", inline=group1)
lev1 = input.int(10, "Leverage", minval=1, maxval=200, inline=group1)
entry1 = input.float(0.0, "Entry 1 price", step=0.0001)
set_now1 = input.bool(false, "⚡ Set Entry1 = Current Price")
mode1 = input.string("USD (USDT)", "Size unit 1", options= )
sem1 = input.string("Margin (apply leverage)", "Size meaning 1", options= )
size1 = input.float(0.0, "Position size 1", step=0.0001)
baseLev1 = input.bool(false, "Apply leverage to 'Coin Quantity' (1)")
group2 = "Entry 2"
en2 = input.bool(false, "Enable Entry 2", inline=group2)
lev2 = input.int(10, "Leverage", minval=1, maxval=200, inline=group2)
entry2 = input.float(0.0, "Entry 2 price", step=0.0001)
set_now2 = input.bool(false, "⚡ Set Entry2 = Current Price")
mode2 = input.string("USD (USDT)", "Size unit 2", options= )
sem2 = input.string("Margin (apply leverage)", "Size meaning 2", options= )
size2 = input.float(0.0, "Position size 2", step=0.0001)
baseLev2 = input.bool(false, "Apply leverage to 'Coin Quantity' (2)")
group3 = "Entry 3"
en3 = input.bool(false, "Enable Entry 3", inline=group3)
lev3 = input.int(10, "Leverage", minval=1, maxval=200, inline=group3)
entry3 = input.float(0.0, "Entry 3 price", step=0.0001)
set_now3 = input.bool(false, "⚡ Set Entry3 = Current Price")
mode3 = input.string("USD (USDT)", "Size unit 3", options= )
sem3 = input.string("Margin (apply leverage)", "Size meaning 3", options= )
size3 = input.float(0.0, "Position size 3", step=0.0001)
baseLev3 = input.bool(false, "Apply leverage to 'Coin Quantity' (3)")
group4 = "Entry 4"
en4 = input.bool(false, "Enable Entry 4", inline=group4)
lev4 = input.int(10, "Leverage", minval=1, maxval=200, inline=group4)
entry4 = input.float(0.0, "Entry 4 price", step=0.0001)
set_now4 = input.bool(false, "⚡ Set Entry4 = Current Price")
mode4 = input.string("USD (USDT)", "Size unit 4", options= )
sem4 = input.string("Margin (apply leverage)", "Size meaning 4", options= )
size4 = input.float(0.0, "Position size 4", step=0.0001)
baseLev4 = input.bool(false, "Apply leverage to 'Coin Quantity' (4)")
// Quick set entries = current price
entry1 := (en1 and set_now1) ? close : entry1
entry2 := (en2 and set_now2) ? close : entry2
entry3 := (en3 and set_now3) ? close : entry3
entry4 := (en4 and set_now4) ? close : entry4
// ====== Helpers ======
to_size(s) =>
s == "tiny" ? size.tiny : s == "small" ? size.small : s == "normal" ? size.normal : s == "large" ? size.large : size.huge
f_usd_str(_val, _decimals) =>
na(_val) ? "—" : str.tostring(math.round(_val * math.pow(10, _decimals)) / math.pow(10, _decimals))
f_qty_base(mode, sem, size, entry, baseLev, lev) =>
float _qty = na
if mode == "USD (USDT)"
_qty := (size > 0 and entry > 0) ? ((sem == "Margin (apply leverage)" ? size * lev : size) / entry) : na
else
_qty := size > 0 ? (baseLev ? size * lev : size) : na
_qty
f_notional_quote(mode, sem, size, entry, lev, baseLev) =>
if mode == "USD (USDT)"
sem == "Margin (apply leverage)" ? size * lev : size
else
(baseLev ? size * lev : size) * entry
f_pnl_quote(side, entry, qty) =>
na(qty) or na(entry) ? na : (side=="Long" ? (close - entry) : (entry - close)) * qty
f_pct(side, entry) =>
na(entry) ? na : ((close - entry) / entry * 100.0) * (side=="Long" ? 1 : -1)
f_roi_pct(side, entry, lev) =>
na(entry) ? na : f_pct(side, entry) * lev
// NOTE: _lineIn must be a line, not a float
f_stickyHLine(_price, _lineIn, _color, _width) =>
var line _out = na
_out := _lineIn
if na(_out)
_out := line.new(bar_index-1, _price, bar_index+1, _price, xloc=xloc.bar_index, extend=extend.both, width=_width, style=line.style_dashed, color=_color)
else
line.set_xy1(_out, bar_index-1, _price)
line.set_xy2(_out, bar_index+1, _price)
line.set_color(_out, _color)
line.set_width(_out, _width)
_out
// ====== 4 Entries Calculations ======
var color entryCols = array.from(color.new(color.yellow, 0), color.new(color.orange, 0), color.new(color.teal, 0), color.new(color.fuchsia, 0))
bool ens = array.from(en1, en2, en3, en4)
float entries = array.from(entry1, entry2, entry3, entry4)
int levs = array.from(lev1, lev2, lev3, lev4)
string modes = array.from(mode1, mode2, mode3, mode4)
string sems = array.from(sem1, sem2, sem3, sem4)
float sizes = array.from(size1, size2, size3, size4)
bool baseLevs = array.from(baseLev1, baseLev2, baseLev3, baseLev4)
float qtys = array.new_float(4, na)
float pnls = array.new_float(4, na)
float pcts = array.new_float(4, na)
float rois = array.new_float(4, na)
float notionals = array.new_float(4, na)
for i = 0 to 3
if array.get(ens, i) and array.get(entries, i) > 0
ent = array.get(entries, i)
levX = array.get(levs, i)
modeX= array.get(modes, i)
semX = array.get(sems, i)
sizeX= array.get(sizes, i)
bLev = array.get(baseLevs, i)
qty = f_qty_base(modeX, semX, sizeX, ent, bLev, levX)
array.set(qtys, i, qty)
pnlq = f_pnl_quote(side, ent, qty)
array.set(pnls, i, pnlq)
pct = f_pct(side, ent)
array.set(pcts, i, pct)
roi = f_roi_pct(side, ent, levX)
array.set(rois, i, roi)
notq = f_notional_quote(modeX, semX, sizeX, ent, levX, bLev)
array.set(notionals, i, notq)
// ====== Totals & Weighted Avg Entry ======
float totalPnlUSD = 0.0
float totalNotional = 0.0
float totalQty = 0.0
float wAvgEntry = na
for i = 0 to 3
if not na(array.get(pnls, i))
totalPnlUSD += array.get(pnls, i)
if not na(array.get(notionals, i))
totalNotional += array.get(notionals, i)
if not na(array.get(qtys, i)) and array.get(entries, i) > 0
totalQty += array.get(qtys, i)
if totalQty > 0
num = 0.0
for i = 0 to 3
qi = array.get(qtys, i)
ei = array.get(entries, i)
if not na(qi) and ei > 0
num += qi * ei
wAvgEntry := num / totalQty
totalROIweighted = totalNotional > 0 ? (totalPnlUSD / totalNotional) * 100.0 : na
// ====== Nearest TP & R:R ======
float nearestTP = na
float nearestDistPrice = na
float nearestDistPct = na
float risk_pct = na
float reward_pct = na
float rr = na
var float tps = array.new_float()
array.clear(tps)
if use_tp1 and tp1 > 0
array.push(tps, tp1)
if use_tp2 and tp2 > 0
array.push(tps, tp2)
if use_tp3 and tp3 > 0
array.push(tps, tp3)
if use_tp4 and tp4 > 0
array.push(tps, tp4)
if use_tp5 and tp5 > 0
array.push(tps, tp5)
// nearest target in the trade direction (from current price)
if array.size(tps) > 0
for i = 0 to array.size(tps) - 1
_tp = array.get(tps, i)
cond = side=="Long" ? (_tp > close) : (_tp < close)
if cond
distP = math.abs(_tp - close)
if na(nearestDistPrice) or distP < nearestDistPrice
nearestDistPrice := distP
nearestTP := _tp
if not na(nearestDistPrice) and close != 0
nearestDistPct := (nearestDistPrice / close) * 100.0
float stop = stop_inp > 0 ? stop_inp : na
if not na(wAvgEntry) and not na(stop)
rawRisk = (side=="Long" ? (stop - wAvgEntry) : (wAvgEntry - stop)) / wAvgEntry * 100.0
risk_pct := math.abs(rawRisk)
if not na(wAvgEntry) and not na(nearestTP)
reward_pct := math.abs((side=="Long" ? (nearestTP - wAvgEntry) : (wAvgEntry - nearestTP)) / wAvgEntry * 100.0)
rr := (not na(risk_pct) and not na(reward_pct) and risk_pct != 0) ? reward_pct / risk_pct : na
// ====== Average R:R across all valid targets ======
float rr_avg = na
if not na(wAvgEntry) and not na(stop) and array.size(tps) > 0 and not na(risk_pct) and risk_pct != 0
float sum_rr = 0.0
int cnt_rr = 0
for i = 0 to array.size(tps) - 1
_tp = array.get(tps, i)
bool validDir = side=="Long" ? (_tp > wAvgEntry) : (_tp < wAvgEntry)
if validDir
_reward = math.abs((side=="Long" ? (_tp - wAvgEntry) : (wAvgEntry - _tp)) / wAvgEntry * 100.0)
_rr = _reward / risk_pct
sum_rr += _rr
cnt_rr += 1
rr_avg := cnt_rr > 0 ? (sum_rr / cnt_rr) : na
// ====== Entry/SL/TP Lines ======
var line entryLines = array.new_line(4, na)
for i = 0 to 3
ln = array.get(entryLines, i)
if array.get(ens, i) and array.get(entries, i) > 0
col = array.get(entryCols, i)
ent = array.get(entries, i)
ln := f_stickyHLine(ent, ln, col, 2)
array.set(entryLines, i, ln)
else
if not na(ln)
line.delete(ln)
array.set(entryLines, i, na)
var line slLine = na
if not na(stop)
slLine := f_stickyHLine(stop, slLine, color.new(color.red, 0), 1)
else
if not na(slLine)
line.delete(slLine)
slLine := na
var line tpLine1 = na
var line tpLine2 = na
var line tpLine3 = na
var line tpLine4 = na
var line tpLine5 = na
if use_tp1 and tp1 > 0
tpLine1 := f_stickyHLine(tp1, tpLine1, color.new(color.teal, 0), 1)
else
if not na(tpLine1)
line.delete(tpLine1)
tpLine1 := na
if use_tp2 and tp2 > 0
tpLine2 := f_stickyHLine(tp2, tpLine2, color.new(color.teal, 0), 1)
else
if not na(tpLine2)
line.delete(tpLine2)
tpLine2 := na
if use_tp3 and tp3 > 0
tpLine3 := f_stickyHLine(tp3, tpLine3, color.new(color.teal, 0), 1)
else
if not na(tpLine3)
line.delete(tpLine3)
tpLine3 := na
if use_tp4 and tp4 > 0
tpLine4 := f_stickyHLine(tp4, tpLine4, color.new(color.teal, 0), 1)
else
if not na(tpLine4)
line.delete(tpLine4)
tpLine4 := na
if use_tp5 and tp5 > 0
tpLine5 := f_stickyHLine(tp5, tpLine5, color.new(color.teal, 0), 1)
else
if not na(tpLine5)
line.delete(tpLine5)
tpLine5 := na
// ====== Build HUD Text ======
string txt = ""
// Per-entry rows
for i = 0 to 3
if array.get(ens, i) and array.get(entries, i) > 0
idx = i + 1
ent = array.get(entries, i)
pct = array.get(pcts, i)
pnlq = array.get(pnls, i)
roi = array.get(rois, i)
levX = array.get(levs, i)
txt += (txt=="" ? "" : " ") + "📌 Entry " + str.tostring(idx) + ": " + str.tostring(ent, format.mintick)
txt += " 📊 Live: " + (na(pct) ? "—" : str.tostring(pct, format.mintick) + "%") + " | 💵 " + (na(pnlq) ? "—" : "$" + f_usd_str(pnlq, usd_dp))
txt += " 🧮 ROI(x" + str.tostring(levX) + "): " + (na(roi) ? "—" : str.tostring(roi, format.mintick) + "%")
// Summary or test HUD
if txt != ""
if totalQty > 0
txt += " — — —"
txt += " ⚖️ Weighted Avg Entry: " + str.tostring(wAvgEntry, format.mintick)
if not na(stop)
txt += " ❌ SL: " + str.tostring(stop, format.mintick)
// Nearest target (from current price)
string tpInfo = "—"
if not na(nearestTP)
tpInfo := str.tostring(nearestTP, format.mintick) + (na(nearestDistPct) ? "" : " (Δ " + str.tostring(nearestDistPct, format.mintick) + "%)")
txt += " 🎯 Nearest: " + tpInfo
// R:R (nearest)
if not na(rr)
txt += " 📐 R:R (nearest): " + str.tostring(rr, format.mintick)
// Avg R:R across all valid TPs (by direction from weighted entry)
if not na(rr_avg)
txt += " 📐 Avg R:R (all valid TPs): " + str.tostring(rr_avg, format.mintick)
// Totals
txt += " 🧾 Total P/L: " + "$" + f_usd_str(totalPnlUSD, usd_dp)
txt += " 🧮 Weighted ROI (by Notional): " + (na(totalROIweighted) ? "—" : str.tostring(totalROIweighted, format.mintick) + "%")
else if force_show_hud
txt := "🧪 HUD is active. Fill Entry prices or tick ⚡. Enable TP/SL to see lines."
// ====== HUD Placement (near live price) ======
var label hud = na
atr_val = nz(ta.atr(atr_len), 0.0)
anchor_price = close
y_pos = na(anchor_price) ? na : anchor_price + (atr_val * hud_off_atr)
x_pos_base = bar_index
off = hud_side == "Right of price" ? hud_off_bars : -hud_off_bars
x_pos = lock_to_last_bar ? (barstate.islast ? (x_pos_base + off) : x_pos_base) : (x_pos_base + off)
// Pick label style by side:
// - Right of price → pointer on LEFT edge → style_label_left
// - Left of price → pointer on RIGHT edge → style_label_right
label_style = hud_side == "Right of price" ? label.style_label_left : label.style_label_right
if not na(y_pos) and txt != ""
if na(hud)
hud := label.new(x_pos, y_pos, txt, xloc=xloc.bar_index, style=label_style, textcolor=hud_txtc, color=hud_bg, size=to_size(hud_font))
else
label.set_x(hud, x_pos)
label.set_y(hud, y_pos)
label.set_text(hud, txt)
label.set_textcolor(hud, hud_txtc)
label.set_color(hud, hud_bg)
label.set_style(hud, label_style)
label.set_size(hud, to_size(hud_font))
else
if not na(hud)
label.delete(hud)
hud := na
TWS - ATR, VWAP, PDHLC, EMAThis indicator is combination of many indicator. Like ATR, VWAP, Previous day low, high, close & EMA.