Previous Highs and Lows (M, W, D) Displays previous Monthly, Weekly, and Daily key swing highs/lows with clean , timeframe-specific coloring. Essential structure reference for multi-timeframe traders!!
Your Monthly/Weekly/Daily structural backbone in one indicator!!!!
Penunjuk dan strategi
Intervalo de la confianza T.JODENStandard deviation measures how dispersed the data in a set is relative to its average (mean). A low standard deviation indicates that the data is clustered close to the mean, while a high standard deviation shows that it is widely spread, making it useful for evaluating consistency and risk (in finance).
This work provides two channels within a single indicator, making it more powerful for providing dual information.
The Confidence Interval-10 (CI-10) channel (FOMO and FUD) contains another channel representing the Standard Deviation of 14-day data (14-day SMA and 14-day VWMA).
All you have to do is adjust the last two data points to reduce the color of the channels, and you'll see the second channel appear almost magically.
Analyze the second channel within the main channel. This channel uses the 14-day Standard Deviation (STD-14), the 14-day SMA, and the 14-day VWMA.
NOTE: This is not investment or trading advice.
Users assume all risk of loss.
But if you profit from your investments using this indicator, remember that you've done well.
Crypto Options Confluence Overlay Crypto Options Confluence Overlay is a decision-first options framework designed to help crypto traders answer one core question clearly and consistently:
Should I trade CALLs, PUTs, or stand down today?
This indicator does not attempt to price options or replace Greeks. Instead, it focuses on timing, directional bias, and structured exits, using a confluence of price, volatility, momentum, and higher-timeframe context on the daily chart.
It is designed specifically for crypto options and perpetuals, where volatility is high and overstaying trades is often more dangerous than missing them.
What This Indicator Shows
1️⃣ Directional Bias (CALL / PUT / NO-TRADE)
CALL → bullish directional environment
PUT → bearish directional environment
NO-TRADE → mixed alignment (stand down)
This bias is derived from:
Mean trend alignment
Momentum structure (Stoch RSI behavior)
Volatility context (ATR + deviation bands)
Optional weekly directional filter
2️⃣ Timing Window
The indicator highlights whether a trade window is ACTIVE, BUILDING, or OFF.
ACTIVE → valid timing environment
BUILDING → momentum approaching, but not ready
OFF → no timing edge present
This prevents entering trades too early or after momentum has already passed.
3️⃣ Preferred Entry Zone (PEZ)
Shaded zones visually guide where entries are statistically cleaner, rather than chasing price.
Green PEZ → preferred CALL entry region
Red PEZ → preferred PUT entry region
These zones are informational — they help assess entry quality, not force entries.
4️⃣ Primary Exit (Early Profit Zone)
Instead of encouraging traders to hold for a full ATR move, the indicator introduces a Primary Exit, which represents a partial ATR objective.
This:
Reduces emotional decision-making
Encourages consistent profit capture
Aligns better with how options premiums often move
The Primary Exit is intentionally designed as a realistic exit, not a maximum move target.
5️⃣ ATR Target & Risk Context
For traders who want structure:
ATR Target → extended move reference
Band-based Risk Line → invalidation zone
These are context tools, not mandatory holds.
6️⃣ Confidence Score
Each trade environment is scored (e.g., 2/4, 3/4) based on alignment factors.
Higher scores indicate cleaner conditions, not guaranteed outcomes.
How to Use the Indicator (Model Trade Example)
Example: CALL Trade
Bias: CALL
Window: ACTIVE
Confidence: 3/4 or higher
Price Location: Inside or near GREEN PEZ
Entry: Near PEZ during the active window
Primary Exit: At the Primary Exit line
Optional Runner: Toward ATR target if momentum remains strong
Risk: Below the Band-1 risk line
If bias flips to NO-TRADE or PUT, the trade is considered invalid.
Example: PUT Trade
The same process applies in reverse:
Red PEZ
Downside Primary Exit
Risk above Band-1 high
What This Indicator Is — and Is Not
✔ Is
A structured decision engine
Designed for crypto options behavior
Focused on timing + exits
Effective for avoiding bad trades
✖ Is Not
A signal-only indicator
A replacement for position sizing
A guarantee of profit
A strategy that forces constant trading
Recommended Use
Daily timeframe
Liquid crypto pairs
Options or perpetual traders
Traders who value discipline over frequency
Final Note
This indicator will often say NO-TRADE — by design.
Standing down is considered a valid, successful outcome.
Options Confluence Overlay - Stocks (1D) The Options Confluence Overlay — Stocks is a daily timeframe indicator designed for equities and ETFs, with a focus on timing, structure, and risk clarity rather than frequent signals.
This tool combines price structure, volatility, and momentum timing into a single visual framework that helps traders decide when to trade, when to stand aside, and where risk and exits are clearly defined.
Unlike fast-signal indicators, this script emphasizes trade quality over trade quantity.
🔍 What the indicator does
The indicator evaluates four core components on the daily chart, with an optional weekly trend filter:
• Mean + Deviation Band (Band 1) to define structure
• ATR-based targets to project realistic price expansion
• Momentum timing using Stochastic RSI (cross or approach)
• Confluence scoring to allow or block trades
Only when these elements align does the indicator permit a CALL, PUT, or display NO-TRADE.
🟩 Preferred Entry Zone (PEZ)
When a CALL or PUT is allowed, the indicator highlights a Preferred Entry Zone (PEZ):
• CALL PEZ: Mean → Lower Band
• PUT PEZ: Mean → Upper Band
This zone represents areas where risk is better defined and entries are typically more favorable.
🎯 Primary Exit (Partial ATR)
Instead of encouraging traders to chase full volatility expansion, the indicator includes a Primary Exit level:
• A configurable percentage of ATR
• Designed to capture early, high-probability movement
• Especially useful for shorter-term trades or profit protection
Full ATR targets are still shown, but the Primary Exit is intended as the first decision point, not a promise of full extension.
🧠 Entry Quality (Informational)
When enabled, the dashboard displays an Entry Quality hint:
• PEZ Deep — price is deeper into the zone (higher potential, higher patience required)
• PEZ Shallow — price is closer to the mean (faster, but less extended setups)
This is informational only and does not block trades.
🚦 Trade states
The dashboard clearly communicates one of three states:
• CALL allowed
• PUT allowed
• NO-TRADE (conditions are mixed or incomplete)
The indicator is intentionally conservative during NO-TRADE periods.
⚠️ Important notes
• Designed for stocks and ETFs, not crypto
• Intended for daily timeframe analysis
• Not financial advice
• Always combine with proper risk management
📘 Model Trade Example (CALL)
The dashboard shows CALL allowed
Price pulls back into the green PEZ
Weekly filter confirms bullish direction
Enter near the PEZ (no chasing breakouts)
Risk: below Band 1 low
Primary Exit: at the yellow Primary Exit level
Optional: hold partial size toward full ATR target if momentum remains strong
If the dashboard changes to NO-TRADE, no new entries are taken.
📕 Model Trade Example (PUT)
The dashboard shows PUT allowed
Price rallies into the red PEZ
Weekly filter confirms bearish direction
Enter near resistance inside PEZ
Risk: above Band 1 high
Primary Exit: at the yellow Primary Exit level
Avoid holding through momentum exhaustion
Bullish, Bearish, & Normal RSI1. Identifying "True" Momentum (The Aqua/Fuchsia Logic)The most useful part of this script is the comparison between the three lines.Bullish Conviction (Aqua): When both the Bullish and Bearish lines are above the Normal RSI, it suggests that even on "down" candles (red candles), the price isn't losing significant ground. The overall structure is buoyant.Bearish Conviction (Fuchsia): When both are below the Normal RSI, it indicates that even when you get "up" candles (green candles), they lack the strength to lift the average momentum. The sellers are effectively "smothering" the bounces.
2. Spotting Hidden Weakness/Strength (Spread Analysis)The "Spread" (the gap between rsiBull and rsiBear) provides a unique utility:ScenarioInterpretationUtilityWide SpreadHigh volatility and indecision. Green candles are very strong, but red candles are also very weak.Avoid trend-following; wait for a "squeeze" or narrowing.Tight SpreadHigh agreement in price action. Most candles are moving in a similar direction or with similar intensity.Great for identifying stable, trending moves with low noise.Bull/Bear CrossIf the Bullish RSI crosses above the Bearish RSI significantly.Can act as an early entry signal before the Standard RSI hits the 50-midline.
3. Practical Strategy Use CasesFilter for Breakouts: If you see a price breakout but the RSI color remains Gray, the move might lack "conviction." You ideally want to see the color flip to Aqua (for long) or Fuchsia (for short) as the breakout occurs.Exhaustion Signal: If the Normal RSI is overbought ($>70$) but the rsiBull begins to dip toward the rsiNormal, it suggests that the "green candle strength" is waning even if the price is staying high—a potential warning of a reversal.Potential Drawbacks to WatchLag: Like all RSI-based indicators, this is lagging. Because you are using a 14-period lookback on three different calculations, it may take a few bars to confirm a sentiment shift.Whipsaw in Sideways Markets: In a tight range-bound market, the color may flip between Aqua and Fuchsia rapidly, creating "noise."Pro-Tip: This indicator would be most effective when used in conjunction with Volume. If you get an "Aqua" signal on rising volume, the probability of a sustained trend is significantly higher.
Spearman Correlation🔗 Spearman Correlation – Ranked Relationship Tracker
Overview:
This indicator calculates and plots the Spearman Rank Correlation Coefficient between the current chart’s asset and a custom comparison ticker (the example shown is BTC vs the OTHERS market cap for crypto). Unlike Pearson correlation, which measures linear relationships, Spearman correlation captures monotonic (ranked) relationships—making it better suited for analysing assets that move in sync but not necessarily in a linear fashion.
🧠 What It Does:
Computes ranked correlation between two assets over a user-defined lookback period
Smooths the correlation curve for better readability
Visually shades the background by correlation strength and direction:
🟩 Strong Positive (+0.5 to +1)
🟨 Weak Positive (+0.1 to +0.5)
⬜ No Correlation (–0.1 to +0.1)
🟧 Weak Negative (–0.5 to –0.1)
🟥 Strong Negative (–1 to –0.5)
⚙️ User Inputs:
Lookback Period: Number of bars used to calculate correlation
Comparison Ticker: Choose any asset to compare against
Shading Toggles: Customize which correlation zones are highlighted
📈 Use Cases:
Identify evolving relationships between assets (e.g., BTC vs DXY, ETH vs SPX)
Spot when assets become inversely correlated or lose correlation entirely
Track regime shifts where traditional relationships break down or re-align
Use alongside trend or momentum strategies to add a cross-asset confirmation layer
🔍 Interpreting the Correlation:
+1 → Perfect positive (ranks match exactly)
+0.5 to +1 → Strong positive relationship
+0.1 to +0.5 → Weak but positive relationship
–0.1 to +0.1 → Essentially uncorrelated
–0.5 to –0.1 → Weak negative correlation
–1 to –0.5 → Strong inverse relationship
–1 → Perfect negative (rankings are completely opposite)
🧪 Technical Notes:
Calculation uses ranked returns to better reflect monotonic relationships
Smoothed with a simple moving average (SMA) for stability
Arrays are managed internally to maintain performance and adaptability
This script is ideal for traders seeking deeper insight into cross-asset dynamics, portfolio hedging, or timing divergence-based strategies.
Directional Comparisons - Two Tickers📊 Directional Comparisons – Two Tickers
Overview:
This tool allows you to visually and statistically compare the directional behaviour of any two assets on any chart timeframe. It identifies and color-codes each bar based on how both the current asset and your chosen comparison asset performed in that period (e.g., both up, both down, diverging). A statistical summary table dynamically updates in the corner of your chart, tracking the probability and streak performance of each condition.
🛠 How It Works:
Each candle is analysed and color-coded based on the relationship between the current chart's asset and a comparison asset of your choice:
✅ Green – Both tickers closed higher (bullish alignment)
🔻 Red – Both tickers closed lower (bearish alignment)
🔷 Blue – Current ticker up, comparison ticker down (positive divergence)
🟧 Orange – Current ticker down, comparison ticker up (negative divergence)
You can toggle each colour condition on/off independently.
📈 Statistical Table (Top Right):
For the candles in the visible chart range, the indicator displays:
The frequency (probability) of each condition
Longest, shortest, and average streaks for each condition
Average % change for both the current and comparison asset under each scenario
All stats auto-update as you zoom or scroll through the chart.
🔧 User Inputs:
Comparison Ticker: Choose any ticker symbol to compare against the current chart
Toggle Conditions: Enable or disable individual directional conditions (color-coded)
✅ Use Cases:
Spot high-probability alignment zones between two assets (e.g., BTC vs ETH, SPX vs VIX)
Identify divergence opportunities for trading signals
Analyse historical relationships and co-movements between assets
Perform correlation streak studies directly on the chart
🔍 Notes:
The script works across all timeframes (1min to monthly).
Stats only consider visible bars on your chart for responsiveness.
Ideal for pair traders, macro analysts, or anyone interested in cross-asset relationships.
EMA 8 48 System v1Short Description:
A trend-following indicator using EMA crossovers, ATR-based volatility filter, and a cooldown period to reduce false signals. Designed for clear buy/sell signals in trending markets.
Full Description:
What is this indicator?
This script implements a dual EMA crossover system (8-period and 48-period EMAs) with a trend filter (EMA200), ATR-based volatility filter, and a cooldown period to avoid overtrading.
It visually plots EMAs, buy/sell signals, and ATR-based stop loss/target levels.
Why is it useful?
Helps traders identify high-probability trend entries and avoid choppy, low-volatility conditions.
Reduces false signals by requiring trend confirmation, sufficient volatility, and spacing out trades.
Suitable for intraday and swing trading on most liquid assets.
When to use:
Best used in markets showing clear trends (not sideways).
Works on most timeframes, but higher timeframes (15m, 1h, 4h, daily) tend to give more reliable signals.
How to spot buy and sell:
Buy: Green “BUY” label appears when EMA8 crosses above EMA48, price is above EMA200, and ATR is above the minimum threshold.
Sell: Red “SELL” label appears when EMA8 crosses below EMA48, price is below EMA200, and ATR is above the minimum threshold.
ATR-based stop loss and target levels are plotted for each signal.
Additional tips:
Adjust the minimum ATR and cooldown settings to match your asset’s volatility and your trading style.
Use in conjunction with price action or higher timeframe analysis for best results.
Avoid trading during low volatility or sideways markets, as signals may be less reliable.
Always backtest and forward-test before using live.
How to add signals and update settings:
Use the script’s input panel to adjust EMA lengths, ATR settings, minimum ATR, and cooldown period.
To add alerts, use TradingView’s “Add Alert” feature and select the buy or sell conditions from the script’s alert options.
For further customization, you can edit the script to add additional filters or notification logic.
This indicator is for educational purposes only. Always use proper risk management and do your own research before trading.
Disclaimer:
This script is for informational and educational purposes only and does not constitute financial advice or a recommendation to buy or sell any financial instrument.
Trading involves risk. Past performance is not indicative of future results. Always do your own research and use proper risk management.
The author is not responsible for any losses incurred from the use of this script. By using this script, you agree to take full responsibility for your trading decisions.
Micro Futures Risk Calculator (Minimal)risk calculator based off of stop distance. to keep risk consistent for consistent growth
Rolling DrawdownRolling Drawdown, trying to get an auto updating drawdown. work in progress. will edit in future
Crypto Session Range 📄 INDICATOR DESCRIPTION (ENGLISH)
Crypto Session Range (Custom Timezone) is a lightweight and accurate session-based indicator designed specifically for cryptocurrency markets (24/7).
This indicator allows traders to define custom trading time windows using any global timezone, solving common issues found in traditional session indicators that are built for stock markets.
🔹 Key Features
Custom timezone support (e.g. America/Puerto_Rico, America/New_York, UTC)
Up to 3 configurable trading sessions
Visual background highlighting during active sessions
Automatic High & Low range tracking for each session
Optional range extension after the session ends
Works on all crypto pairs and timeframes
🔹 Who Is This For?
Crypto traders who want precise session control
Day traders, scalpers, and session-based strategies
Traders who operate during specific market windows (London / NY / custom)
🔹 Notes
This indicator is not restricted to exchange trading hours and is fully compatible with 24/7 markets like crypto, unlike many default session tools.
Trap longs - Hamza Naveed// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
//@version=5
indicator("Trap Longs - Hamza Naveed", max_labels_count = 500, overlay = false, format = format.volume)
g1 = '📊 Net Positions '
g2 = '📈 Moving Averages (VWMA/EMA) '
g3 = '⚙️ Additional Settings '
g4 = '🎚️ Profile '
g5 = '🖥️ Statistics '
g6 = '⚖️ Divergences'
// User inputs - General settings
dtype = input.string('Net Positions', 'Type', options = )
disp = input.string('Candles', 'Display as', options = )
cumu = input.string('Full Data', 'Cumulation', options = )
denom = input.string('Quote Currency', 'Quoted in', options = )
// User inputs - Data Source Settings
binance = input.bool(true, 'Binance USDT.P', inline = 'src')
binance2 = input.bool(true, 'Binance USD.P', inline = 'src')
binance3 = input.bool(true, 'Binance BUSD.P', inline = 'src2')
bitmex = input.bool(true, 'BitMEX USD.P', inline = 'src2')
bitmex2 = input.bool(true, 'BitMEX USDT.P ', inline = 'src3')
kraken = input.bool(true, 'Kraken USD.P', inline = 'src3')
// User inputs - Net Positions
showL = input.bool(true, 'NET LONGS ►', group = g1, inline='l')
showS = input.bool(false, 'NET SHORTS ►', group = g1, inline='s')
showD = input.bool(false, 'NET DELTA ►', group = g1, inline='d')
showR = input.bool(false, 'NET RATIO ►', group = g1, inline='r')
pcolL = input.color(#a5d6a7, '', group = g1, inline = 'l')
ncolL = input.color(#f77c80, '', group = g1, inline = 'l')
lcolL = input.color(#a5d6a7, '━', group = g1, inline = 'l')
pcolS = input.color(#a5d6a7, '', group = g1, inline = 's')
ncolS = input.color(#f77c80, '', group = g1, inline = 's')
lcolS = input.color(#faa1a4, '━', group = g1, inline = 's')
pcolD = input.color(#a5d6a7, '', group = g1, inline = 'd')
ncolD = input.color(#f77c80, '', group = g1, inline = 'd')
lcolD = input.color(#90bff9, '━', group = g1, inline = 'd')
pcolR = input.color(#a5d6a7, '', group = g1, inline = 'r')
ncolR = input.color(#f77c80, '', group = g1, inline = 'r')
lcolR = input.color(#f9d690, '━', group = g1, inline = 'r')
// User inputs - Net Positions EMAs
mat = input.string('VWMA', 'Type', options= , group=g2)
emaL = input.bool(false, 'LONGS ', group=g2, inline='emal')
emaS = input.bool(false, 'SHORTS ', group=g2, inline='emas')
emaD = input.bool(false, 'DELTA ',group=g2, inline='emad')
emaR = input.bool(false, 'RATIO ',group=g2, inline='emar')
emaLl = input.int(100, '', group=g2, inline='emal')
emaSl = input.int(100, '', group=g2, inline='emas')
emaDl = input.int(100, '', group=g2, inline='emad')
emaRl = input.int(100, '', group=g2, inline='emar')
emaLc = input.color(color.rgb(165, 214, 167, 60), '', group=g2, inline='emal')
emaSc = input.color(color.rgb(250, 161, 164, 60), '', group=g2, inline='emas')
emaDc = input.color(color.rgb(144, 191, 249, 60), '', group=g2, inline='emad')
emaRc = input.color(color.rgb(249, 214, 144, 60), '', group=g2, inline='emar')
// User inputs - Additional settings
volhm = input.bool(false, 'Volume HM', group=g3, inline='vol')
volc2 = input.color(color.rgb(49, 121, 245),'', group=g3, inline = 'vol')
offs = input.int (10, 'Label Offset', group=g3)
length = input.int (14, 'Position RSI Length', group=g3)
vlbl = input.bool(true, 'Value Labels', group=g3, inline='lv')
nlbl = input.bool(true, 'Data Labels', group=g3, inline='lv')
wick = input.bool(false, 'Show Candle Wicks', group=g3)
// User inputs - Profile settings
prof = input.bool (false, 'Generate a profile', group=g4)
profsrc = input.string('Net Longs', 'Profile Data', options = , group=g4)
vapct = input.float (70, 'Value Area %', minval = 5, maxval = 95, group = g4)
ori = input.string("Left", 'Position', options = , group = g4)
profSize = input.int (2, 'Node Size', minval = 1, group = g4)
rows = input.int (40, 'Rows', minval = 6, maxval = 500, step = 25, group = g4) - 1
vancol = input.color (color.new(color.blue, 75), 'Node Colors ', group = g4, inline = 'nc')
nvancol = input.color (color.new(color.gray, 75), '━', group = g4, inline = 'nc')
poc = input.bool (false, 'POC', group = g4, inline = 'POC'),
poccol = input.color (color.new(color.red, 50), ' ', group = g4, inline = "POC")
val = input.bool (false, 'VA', group = g4, inline = "VA")
vafill = input.color (color.new(color.blue, 95), ' ', group = g4, inline = 'VA')
// User inputs - Statistics
stats = input.bool(false, 'Show Stats', group = g5)
chg_b = input.int(50, 'Bars Back', group = g5)
tablevpos = input.string('Horizontal', 'Orientation', options= , group = g5)
tablepos = input.string('Bottom Center', 'Position', options= , group = g5)
stat_oi = input.bool(true, 'OI ━', group = g5, inline = 'oi')
stat_nl = input.bool(true, 'NL ━', group = g5, inline = 'nl')
stat_ns = input.bool(true, 'NS ━', group = g5, inline = 'ns')
stat_nd = input.bool(true, 'ND ━', group = g5, inline = 'nd')
stat_oi_c = input.bool(true, 'OI Change ━', group = g5, inline = 'oi')
stat_nl_c = input.bool(true, 'NL Change ━', group = g5, inline = 'nl')
stat_ns_c = input.bool(true, 'NS Change ━', group = g5, inline = 'ns')
stat_nd_c = input.bool(true, 'ND Change ━', group = g5, inline = 'nd')
stat_oi_r = input.bool(true, 'OI RSI', group = g5, inline = 'oi')
stat_nl_r = input.bool(true, 'NL RSI', group = g5, inline = 'nl')
stat_ns_r = input.bool(true, 'NS RSI', group = g5, inline = 'ns')
stat_nd_r = input.bool(true, 'ND RSI', group = g5, inline = 'nd')
// User inputs - Divergence Finder
showdiv = input.bool(false, 'Divergence finder', group = g6)
divsrc = input.string('Net Longs', 'Source', options = , group=g6)
pivotDistance = input.int(5, 'Maximum Distance', minval=0, group=g6)
leftPivot = input.int(8, 'Lookback Bars Left', minval=1, group=g6)
rightPivot = input.int(8, 'Lookback Bars Right', minval=1, group=g6)
pHH_npLH = input.bool(true, 'Price HH + Data LH', group = g6, inline='div1')
pLH_npHH = input.bool(true, 'Price LH + Data HH', group = g6, inline='div2')
pLL_npHL = input.bool(true, 'Price LL + Data HL ', group = g6, inline='div3')
pHL_npLL = input.bool(true, 'Price HL + Data LL ', group = g6, inline='div4')
pHH_npLHcol = input.color(color.red, '', group = g6, inline='div1')
pLH_npHHcol = input.color(color.red, '', group = g6, inline='div2')
pLL_npHLcol = input.color(color.green, '', group = g6, inline='div3')
pHL_npLLcol = input.color(color.green, '', group = g6, inline='div4')
// Getting OI data
mex = syminfo.basecurrency=='BTC' ? 'XBT' : string(syminfo.basecurrency)
= request.security('BINANCE' + ":" + string(syminfo.basecurrency) + 'USDT.P_OI', timeframe.period, [close-close , close], ignore_invalid_symbol = true)
= request.security('BINANCE' + ":" + string(syminfo.basecurrency) + 'USD.P_OI', timeframe.period, [close-close , close], ignore_invalid_symbol = true)
= request.security('BINANCE' + ":" + string(syminfo.basecurrency) + 'BUSD.P_OI', timeframe.period, [close-close , close], ignore_invalid_symbol = true)
= request.security('BITMEX' + ":" + mex + 'USD.P_OI', timeframe.period, [close-close , close], ignore_invalid_symbol = true)
= request.security('BITMEX' + ":" + mex + 'USDT.P_OI', timeframe.period, [close-close , close], ignore_invalid_symbol = true)
= request.security('KRAKEN' + ":" + string(syminfo.basecurrency) + 'USD.P_OI', timeframe.period, [close-close , close], ignore_invalid_symbol = true)
deltaOI = (binance ? nz(oid1,0) : 0) + (binance2 ? nz(oid2,0)/close : 0) + (binance3 ? nz(oid3,0) : 0) + (bitmex ? nz(oid4,0)/close : 0) + (bitmex2 ? nz(oid5,0)/close : 0) + (kraken ? nz(oid6,0)/close : 0)
OI = (binance ? nz(oi1,0) : 0) + (binance2 ? nz(oi2,0)/close : 0) + (binance3 ? nz(oi3,0) : 0) + (bitmex ? nz(oi4,0)/close : 0) + (bitmex2 ? nz(oi5,0)/close : 0) + (kraken ? nz(oi6,0)/close : 0)
// Conditions for positions entering and exiting
priceUP = close>open
priceDOWN = close0
oiDOWN = deltaOI<0
newlongs = oiUP and priceUP
rektlongs = oiDOWN and priceDOWN
newshorts = oiUP and priceDOWN
rektshorts = oiDOWN and priceUP
// Visible range
vrc = cumu=='Visible Range' ? time > chart.left_visible_bar_time and time <= chart.right_visible_bar_time : true
// Cumulation of positions entering and exiting
longs_entering = ta.cum(newlongs and vrc ? (denom=='Base Currency' ? deltaOI : deltaOI * close) : 0)
longs_exiting = ta.cum(rektlongs and vrc ? (denom=='Base Currency' ? deltaOI : deltaOI * close) : 0)
shorts_entering = ta.cum(newshorts and vrc ? (denom=='Base Currency' ? deltaOI : deltaOI * close) : 0)
shorts_exiting = ta.cum(rektshorts and vrc ? (denom=='Base Currency' ? deltaOI : deltaOI * close) : 0)
// Output data
net_longs = longs_entering - math.abs(longs_exiting)
net_shorts = shorts_entering - math.abs(shorts_exiting)
net_delta = net_longs - net_shorts
net_ratio = net_longs / net_shorts
// Calculating Relative Strength
longs_strength = ta.rsi(net_longs, length)
shorts_strength = ta.rsi(net_shorts, length)
delta_strength = ta.rsi(net_delta, length)
ratio_strength = ta.rsi(net_ratio, length)
oi_strength = ta.rsi(OI, length)
// Calculating candle OHLC
src = dtype=='Net Positions' ? net_longs : longs_strength
OpenL = wick ? ta.sma(src , 2) : src
HighL = ta.highest(src, 1)
LowL = ta.lowest(src, 1)
CloseL = wick ? ta.sma(src, 2) : src
src2 = dtype=='Net Positions' ? net_shorts : shorts_strength
OpenS = wick ? ta.sma(src2 , 2) : src2
HighS = ta.highest(src2, 1)
LowS = ta.lowest(src2, 1)
CloseS = wick ? ta.sma(src2, 2) : src2
src3 = dtype=='Net Positions' ? net_delta : delta_strength
OpenD = wick ? ta.sma(src3 , 2) : src3
HighD = ta.highest(src3, 1)
LowD = ta.lowest(src3, 1)
CloseD = wick ? ta.sma(src3, 2) : src3
src4 = dtype=='Net Positions' ? net_ratio : ratio_strength
OpenR = wick ? ta.sma(src4 , 2) : src4
HighR = ta.highest(src4, 1)
LowR = ta.lowest(src4, 1)
CloseR = wick ? ta.sma(src4, 2) : src4
// Calculating EMAs
Lema = mat=='EMA' ? ta.ema(src, emaLl) : ta.vwma(src, emaLl)
Sema = mat=='EMA' ? ta.ema(src2, emaSl) : ta.vwma(src2, emaSl)
Dema = mat=='EMA' ? ta.ema(src3, emaDl) : ta.vwma(src3, emaDl)
Rema = mat=='EMA' ? ta.ema(src4, emaRl) : ta.vwma(src4, emaRl)
// Conditions
lcondL = showL and (disp=='Line' or disp=='Columns'), ccondL = showL and disp=='Candles'
lcondS = showS and (disp=='Line' or disp=='Columns'), ccondS = showS and disp=='Candles'
lcondD = showD and (disp=='Line' or disp=='Columns'), ccondD = showD and disp=='Candles'
lcondR = showR and (disp=='Line' or disp=='Columns'), ccondR = showR and disp=='Candles'
// Plotting Lines
plot(lcondL ? src : na, title="Net Longs", color=disp=='Line' ? lcolL : (net_longs >0 ? pcolL : ncolL), linewidth=1, style = disp=='Line' ? plot.style_line : disp=='Columns' ? plot.style_columns : na, editable = false)
plot(lcondS ? src2 : na, title="Net Shorts", color=disp=='Line' ? lcolS : (net_shorts >0 ? pcolS : ncolS), linewidth=1, style = disp=='Line' ? plot.style_line : disp=='Columns' ? plot.style_columns : na, editable = false)
plot(lcondD ? src3 : na, title="Net Shorts", color=disp=='Line' ? lcolD : (net_delta >0 ? pcolD : ncolD), linewidth=1, style = disp=='Line' ? plot.style_line : disp=='Columns' ? plot.style_columns : na, editable = false)
plot(lcondR ? src4 : na, title="Net Ratio", color=disp=='Line' ? lcolR : (net_ratio >0 ? pcolR : ncolR), linewidth=1, style = disp=='Line' ? plot.style_line : disp=='Columns' ? plot.style_columns : na, editable = false)
// Plotting Candles
plotcandle(ccondL ? OpenL : na, ccondL ? HighL : na, ccondL ? LowL : na, ccondL ? CloseL : na, "Longs", CloseL>OpenL ? pcolL : ncolL, CloseL>OpenL ? pcolL : ncolL, false, bordercolor = CloseL>OpenL ? pcolL : ncolL)
plotcandle(ccondS ? OpenS : na, ccondS ? HighS : na, ccondS ? LowS : na, ccondS ? CloseS : na, "Shorts", CloseS>OpenS ? pcolS : ncolS, CloseS>OpenS ? pcolS : ncolS, false, bordercolor = CloseS>OpenS ? pcolS : ncolS)
plotcandle(ccondD ? OpenD : na, ccondD ? HighD : na, ccondD ? LowD : na, ccondD ? CloseD : na, "Delta", CloseD>OpenD ? pcolD : ncolD, CloseD>OpenD ? pcolD : ncolD, false, bordercolor = CloseD>OpenD ? pcolD : ncolD)
plotcandle(ccondR ? OpenR : na, ccondR ? HighR : na, ccondR ? LowR : na, ccondR ? CloseR : na, "Ratio", CloseR>OpenR ? pcolR : ncolR, CloseR>OpenR ? pcolR : ncolR, false, bordercolor = CloseR>OpenR ? pcolR : ncolR)
// Plotting EMAs
plot(emaL ? Lema : na, color=emaLc, editable = false)
plot(emaS ? Sema : na, color=emaSc, editable = false)
plot(emaD ? Dema : na, color=emaDc, editable = false)
plot(emaR ? Rema : na, color=emaRc, editable = false)
// Plotting Relative Strength
plot(dtype=='Position RSI' ? 100 : na, color=color.rgb(120, 123, 134, 90), title = 'RSI 100')
plot(dtype=='Position RSI' ? 70 : na, color=color.rgb(120, 123, 134, 72), title = 'RSI 70')
plot(dtype=='Position RSI' ? 50 : na, color=color.rgb(120, 123, 134, 90), title = 'RSI 50')
plot(dtype=='Position RSI' ? 30 : na, color=color.rgb(120, 123, 134, 72), title = 'RSI 30')
plot(dtype=='Position RSI' ? 0 : na, color=color.rgb(120, 123, 134, 90), title = 'RSI 0')
// Volume Heatmap
vol = volume
volmax = ta.highest(volume, 50)
col = color.from_gradient(volume, 0, volmax, chart.bg_color, volc2)
plotshape(time>chart.left_visible_bar_time and volhm, style=shape.square, size=size.normal,location = location.bottom, color=col, editable = false)
// Labels
if vlbl and disp=='Candles'
vLlabel = showL ? label.new(bar_index, CloseL>OpenL ? HighL : LowL, newlongs or rektlongs ? str.tostring(deltaOI, format.volume) : na, size = size.auto, color=color.rgb(255, 255, 255, 100), textcolor = chart.fg_color, style = CloseL>OpenL ? label.style_label_down : label.style_label_up) : na
vSlabel = showS ? label.new(bar_index, CloseS>OpenS ? HighS : LowS, newshorts or rektshorts ? str.tostring(deltaOI, format.volume) : na, size = size.auto, color=color.rgb(255, 255, 255, 100), textcolor = chart.fg_color, style = CloseS>OpenS ? label.style_label_down : label.style_label_up) : na
vDlabel = showD ? label.new(bar_index, CloseD>OpenD ? HighD : LowD, str.tostring(deltaOI, format.volume), size = size.auto, color=color.rgb(255, 255, 255, 100), textcolor = chart.fg_color, style = CloseD>OpenD ? label.style_label_down : label.style_label_up) : na
vRlabel = showR ? label.new(bar_index, CloseR>OpenR ? HighR : LowR, str.tostring(deltaOI, format.volume), size = size.auto, color=color.rgb(255, 255, 255, 100), textcolor = chart.fg_color, style = CloseR>OpenR ? label.style_label_down : label.style_label_up) : na
if nlbl and disp!='Columns'
Llabel = showL ? label.new(bar_index+offs, src, 'NET LONGS', size = size.tiny, color=lcolL, textcolor = color.black, style = label.style_label_left) : na
Slabel = showS ? label.new(bar_index+offs, src2, 'NET SHORTS', size = size.tiny, color=lcolS, textcolor = color.black, style = label.style_label_left) : na
Dlabel = showD ? label.new(bar_index+offs, src3, 'NET DELTA', size = size.tiny, color=lcolD, textcolor = color.black, style = label.style_label_left) : na
Rlabel = showR ? label.new(bar_index+offs, src4, 'NET RATIO', size = size.tiny, color=lcolR, textcolor = color.black, style = label.style_label_left) : na
label.delete(Llabel )
label.delete(Slabel )
label.delete(Dlabel )
label.delete(Rlabel )
// Generating a profile - Code from @KioseffTrading's "Profile Any Indicator" script (used with their permission)
srcp = profsrc=='Net Longs' ? src : profsrc=='Net Shorts' ? src2 : profsrc=='Net Delta' ? src3 : src4
var int timeArray = array.new_int()
var float dist = array.new_float()
var int x2 = array.new_int(rows + 1, 5)
var vh = matrix.new(1, 1)
array.unshift(timeArray, math.round(time))
if prof and time >= chart.left_visible_bar_time and time <= chart.right_visible_bar_time
matrix.add_col(vh)
matrix.set(vh, 0, matrix.columns(vh) - 1, srcp)
if prof and barstate.islast
= switch ori
"Left" =>
=>
calc = (matrix.max(vh) - matrix.min(vh)) / (rows + 1)
for i = 0 to rows
array.push(dist, matrix.min(vh) + (i * calc))
for i = 1 to matrix.columns(vh) - 1
for x = 0 to array.size(dist) - 1
if matrix.get(vh, 0, i) >= matrix.get(vh, 0, i - 1)
if array.get(dist, x) >= matrix.get(vh, 0, i - 1) and array.get(dist, x) <= matrix.get(vh, 0, i)
array.set(x2, x, array.get(x2, x) + profSize)
else
if array.get(dist, x) >= matrix.get(vh, 0, i) and array.get(dist, x) <= matrix.get(vh, 0, i - 1)
array.set(x2, x, array.get(x2, x) + profSize)
boc = array.new_box()
for i = 1 to rows
right = array.get(timeArray, n + array.get(x2, i))
if ori == "Left"
switch math.sign(n - array.get(x2, i))
-1 => right := chart.right_visible_bar_time
=> right := array.get(timeArray, n - array.get(x2, i))
array.push(boc, box.new(pos, array.get(dist, i - 1),
right, array.get(dist, i), xloc = xloc.bar_time, border_color =
nvancol, bgcolor = nvancol
))
if i == rows
array.push(boc, box.new(pos, array.get(dist, array.size(dist) - 1),
right, array.get(dist, array.size(dist) - 1) + calc, xloc = xloc.bar_time, border_color =
nvancol, bgcolor = nvancol
))
array.shift(x2), nx = array.indexof(x2, array.max(x2))
nz = nx - 1, nz2 = 0, nz3 = 0, nz4 = 0
for i = 0 to array.size(x2) - 1
if nz > -1 and nx <= array.size(x2) - 1
switch array.get(x2, nx) >= array.get(x2, nz)
true => nz2 += array.get(x2, nx), nx += 1
=> nz2 += array.get(x2, nz), nz -= 1
else if nz <= -1
nz2 += array.get(x2, nx), nx += 1
else if nx >= array.size(x2)
nz2 += array.get(x2, nz), nz -= 1
if nz2 >= array.sum(x2) * (vapct / 100)
nz3 := nx <= array.size(x2) - 1 ? nx : array.size(x2) - 1, nz4 := nz <= -1 ? 0 : nz
break
for i = nz3 to nz4
box.set_border_color(array.get(boc, i), vancol)
box.set_bgcolor(array.get(boc, i), vancol)
if poc
var pocL = line(na)
y = math.avg(box.get_top(array.get(boc, array.indexof(x2, array.max(x2)))), box.get_bottom(array.get(boc, array.indexof(x2, array.max(x2)))))
if na(pocL)
pocL := line.new(chart.left_visible_bar_time, y, chart.right_visible_bar_time, y, xloc = xloc.bar_time, color = poccol, width = 1)
else
line.set_xy1(pocL, chart.left_visible_bar_time, y)
line.set_xy2(pocL, chart.right_visible_bar_time, y)
if val
var vaup = line(na), var vadn = line(na)
ydn = box.get_bottom(array.get(boc, nz3)), yup = box.get_top(array.get(boc, nz4))
if na(vaup)
vadn := line.new(chart.left_visible_bar_time, ydn, chart.right_visible_bar_time, ydn, xloc = xloc.bar_time, color = vancol, width = 1)
vaup := line.new(chart.left_visible_bar_time, yup, chart.right_visible_bar_time, yup, xloc = xloc.bar_time, color = vancol, width = 1)
else
line.set_xy1(vadn, chart.left_visible_bar_time, ydn), line.set_xy2(vadn, chart.right_visible_bar_time, ydn)
line.set_xy1(vaup, chart.left_visible_bar_time, yup), line.set_xy2(vaup, chart.right_visible_bar_time, yup)
linefill.new(vadn, vaup, vafill)
//Generating tables for Stats
switchpos(tablepos) =>
switch tablepos
'Top Left' => position.top_left
'Top Center' => position.top_center
'Top Right' => position.top_right
'Bottom Left' => position.bottom_left
'Bottom Center' => position.bottom_center
'Bottom right' => position.bottom_right
dataTable = table.new(switchpos(tablepos), columns=15, rows=15, bgcolor=color.rgb(120, 123, 134, 56))
fill_rows(cond, txt, c, r) =>
if cond
table.cell(table_id=dataTable, column = tablevpos=='Horizontal' ? c : 0, row = tablevpos=='Horizontal' ? 0 : r, text = txt, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center)
if barstate.islast and stats and dtype!='Position RSI'
txt = ' •𝗢𝗜: ' + (denom=='Quote Currency' ? '$' : '') + str.tostring(denom=='Base Currency' ? OI : OI*close, format = format.volume) + ' ' + (denom=='Base Currency' ? str.tostring(string(syminfo.basecurrency)) : '')
txt2 = ' •𝗡𝗟: ' + (denom=='Quote Currency' ? '$' : '') + str.tostring(net_longs, format = format.volume) + ' ' + (denom=='Base Currency' ? str.tostring(string(syminfo.basecurrency)) : '')
txt3 = ' •𝗡𝗦: ' + (denom=='Quote Currency' ? '$' : '') + str.tostring(net_shorts, format = format.volume) + ' ' + (denom=='Base Currency' ? str.tostring(string(syminfo.basecurrency)) : '')
txt4 = ' •𝗡𝗗: ' + (denom=='Quote Currency' ? '$' : '') + str.tostring(net_delta, format = format.volume) + ' ' + (denom=='Base Currency' ? str.tostring(string(syminfo.basecurrency)) : '')
txt5 = ' •𝗢𝗜𝗖: ' + (denom=='Quote Currency' ? '$' : '') + str.tostring(denom=='Base Currency' ? OI-OI : (OI-OI ) * close, format = format.volume) + ' ' + (denom=='Base Currency' ? str.tostring(string(syminfo.basecurrency)) : '')
txt6 = ' •𝗡𝗟𝗖: ' + (denom=='Quote Currency' ? '$' : '') + str.tostring(net_longs - net_longs , format = format.volume) + ' ' + (denom=='Base Currency' ? str.tostring(string(syminfo.basecurrency)) : '')
txt7 = ' •𝗡𝗦𝗖: ' + (denom=='Quote Currency' ? '$' : '') + str.tostring(net_shorts - net_shorts , format = format.volume) + ' ' + (denom=='Base Currency' ? str.tostring(string(syminfo.basecurrency)) : '')
txt8 = ' •𝗡𝗗𝗖: ' + (denom=='Quote Currency' ? '$' : '') + str.tostring(net_delta - net_delta , format = format.volume) + ' ' + (denom=='Base Currency' ? str.tostring(string(syminfo.basecurrency)) : '')
txt9 = ' •𝗢𝗜 𝗥𝗦𝗜: ' + str.tostring(math.round(oi_strength,1))
txt10 = ' •𝗡𝗟 𝗥𝗦𝗜: ' + str.tostring(math.round(longs_strength,1))
txt11 = ' •𝗡𝗦 𝗥𝗦𝗜: ' + str.tostring(math.round(shorts_strength, 1))
txt12 = ' •𝗡𝗗 𝗥𝗦𝗜: ' + str.tostring(math.round(delta_strength, 1))
fill_rows(stat_oi, txt, 0, 0)
fill_rows(stat_nl, txt2, 1, 1)
fill_rows(stat_ns, txt3, 2, 2)
fill_rows(stat_nd, txt4, 3, 3)
fill_rows(stat_oi_c, txt5, 4, 4)
fill_rows(stat_nl_c, txt6, 5, 5)
fill_rows(stat_ns_c, txt7, 6, 6)
fill_rows(stat_nd_c, txt8, 7, 7)
fill_rows(stat_oi_r, txt9, 8, 8)
fill_rows(stat_nl_r, txt10, 9, 9)
fill_rows(stat_ns_r, txt11, 10, 10)
fill_rows(stat_nd_r, txt12, 11, 11)
// Divergence Finder
switchdivsrc(divsrc) =>
switch divsrc
'Net Longs' => src
'Net Shorts' => src2
'Net Delta' => src3
'Net Ratio' => src4
np = switchdivsrc(divsrc)
var priceHigh = array.new_float(0), var priceLow = array.new_float(0)
var priceHighIndex = array.new_int (0), var priceLowIndex = array.new_int (0)
var npHigh = array.new_float(0), var npLow = array.new_float(0)
var npHighIndex = array.new_int (0), var npLowIndex = array.new_int (0)
var priceHighTrend = 0, var priceLowTrend = 0
var npHighTrend = 0, var npLowTrend = 0
bool closeRecentHighs = false, bool closeOldHighs = false
bool closeHighs = false, bool closeRecentLows = false
bool closeOldLows = false, bool closeLows = false
curPriceHigh = ta.pivothigh(close, leftPivot, rightPivot)
curPriceLow = ta.pivotlow (close, leftPivot, rightPivot)
curnpHigh = ta.pivothigh(np, leftPivot, rightPivot)
curnpLow = ta.pivotlow (np, leftPivot, rightPivot)
if not na(curPriceHigh)
array.push(priceHigh, curPriceHigh)
array.push(priceHighIndex, bar_index-rightPivot)
if not na(curPriceLow)
array.push(priceLow, curPriceLow)
array.push(priceLowIndex, bar_index-rightPivot)
if not na(curnpHigh)
array.push(npHigh, curnpHigh)
array.push(npHighIndex, bar_index-rightPivot)
if not na(curnpLow)
array.push(npLow, curnpLow)
array.push(npLowIndex, bar_index-rightPivot)
if showdiv
if array.size(priceHigh) >= 2 and not na(curPriceHigh)
if array.get(priceHigh, array.size(priceHigh)-1) >= array.get(priceHigh, array.size(priceHigh)-2)
priceHighTrend := 1
else
priceHighTrend := -1
if array.size(priceLow) >= 2 and not na(curPriceLow)
if array.get(priceLow, array.size(priceLow)-1) >= array.get(priceLow, array.size(priceLow)-2)
priceLowTrend := 1
else
priceLowTrend := -1
if array.size(npHigh) >= 2 and not na(curnpHigh)
if array.get(npHigh, array.size(npHigh)-1) >= array.get(npHigh, array.size(npHigh)-2)
npHighTrend := 1
else
npHighTrend := -1
if array.size(npLow) >= 2 and not na(curnpLow)
if array.get(npLow, array.size(npLow)-1) >= array.get(npLow, array.size(npLow)-2)
npLowTrend := 1
else
npLowTrend := -1
if array.size(priceHighIndex) >= 2 and array.size(npHighIndex) >=2
closeRecentHighs := math.abs(array.get(priceHighIndex, array.size(priceHighIndex)-1) - array.get(npHighIndex, array.size(npHighIndex)-1)) <= pivotDistance
closeOldHighs := math.abs(array.get(priceHighIndex, array.size(priceHighIndex)-2) - array.get(npHighIndex, array.size(npHighIndex)-2)) <= pivotDistance
closeHighs := closeRecentHighs and closeOldHighs
if array.size(priceLowIndex) >= 2 and array.size(npLowIndex) >=2
closeRecentLows := math.abs(array.get(priceLowIndex, array.size(priceLowIndex)-1) - array.get(npLowIndex, array.size(npLowIndex)-1)) <= pivotDistance
closeOldLows := math.abs(array.get(priceLowIndex, array.size(priceLowIndex)-2) - array.get(npLowIndex, array.size(npLowIndex)-2)) <= pivotDistance
closeLows := closeRecentLows and closeOldLows
bool uptrendExhuastion = closeHighs and priceHighTrend > 0 and npHighTrend < 0 and (not na(curnpHigh) or not na(curPriceHigh))
bool uptrendAbsorption = closeHighs and priceHighTrend < 0 and npHighTrend > 0 and (not na(curnpHigh) or not na(curPriceHigh))
bool downtrendExhuastion = closeLows and priceLowTrend < 0 and npLowTrend > 0 and (not na(curnpLow) or not na(curPriceLow))
bool downtrendAbsorption = closeLows and priceLowTrend > 0 and npLowTrend < 0 and (not na(curnpLow) or not na(curPriceLow))
drawDiv(time1, price1, time2, price2, type) =>
dcol = type == 'Uptrend Exhuastion' ? pHH_npLHcol : type == 'Uptrend Absorption' ? pLH_npHHcol : type == 'Downtrend Exhaustion' ? pLL_npHLcol : type == 'Downtrend Absorption' ? pHL_npLLcol : na
line.new(x1=time1, y1=price1, x2=time2, y2=price2, color=dcol, width=1)
if uptrendAbsorption or uptrendExhuastion and showdiv
highTime1 = array.get(npHighIndex, array.size(npHighIndex)-1)
highPrice1 = array.get(npHigh, array.size(npHigh)-1)
highTime2 = array.get(npHighIndex, array.size(npHighIndex)-2)
highPrice2 = array.get(npHigh, array.size(npHigh)-2)
if uptrendExhuastion and pHH_npLH
drawDiv(highTime1, highPrice1, highTime2, highPrice2, 'Uptrend Exhuastion')
if uptrendAbsorption and pLH_npHH
drawDiv(highTime1, highPrice1, highTime2, highPrice2, 'Uptrend Absorption')
if downtrendAbsorption or downtrendExhuastion and showdiv
lowTime1 = array.get(npLowIndex, array.size(npLowIndex)-1)
lowPrice1 = array.get(npLow, array.size(npLow)-1)
lowTime2 = array.get(npLowIndex, array.size(npLowIndex)-2)
lowPrice2 = array.get(npLow, array.size(npLow)-2)
if downtrendExhuastion and pLL_npHL
drawDiv(lowTime1, lowPrice1, lowTime2, lowPrice2, 'Downtrend Exhuastion')
if downtrendAbsorption and pHL_npLL
drawDiv(lowTime1, lowPrice1, lowTime2, lowPrice2, 'Downtrend Absorption')
SMA by EVEV Simple Moving Average (SMA) is a lightweight, open-source SMA indicator with configurable length, price source, and visual offset. It is designed to provide a clean moving-average reference for trend context and mean reversion workflows on any market and timeframe. The offset parameter shifts the plotted line for visualization only and does not affect the underlying calculation.
Adaptive Log Trend Zones + Retest SignalsAdaptive Log Trend Zones + Retest Signals
Adaptive Log Trend Zones is a trend-following overlay built to identify high-probability breakout retests in strong market conditions. It combines logarithmic regression , volatility-adaptive behavior , and ATR-based trend zones to help traders stay aligned with dominant momentum while avoiding chop.
🔹 Core Features
Logarithmic Regression Midline
Uses linear regression on log price to better handle exponential market moves
Produces smoother, more realistic trend structure on higher timeframes
Volatility-Adaptive Lookback
Automatically expands or contracts the regression length based on ATR volatility
Reacts faster in high volatility, smoother in consolidation
Dynamic Trend Zones
Upper and lower bands are ATR-adjusted and trend-colored
Optional future projection for visual trend guidance
Breakout → Retest Signal Logic
Detects clean breakouts beyond the trend zone
Waits for a controlled pullback (retest) before signaling
Signals only trigger when trend strength is confirmed
Trend Quality Filter
Internal regime detection filters out low-quality, sideways conditions
Uses slope strength and volatility compression to validate entries
🔹 Signals
BUY : Bullish breakout followed by a valid retest in a trending regime
SELL : Bearish breakout followed by a valid retest in a trending regime
Signals are designed for trend continuation , not mean reversion.
🔹 Best Use Cases
Crypto, Forex, and Index markets
Higher timeframes (15m+ recommended)
Trend continuation and pullback strategies
⚠️ Notes
This indicator is not a standalone trading system . Always use proper risk management and confirm signals with structure, volume, or higher-timeframe context.
Designed for traders who prefer structure, patience, and momentum alignment.
TDPOWERSYS vs Market-Cap Weighted Peersfor QIC - UnCut Diamonds team..
to compare one company vs its peers bundled as basket.
editable..
Daily Extension from 50DMA (adjustable) in ATR%Indicator to easily spot over extended prices in relation to ATR.
ATR or ADR easily referenced
Live Candle Range Position SizerThis script displays a fixed execution HUD on the chart that continuously measures the current candle range (high–low) and automatically calculates position size based on a fixed Risk Unit (RU).
Cloud Gold TrendTrend Filter (Ichimoku): If the price is above the cloud (Kumo), look only for "Long" signals. If it is below, look only for "Short" signals.
Entry Signal (Bollinger): When the price touches the Lower Band while you are above the Cloud, it could be a great buying point in an uptrend.
Volatility Confirmation: If the Bollinger Bands squeeze within the cloud, get ready for a strong directional move as soon as the price breaks one of the two levels.
Triple EMA + Stochastic/ADX# Triple EMA + Stochastic/ADX Breakout Indicator
A professional TradingView indicator designed for trend-following and momentum breakout trading. This system uses a hierarchical confirmation process to ensure high-probability entries and robust trend maintenance.
## 🚀 Core Trading Logic: "The Setup Cycle"
This indicator operates on a **Cycle-Based Logic** rather than simple crossovers. A trade cycle is defined as:
1. **The Setup (Priming)**: A Stochastic crossover (K > D for Long, D > K for Short) initiates a "Setup Mode." This is marked by a small dot (Blue for Long, Orange for Short).
2. **The Confirmation (Trend)**: The systems checks for hierarchical EMA alignment (Fast > Medium > Slow for Longs).
3. **The Trigger (Breakout)**: Once the Setup is active and EMAs are aligned, every **Price Breakout** above the previous high (X-period) triggers a continuous **BUY/SELL mark**.
4. **The Exit (Take Profit/Stop)**: The cycle and trade only end when the Fast EMA crosses back over the Medium EMA (EMA 9/21 crossover).
---
## 🛠 Features
### 1. Triple EMA System
* **Hierarchical Alignment**: Requires Fast > Medium > Slow (9, 21, 50 by default) for a confirmed trend direction.
* **Dynamic Trend Background**: Chart background changes color when a full EMA trend is established.
### 2. Dual Filter System (Stochastic & ADX)
* **Stochastic Setup**: Uses smoothed %K and %D to identify the start of momentum cycles.
* **ADX Filter**: Provides a trend-strength baseline. Default threshold is set to 20 to filter out choppy markets.
### 3. Price Breakout Confirmation
* Requires price to break above/below the previous High/Low of the last X bars (default 10).
* Allows for **continuous entries** within a single trend cycle.
### 4. Robust Exit Strategy
* **EMA Crossover Exit**: The primary exit method. Triggers an "EXIT" flag when the trend momentum shifts.
* **ATR Trailing Stop**: A secondary volatility-based stop that moves with the price. Can be set as the absolute exit or used for visual reference.
### 5. Mean Reversion Mode (Optional)
* Identifies overextended price action (percent deviation from EMA2).
* Signals potential "bounce" or "rejection" trades against the trend.
---
## 📊 Dashboard & Visuals
* **🟢 BUY / 🔴 SELL**: Trend continuation breakout signals.
* **🟠 EXIT / 🟣 EXIT**: Trend reversal/exit signals.
* **🔵/🟠 Small Dots**: Setup priming moments.
* **Real-time Dashboard**: Displays current Setup Status, EMA Alignment, Breakout status, ADX strength, and calculated Stop levels.
---
## ⚙️ How to Customize
| Parameter | Recommended Use |
| :--- | :--- |
| **Breakout Lookback** | Lower (3-5) for aggressive scalping, Higher (10-20) for conservative trends. |
| **Filter Mode** | Choose "Stochastic" for momentum or "ADX" for trend strength preference. |
| **ATR Multiplier** | Reduce (1.5) for tighter stops, Increase (3.0) for wider trend following. |
| **Exit ONLY on EMA** | Enable to stay in trades longer; Disable to exit immediately on ATR stop hits. |
---
## 📥 Installation
1. Open your **Pine Editor** in TradingView.
2. Create a new "Indicator."
3. Copy the code from `Triple_EMA_Stochastic_ADX.pine`.
4. Click **Save** and **Add to Chart**.
---
*Developed for Dhan/MCX/Futures and general Asset Trading.*
GOLD TERTIUM MGC 1mThis indicator is a visual tool for TradingView designed to help you read trend structure using EMAs and highlight potential long and short entries on the MGC 1‑minute chart, while filtering pullbacks and avoiding trades when the 200 EMA is flat.
It calculates five EMAs (32, 50, 110, 200, 250) and plots them in different colors so you can clearly see the moving‑average stack and overall direction. The main trend is defined by the 200 EMA: bullish when price and the fast EMAs (32 and 50) are above it with a positive slope, and bearish when they are below it with a negative slope; if the 200 EMA is almost flat, signals are blocked to reduce trading in choppy markets.
Entry logic looks for a pullback into the 32–50 EMA zone on the previous candle, then requires a trend‑aligned candle to trigger a signal: long when the trend is up, the previous bar retested the EMA zone, and the current bar closes above EMA 32 with a bullish body; short when the trend is down, there was a valid retest, the current bar closes below EMA 32 with a bearish body and EMA 32 is below EMA 50. On the chart, you will see colored EMAs plus green “L” triangles under bars for potential long entries and red “S” triangles above bars for potential short entries, which are meant as visual cues rather than automatic trade instructions
TraderSpace Previous CloseAvailable in the following timeframes:
5minute
15minute
1hour
4hour
Daily
Weekly
Monthly






















