Power Law BTC IndicatorPOWER LAW BTC indicator:
A long-term price model that suggests Bitcoin's price follows a power law function over time. Unlike traditional stock market models that assume linear or exponential growth, the power law model suggests that Bitcoin's price scales in a predictable, non-random way over the long run
Wskaźniki i strategie
RSI Exit + BB-RSI Combo📊 RSI Exit + BB-RSI Combo Indicator
This indicator combines RSI overbought/oversold exit signals with Bollinger Band re-entry conditions to highlight potential reversal or retracement zones.
1️⃣ RSI Exit Signal  
   - When RSI drops below 70 after being overbought → 🔴 "RSI" label  
   - When RSI rises above 30 after being oversold → 🟢 "RSI" label  
   - Works on 15m / 30m / 1h / 4h / 1D timeframes  
2️⃣ BB-RSI Combo Signal  
   - When an RSI divergence forms and  
   - The candle body re-enters the Bollinger Band on 1H+ timeframe  
     → Combo signal (💎 diamond) is shown  
💡 How to Use  
- Use RSI exit signals to spot overextension corrections  
- Use combo signals to identify high-probability reversal or rebound setups  
- Suitable for both swing and short-term trading  
Buy/Sell Volume Tracker [wjdtks255]Indicator Description
Function: Separates buy and sell volume based on candle direction (close ≥ open) and displays the buy−sell difference (hist_val) as a histogram.
Visuals: Buy/sell bars are distinguished by user-selectable colors and opacity; two moving averages (MA1 and MA2) are shown to smooth the flow.
Meaning: A positive histogram indicates buy dominance; a negative histogram indicates sell dominance.
Limitation: The current separation is estimated from candle direction and may differ from execution-side (tick/trade-side) based data.
Trading Rules (Summary)
Conservative trend-following long
Entry: Enter long when hist_val turns above 0 and MA1 crosses MA2 from below.
Stop-loss: Exit if hist_val falls back below 0 or MA1 drops below MA2.
Take-profit: Use a risk:reward of 1:1.5 or set targets based on ATR.
Short-term rebound long
Entry: Enter a short-term long when a large negative histogram region begins to narrow and shows a recovery sign.
Stop-loss: Exit if hist_val drops below the previous low or bearish candles continue.
Take-profit: Prefer quick partial profit-taking.
Short (sell) strategy
Entry: Enter short when hist_val falls below 0 and MA1 crosses MA2 from above.
Stop-loss / Take-profit: Apply the inverse rules of the long strategy.
Filters and risk management
Volume filter: Only accept signals when volume exceeds a fraction of average volume to reduce noise.
Entry strength: Require |hist_val| to exceed a historical average threshold (e.g., avg(|hist_val|, N) × factor) to strengthen signals.
Position sizing: Size positions so that account risk per trade is within limits (e.g., 1–2% of account equity).
Timeframe: Use short timeframes for scalping and 1h+ for swing trading.
NY ORB - Full Dynamic SystemNY ORB - Full Dynamic Strategy Summary
1. Opening Range and Session Timing
Opening Range (ORB) Calculation: The strategy identifies the ORB High and ORB Low by tracking the highest high and lowest low during the specified New York pre-market window, which is set by default from 8:30 to 8:45 (New York time).
Entry Window: Trading activity is restricted to a specific entry period, typically starting shortly after the ORB is established (default: 8:50 to 12:00).
Hard Exit Time: Any remaining open positions are automatically closed at a fixed exit time (default: 13:25).
2. Trade Entry Logic and Filters
An entry (Long or Short) is generated when the price breaks out of the established ORB, provided it passes a series of optional filters:
Direction Control: The user can restrict the strategy to trade Long Only, Short Only, or Both.
Second Breakout Logic: An optional filter that requires the price to break out, reverse back into the range, and then break out again, confirming momentum after a consolidation.
Confirmation Candle Count: An optional filter that checks the close of a previous candle (e.g., 1 or 2 candles ago) to ensure the price was still inside the range, preventing premature entry.
Technical Filters (Optional): The entry is only executed if it aligns with selected indicators:
RSI: Filters for non-overbought (Long) or non-oversold (Short) conditions.
MACD: Requires the MACD line to be above/below the Signal line for alignment.
VWAP: Requires the price to be above/below the Volume-Weighted Average Price.
Trend Filter (SMMA): Requires the price to be above/below a 50-period Simple Moving Average.
3. Dynamic Risk and Exit Management
This strategy features highly configurable stop-loss and profit-taking mechanics:
Primary Stop Loss Methods: The Stop Loss distance can be dynamically chosen from four types:
Fixed: A fixed number of ticks.
ATR: Based on a multiple of the Average True Range (ATR).
Capped ATR: ATR-based, but with a hard maximum tick limit.
OR-Based: Based on a multiple of the actual ORB High-to-Low range.
Dynamic Profit Target: The Take Profit level is calculated dynamically based on a multiplier of either the ATR or the ORB Range.
Breakeven Stop:
If enabled, the Stop Loss automatically moves to the entry price (Breakeven) once the price moves a predetermined distance in the profitable direction.
An Adaptive Breakeven option allows the trigger distance to be calculated as a percentage of the overall ATR Profit Target.
Trailing Stop: The strategy uses a trailing stop, which can be custom-set (fixed ticks) or dynamically tied to the ATR. An optional feature Auto Tighten Trailing reduces the trailing multiplier once the breakeven level is hit.
MA Cross Exit: An alternative, counter-trend exit mechanism that closes the trade if the price crosses back over the chosen Moving Average (either SMMA or VWAP), overriding the pending profit target.
4. Daily Account Management
The strategy includes crucial daily risk controls to protect capital and lock in profits:
Daily Profit Limit: If the total daily PnL (realized and unrealized) hits a predefined maximum profit threshold (in ticks), all trades are closed, and new entries are blocked for the remainder of the trading day.
Daily Loss Limit: Conversely, if the total daily PnL hits a predefined maximum loss threshold, all trades are closed, and new entries are blocked for the remainder of the day.
My Smart Volume Profile – Fixed
Title: 🔹 My Smart Volume Profile – Fixed
Description:
Lightweight custom Volume Profile showing POC, VAH, and VAL levels from recent bars. Highlights the value area, marks price touches, and supports optional alerts.
Developer Note:
Created with precision and simplicity by Magnergy
Aibuyzone Spot & Swing ZonesAibuyzone Spot & Swing Zones is a technical tool that helps identify potential buy zones during established bullish trends.
It is designed for spot and swing traders who prefer to buy pullbacks within broader uptrends.
This indicator does not place trades or make predictions — it only highlights contextual market areas for study.
How It Works
Trend Alignment Filter
A higher-timeframe EMA and two local EMAs determine trend direction.
Only when both the local and higher-timeframe trends agree as bullish will a potential buy zone be considered valid.
Dynamic Buy Zone (Value Area)
The indicator measures a rolling price range over a user-selected number of bars (e.g., last 50).
The lower fraction of this range (configurable percentage) becomes the buy zone band.
When price revisits this lower section during a bullish trend, it is interpreted as a potential value or discount area.
Liquidity Sweep Filter (Optional)
Detects bars that make a new low relative to recent candles and then close back up with a strong lower wick.
This condition can indicate a possible liquidity grab or stop-hunt event that precedes reversals.
RSI Pullback Filter (Optional)
Confirms that price momentum has cooled during the pullback phase.
Signals occur when RSI falls within a defined “pullback” zone (default 30–55), helping avoid chasing overextended moves.
Confluence Scoring
Each of the three criteria — buy zone presence, liquidity sweep, RSI pullback — adds one point to a confluence score.
A signal only appears when the score meets or exceeds the chosen threshold (for example, 2 of 3).
Visual Elements
Fast and Slow EMAs for short-term trend visualization.
A shaded area marking the dynamic buy zone.
Optional background tint when the overall trend is bullish.
Optional labels below bars when confluence criteria are met.
Alert condition available for custom user alerts.
Suggested Use
Select a higher timeframe that fits your trading horizon (e.g., 4h for swing, 1d for position trading).
Use the shaded band as a visual guide for where price may offer “discounts” within an uptrend.
Combine with support/resistance, volume, or other confluence methods for confirmation.
Adjust the confluence requirement for stricter or looser signals.
Disclaimer
This script is provided for educational and analytical purposes only.
It does not constitute financial advice or a recommendation to buy or sell any asset.
All trading involves risk — always perform your own analysis and manage risk according to your own judgment.
PHD-Points
The PHD Pivot Points indicator is a professional-grade support and resistance tool that calculates key price levels based on previous day's price action and current intraday data. It provides traders with multiple reference points for identifying potential reversal zones, breakout levels, and strategic entry/exit positions.
Key Components
1. Previous Day Pivot Point (P)
White Line - The main pivot level calculated from previous day's High, Low, and Close
Formula: P = (Previous High + Previous Low + Previous Close) / 3
Serves as the central reference point for the trading day
Often acts as a psychological support/resistance level
2. Previous Day Support Levels (D1, D2, D3)
Brown Lines - Three support levels below the previous day's pivot
D1 (Support 1): First support level, closest to pivot
D2 (Support 2): Second support level, medium-strength
D3 (Support 3): Third support level, strongest support
Calculated using previous day's high and low ranges
3. Previous Day Resistance Levels (H1, H2, H3)
Yellow-Brown Lines - Three resistance levels above the previous day's pivot
H1 (Resistance 1): First resistance level, closest to pivot
H2 (Resistance 2): Second resistance level, medium-strength
H3 (Resistance 3): Third resistance level, strongest resistance
Calculated using previous day's high and low ranges
4. Today's Pivot Point (PT)
Dark Red Line - Dynamic pivot point that updates throughout the current trading session
Formula: PT = (Current High + Current Low + Current Close) / 3
Provides real-time trend reference for intraday trading
Helps identify intraday momentum and trend strength
5. Today's Dynamic Levels (DD1-DD3, HH1-HH3)
Calculated but not plotted by default
These values represent current session's support and resistance levels
Can be used for advanced intraday analysis
Trading Applications
Support and Resistance Trading
Price tends to bounce at D1, D2, D3 levels (potential buy zones)
Price tends to stall or reverse at H1, H2, H3 levels (potential sell zones)
Breaks above/below these levels signal trend strength
Trend Identification
Price above P = Bullish bias
Price below P = Bearish bias
PT line angle shows intraday momentum direction
Mum Formasyonları TespitiIt is used to detect candles.
It is designed to analyze all the candles that form.
The most frequently formed candles are displayed on the price chart.
VIX OscillatorVIX Oscillator for catching vol signals on the same chart as your index of choice.
- Configurable levels that alert you when certain thresholds are broken
- Shaded background that make it simple to tell when you are in low vol/high vol regimes
- Moving line tracking price so that you can easily see bull/bear divergences against SPX building
RSI ⇄ SMA Cross Alerts (80/20, On Close)RSI ⇄ SMA Cross Alerts (80/20, On Close)
Add //@version=5 (required in Pine v5).
Your logic is fine for “after being >80/<20 then RSI crosses its SMA,” and barstate.isconfirmed enforces on close.
plot(close) in a non-overlay RSI pane will squash the scale—drop it (or set overlay=true and move RSI to a separate scale, but simplest is just remove it).
Optional: expose source, add a tiny cooldown, and let alerts include close/RSI values.
Ethereum Sleepy Wallets – 6-Month DormancyWhat This Indicator Does
It measures how many Ethereum addresses have been completely inactive for at least 6 months (≥ 180 days) — using official Glassnode and CryptoQuant on-chain metrics.
This reveals deep conviction among long-term ETH holders
Core Concept: Direct 6-Month Dormancy
The indicator uses two precise on-chain signals:
Total Unique ETH Addresses
From GLASSNODE:ETH_ADDRESSES or CRYPTOQUANT:ETH_TOTAL_ADDRESSES
Counts every address ever used on Ethereum
Addresses Inactive ≥ 180 Days
From GLASSNODE:ETH_ADDRESSES_GREATER_THAN_180_DAYS
Counts every address that has not sent or received ETH in 6+ months
Sleepy ETH = Dormant ≥ 180 Days
Sleepy Ratio % = (Sleepy / Total) × 100
This is not an estimate — it’s direct, real dormancy.
Why 6-Month Dormancy Matters
Short-term activity (7-day) = noise from DeFi, NFTs, trading
180-day inactivity = true HODLing — coins untouched through entire market cycles
Historically:
Rising dormancy → supply drying up → bullish pressure
Falling dormancy → long-term holders selling → bearish warning
How It Works (Step-by-Step)
Fetches daily data from Glassnode (Pro+) or CryptoQuant (free)
Selects real data if available; otherwise uses robust fallback
Calculates raw sleepy wallets = addresses inactive ≥ 180 days
Smooths the signal with a 21-day simple moving average (SMA) to filter noise
Computes Sleepy Ratio % for instant conviction reading
Displays live info table with exact values on every bar
How to Use It
Signal
Interpretation
Suggested Action
Sleepy Ratio > 75% and rising
Extreme long-term HODLing
Strong accumulation — buy/hold
Smooth Sleepy trending up
Dormancy growing over 21 days
Bullish supply shock forming
Sleepy Ratio < 68% and falling
Long-term coins re-entering circulation
Caution — possible distribution
Smooth Sleepy dropping fast
HODLers breaking after 6+ months
Bearish warning — consider exits
Use on Daily (D) or Weekly (W) charts for clean, reliable signals.
Pro+ vs Free Mode
Mode
Data Source
Accuracy
Pro+ (Glassnode ON)
Real 180-day dormancy metric
100% precise
Free (Glassnode OFF)
CryptoQuant + price-scaled estimate
~80% historical correlation
Toggle in settings: Use Glassnode Data
What Makes This Indicator Original
First open-source script to directly plot Ethereum’s 6-month dormancy using official ADDRESSES_GREATER_THAN_180_DAYS
No fake math — uses true inactivity, not active address subtraction
Dual-source logic ensures usability on any TradingView plan
Dual output: raw sleepy count + 21-day SMA for precision and trend
Live info table shows real-time values and data source
ICT Essentials — Killzones • PD Levels • Sweeps • FVG • OTEThis indicator gives you everything you need from the ICT framework — without chart clutter.
Built for intraday traders who want clear structure, fast bias, and precision entries.
⸻
⚙️ Core Features
✅ Killzones (London + New York) — automatic shading to highlight high-probability hours.
✅ Previous Day & Overnight High/Low — liquidity levels plotted and extended.
✅ Liquidity Sweeps — real-time detection when price wicks through PD/ON levels.
✅ Smart Fair Value Gaps (FVG) — 3-candle gaps auto-clear once filled.
✅ OTE Zone (62-79%) — dynamically draws the optimal trade entry range.
✅ Dashboard — bias direction + “In-Play” status for instant context.
✅ Alerts — for sweeps, FVG taps, and OTE touches.
Double Grid + Auto Countdown Timer (Stable v6.1)Adjustable grid indicator with two levels and bar countdown timer fully adjustable. 
Live P&L IndicatorThis script gives you a simple, no-nonsense way to see your live profit and loss right on your chart. It stays fixed in the center (slightly offset for balance), updating automatically as price moves — so you always know where you stand without checking your account tab.
You can manually set your entry, clear it, or let the script freeze once your take-profit target is hit — perfect for keeping emotions in check when the trade’s already done its job.
Everything’s built to look clean and professional — no clutter, no distractions, just a sleek overlay.
DD RatioThe DD Ratio (“Directional Distribution Ratio”) is a breadth indicator that shows, in real time, how many of the selected stocks (e.g., S&P 500 components) are bullish vs. bearish relative to today’s open.
The DD Ratio tells you what’s really happening under the hood of the index:
Futures may mislead: An index future (like ES or NQ) can rise on a few heavy-weighted stocks even while most components fall.
The DD Ratio exposes that divergence.
Breadth confirmation: When the futures are up and DD Ratio ≥ 0.5 → healthy rally.
When futures are up but DD Ratio < 0.5 → weak, narrow advance.
Intraday sentiment gauge: It updates live with each bar, reflecting “who’s winning” since the open.
 RSI Overbought/Oversold + Divergence Indicator (new)//@version=5
indicator('CryptoSignalScanner - RSI Overbought/Oversold + Divergence Indicator (new)', 
//---------------------------------------------------------------------------------------------------------------------------------
//--- Define Colors ---------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------
vWhite  = #FFFFFF
vViolet = #C77DF3
vIndigo = #8A2BE2
vBlue   = #009CDF
vGreen  = #5EBD3E
vYellow = #FFB900
vRed    = #E23838
longColor  = color.green
shortColor = color.red
textColor  = color.white
bullishColor = color.rgb(38,166,154,0) //Used in the display table
bearishColor = color.rgb(239,83,79,0) //Used in the display table
nomatchColor = color.silver //Used in the display table
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Functions--------------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
TF2txt(TF) =>
    switch TF
        "S"    => "RSI 1s:"
        "5S"    => "RSI 5s:"
        "10S"   => "RSI 10s:"
        "15S"   => "RSI 15s:"
        "30S"   => "RSI 30s"
        "1"     => "RSI 1m:"
        "3"     => "RSI 3m:"
        "5"     => "RSI 5m:"
        "15"    => "RSI 15m:"
        "30"    => "RSI 30m"
        "45"    => "RSI 45m"
        "60"    => "RSI 1h:"
        "120"   => "RSI 2h:"
        "180"   => "RSI 3h:"
        "240"   => "RSI 4h:"
        "480"   => "RSI 8h:"
        "D"     => "RSI 1D:"
        "1D"    => "RSI 1D:"
        "2D"    => "RSI 2D:"
        "3D"    => "RSI 2D:"
        "3D"    => "RSI 3W:"
        "W"     => "RSI 1W:"
        "1W"    => "RSI 1W:"
        "M"     => "RSI 1M:"
        "1M"    => "RSI 1M:"
        "3M"    => "RSI 3M:"
        "6M"    => "RSI 6M:"
        "12M"   => "RSI 12M:"
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Show/Hide Settings ----------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
rsiShowInput          = input(true, title='Show RSI', group='Show/Hide Settings')
maShowInput           = input(false, title='Show MA', group='Show/Hide Settings')
showRSIMAInput        = input(true, title='Show RSIMA Cloud', group='Show/Hide Settings')
rsiBandShowInput      = input(true, title='Show Oversold/Overbought Lines', group='Show/Hide Settings')
rsiBandExtShowInput   = input(true, title='Show Oversold/Overbought Extended Lines', group='Show/Hide Settings')
rsiHighlightShowInput = input(true, title='Show Oversold/Overbought Highlight Lines', group='Show/Hide Settings')
DivergenceShowInput   = input(true, title='Show RSI Divergence Labels', group='Show/Hide Settings')
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Table Settings --------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
rsiShowTable      = input(true, title='Show RSI Table Information box', group="RSI Table Settings")
rsiTablePosition  = input.string(title='Location', defval='middle_right', options= , group="RSI Table Settings", inline='1')
rsiTextSize       = input.string(title=' Size', defval='small', options= , group="RSI Table Settings", inline='1')
rsiShowTF1 = input(true, title='Show TimeFrame1', group="RSI Table Settings", inline='tf1')
rsiTF1     = input.timeframe("15", title=" Time", group="RSI Table Settings", inline='tf1')
rsiShowTF2 = input(true, title='Show TimeFrame2', group="RSI Table Settings", inline='tf2')
rsiTF2     = input.timeframe("60", title=" Time", group="RSI Table Settings", inline='tf2')
rsiShowTF3 = input(true, title='Show TimeFrame3', group="RSI Table Settings", inline='tf3')
rsiTF3     = input.timeframe("240", title=" Time", group="RSI Table Settings", inline='tf3')
rsiShowTF4 = input(true, title='Show TimeFrame4', group="RSI Table Settings", inline='tf4')
rsiTF4     = input.timeframe("D", title=" Time", group="RSI Table Settings", inline='tf4')
rsiShowHist = input(true, title='Show RSI Historical Columns', group="RSI Table Settings", tooltip='Show the information of the 2 previous closed candles')
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- RSI Input Settings ----------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
rsiSourceInput  = input.source(close, 'Source', group='RSI Settings')
rsiLengthInput  = input.int(14, minval=1, title='RSI Length', group='RSI Settings', tooltip='Here we set the RSI lenght')
rsiColorInput   = input.color(#26a69a, title="RSI Color",  group='RSI Settings')
rsimaColorInput = input.color(#ef534f, title="RSIMA Color",  group='RSI Settings')
rsiBandColorInput = input.color(#787B86, title="RSI Band Color",  group='RSI Settings')
rsiUpperBandExtInput = input.int(title='RSI Overbought Extended Line', defval=80, minval=50, maxval=100, group='RSI Settings')
rsiUpperBandInput   = input.int(title='RSI Overbought Line', defval=70, minval=50, maxval=100, group='RSI Settings')
rsiLowerBandInput   = input.int(title='RSI Oversold Line', defval=30, minval=0, maxval=50, group='RSI Settings')
rsiLowerBandExtInput = input.int(title='RSI Oversold Extended Line', defval=20, minval=0, maxval=50, group='RSI Settings')
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- MA Input Settings -----------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
maTypeInput = input.string("EMA", title="MA Type", options= , group="MA Settings")
maLengthInput = input.int(14, title="MA Length", group="MA Settings")
maColorInput = input.color(color.yellow, title="MA Color",  group='MA Settings') //#7E57C2
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Divergence Input Settings ---------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
lbrInput        = input(title="Pivot Lookback Right", defval=2, group='RSI Divergence Settings')
lblInput        = input(title="Pivot Lookback Left", defval=2, group='RSI Divergence Settings')
lbRangeMaxInput = input(title="Max of Lookback Range", defval=10, group='RSI Divergence Settings')
lbRangeMinInput = input(title="Min of Lookback Range", defval=2, group='RSI Divergence Settings')
plotBullInput       = input(title="Plot Bullish", defval=true, group='RSI Divergence Settings')
plotHiddenBullInput = input(title="Plot Hidden Bullish", defval=true, group='RSI Divergence Settings')
plotBearInput       = input(title="Plot Bearish", defval=true, group='RSI Divergence Settings')
plotHiddenBearInput = input(title="Plot Hidden Bearish", defval=true, group='RSI Divergence Settings')
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- RSI Calculation -------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
rsi         = ta.rsi(rsiSourceInput, rsiLengthInput)
rsiprevious = rsi 
  = request.security(syminfo.tickerid, rsiTF1,  [rsi, rsi , rsi ], lookahead=barmerge.lookahead_on)
  = request.security(syminfo.tickerid, rsiTF2,  [rsi, rsi , rsi ], lookahead=barmerge.lookahead_on)
  = request.security(syminfo.tickerid, rsiTF3,  [rsi, rsi , rsi ], lookahead=barmerge.lookahead_on)
  = request.security(syminfo.tickerid, rsiTF4,  [rsi, rsi , rsi ], lookahead=barmerge.lookahead_on)
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- MA Calculation -------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
ma(source, length, type) =>
    switch type
        "SMA" => ta.sma(source, length)
        "Bollinger Bands" => ta.sma(source, length)
        "EMA" => ta.ema(source, length)
        "SMMA (RMA)" => ta.rma(source, length)
        "WMA" => ta.wma(source, length)
        "VWMA" => ta.vwma(source, length)
rsiMA         = ma(rsi, maLengthInput, maTypeInput)
rsiMAPrevious = rsiMA 
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Stoch RSI Settings + Calculation --------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
showStochRSI    = input(false, title="Show Stochastic RSI", group='Stochastic RSI Settings')
smoothK         = input.int(title="Stochastic K", defval=3, minval=1,  maxval=10, group='Stochastic RSI Settings')
smoothD         = input.int(title="Stochastic D", defval=4, minval=1,  maxval=10, group='Stochastic RSI Settings')
lengthRSI       = input.int(title="Stochastic RSI Lenght", defval=14, minval=1, group='Stochastic RSI Settings')
lengthStoch     = input.int(title="Stochastic Lenght", defval=14, minval=1, group='Stochastic RSI Settings')
colorK          = input.color(color.rgb(41,98,255,0), title="K Color",  group='Stochastic RSI Settings', inline="1")
colorD          = input.color(color.rgb(205,109,0,0), title="D Color",  group='Stochastic RSI Settings', inline="1")
StochRSI    = ta.rsi(rsiSourceInput, lengthRSI)
k       = ta.sma(ta.stoch(StochRSI, StochRSI, StochRSI, lengthStoch), smoothK) //Blue Line
d       = ta.sma(k, smoothD) //Red Line
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Divergence Settings ------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
bearColor = color.red
bullColor = color.green
hiddenBullColor = color.new(color.green, 50)
hiddenBearColor = color.new(color.red, 50)
//textColor = color.white
noneColor = color.new(color.white, 100)
osc = rsi
plFound = na(ta.pivotlow(osc, lblInput, lbrInput)) ? false : true
phFound = na(ta.pivothigh(osc, lblInput, lbrInput)) ? false : true
_inRange(cond) =>
	bars = ta.barssince(cond == true)
	lbRangeMinInput <= bars and bars <= lbRangeMaxInput 
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Define Plot & Line Colors ---------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
rsiColor = rsi >= rsiMA ? rsiColorInput : rsimaColorInput
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Plot Lines ------------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
// Create a horizontal line at a specific price level
myLine = line.new(bar_index , 75, bar_index, 75, color = color.rgb(187, 14, 14), width = 2)
bottom = line.new(bar_index , 50, bar_index, 50, color = color.rgb(223, 226, 28), width = 2)
mymainLine = line.new(bar_index , 60, bar_index, 60, color = color.rgb(13, 154, 10), width = 3)
hline(50, title='RSI Baseline', color=color.new(rsiBandColorInput, 50), linestyle=hline.style_solid, editable=false)   
hline(rsiBandExtShowInput ? rsiUpperBandExtInput : na,  title='RSI Upper Band',  color=color.new(rsiBandColorInput, 10), linestyle=hline.style_dashed, editable=false)  
hline(rsiBandShowInput ? rsiUpperBandInput : na,  title='RSI Upper Band',  color=color.new(rsiBandColorInput, 10), linestyle=hline.style_dashed, editable=false) 
hline(rsiBandShowInput ? rsiLowerBandInput : na,  title='RSI Upper Band',  color=color.new(rsiBandColorInput, 10), linestyle=hline.style_dashed, editable=false) 
hline(rsiBandExtShowInput ? rsiLowerBandExtInput : na,  title='RSI Upper Band',  color=color.new(rsiBandColorInput, 10), linestyle=hline.style_dashed, editable=false)
bgcolor(rsiHighlightShowInput ? rsi >= rsiUpperBandExtInput ? color.new(rsiColorInput, 70) : na : na, title="Show Extended Oversold Highlight", editable=false)
bgcolor(rsiHighlightShowInput ? rsi >= rsiUpperBandInput ? rsi < rsiUpperBandExtInput ? color.new(#64ffda, 90) : na : na: na, title="Show Overbought Highlight", editable=false)
bgcolor(rsiHighlightShowInput ? rsi <= rsiLowerBandInput ? rsi > rsiLowerBandExtInput ? color.new(#F43E32, 90) : na : na : na, title="Show Extended Oversold Highlight", editable=false)
bgcolor(rsiHighlightShowInput ? rsi <= rsiLowerBandInput ? color.new(rsimaColorInput, 70) : na : na, title="Show Oversold Highlight", editable=false)
maPlot     = plot(maShowInput ? rsiMA : na, title='MA', color=color.new(maColorInput,0), linewidth=1)
rsiMAPlot  = plot(showRSIMAInput ? rsiMA : na, title="RSI EMA", color=color.new(rsimaColorInput,0), editable=false, display=display.none)
rsiPlot    = plot(rsiShowInput ? rsi : na, title='RSI', color=color.new(rsiColor,0), linewidth=1)
fill(rsiPlot, rsiMAPlot, color=color.new(rsiColor, 60), title="RSIMA Cloud")
plot(showStochRSI ? k : na, title='Stochastic K', color=colorK, linewidth=1)
plot(showStochRSI ? d : na, title='Stochastic D', color=colorD, linewidth=1)
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Plot Divergence -------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
// Regular Bullish
// Osc: Higher Low
oscHL = osc  > ta.valuewhen(plFound, osc , 1) and _inRange(plFound )
// Price: Lower Low
priceLL = low  < ta.valuewhen(plFound, low , 1)
bullCond = plotBullInput and priceLL and oscHL and plFound
plot(
     plFound ? osc  : na,
     offset=-lbrInput,
     title="Regular Bullish",
     linewidth=2,
     color=(bullCond ? bullColor : noneColor)
     )
plotshape(
     DivergenceShowInput ? bullCond ? osc  : na : na,
     offset=-lbrInput,
     title="Regular Bullish Label",
     text=" Bull ",
     style=shape.labelup,
     location=location.absolute,
     color=bullColor,
     textcolor=textColor
     )
//------------------------------------------------------------------------------
// Hidden Bullish
// Osc: Lower Low
oscLL = osc  < ta.valuewhen(plFound, osc , 1) and _inRange(plFound )
// Price: Higher Low
priceHL = low  > ta.valuewhen(plFound, low , 1)
hiddenBullCond = plotHiddenBullInput and priceHL and oscLL and plFound
plot(
	 plFound ? osc  : na,
	 offset=-lbrInput,
	 title="Hidden Bullish",
	 linewidth=2,
	 color=(hiddenBullCond ? hiddenBullColor : noneColor)
	 )
plotshape(
	 DivergenceShowInput ? hiddenBullCond ? osc  : na : na,
	 offset=-lbrInput,
	 title="Hidden Bullish Label",
	 text=" H Bull ",
	 style=shape.labelup,
	 location=location.absolute,
	 color=bullColor,
	 textcolor=textColor
	 )
//------------------------------------------------------------------------------
// Regular Bearish
// Osc: Lower High
oscLH = osc  < ta.valuewhen(phFound, osc , 1) and _inRange(phFound )
// Price: Higher High
priceHH = high  > ta.valuewhen(phFound, high , 1)
bearCond = plotBearInput and priceHH and oscLH and phFound
plot(
	 phFound ? osc  : na,
	 offset=-lbrInput,
	 title="Regular Bearish",
	 linewidth=2,
	 color=(bearCond ? bearColor : noneColor)
	 )
plotshape(
	 DivergenceShowInput ? bearCond ? osc  : na : na,
	 offset=-lbrInput,
	 title="Regular Bearish Label",
	 text=" Bear ",
	 style=shape.labeldown,
	 location=location.absolute,
	 color=bearColor,
	 textcolor=textColor
	 )
//------------------------------------------------------------------------------
// Hidden Bearish
// Osc: Higher High
oscHH = osc  > ta.valuewhen(phFound, osc , 1) and _inRange(phFound )
// Price: Lower High
priceLH = high  < ta.valuewhen(phFound, high , 1)
hiddenBearCond = plotHiddenBearInput and priceLH and oscHH and phFound
plot(
	 phFound ? osc  : na,
	 offset=-lbrInput,
	 title="Hidden Bearish",
	 linewidth=2,
	 color=(hiddenBearCond ? hiddenBearColor : noneColor)
	 )
plotshape(
	 DivergenceShowInput ? hiddenBearCond ? osc  : na : na,
	 offset=-lbrInput,
	 title="Hidden Bearish Label",
	 text=" H Bear ",
	 style=shape.labeldown,
	 location=location.absolute,
	 color=bearColor,
	 textcolor=textColor
	 )
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Check RSI Lineup ------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
bullTF =  rsi > rsi  and rsi  > rsi 
bearTF =  rsi < rsi  and rsi  < rsi 
bullTF1 =  rsi1 > rsi1_1 and rsi1_1 > rsi1_2
bearTF1 =  rsi1 < rsi1_1 and rsi1_1 < rsi1_2
bullTF2 =  rsi2 > rsi2_1 and rsi2_1 > rsi2_2
bearTF2 =  rsi2 < rsi2_1 and rsi2_1 < rsi2_2
bullTF3 =  rsi3 > rsi3_1 and rsi3_1 > rsi3_2
bearTF3 =  rsi3 < rsi3_1 and rsi3_1 < rsi3_2
bullTF4 =  rsi4 > rsi4_1 and rsi4_1 > rsi4_2
bearTF4 =  rsi4 < rsi4_1 and rsi4_1 < rsi4_2
bbTxt(bull,bear) =>
    bull ? "BULLISH" : bear ? "BEARISCH" : 'NO LINEUP'
bbColor(bull,bear) =>
    bull ? bullishColor : bear ? bearishColor : nomatchColor
newTC(tBox, col, row, txt, width, txtColor, bgColor, txtHA, txtSize) =>
    table.cell(table_id=tBox,column=col, row=row, text=txt, width=width,text_color=txtColor,bgcolor=bgColor, text_halign=txtHA, text_size=txtSize)
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Define RSI Table Setting ----------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
width_c0 = 0
width_c1 = 0
if rsiShowTable
    var tBox = table.new(position=rsiTablePosition, columns=5, rows=6, bgcolor=color.rgb(18,22,33,50), frame_color=color.black, frame_width=1, border_color=color.black, border_width=1)
    newTC(tBox, 0,1,"RSI Current",width_c0,color.orange,color.rgb(0,0,0,100),'right',rsiTextSize)
    newTC(tBox, 1,1,str.format(" {0,number,#.##} ", rsi),width_c0,vWhite,rsi < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
    newTC(tBox, 4,1,bbTxt(bullTF, bearTF),width_c0,vWhite,bbColor(bullTF, bearTF),'center',rsiTextSize)
    if rsiShowHist
        newTC(tBox, 2,1,str.format(" {0,number,#.##} ", rsi ),width_c0,vWhite,rsi  < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
        newTC(tBox, 3,1,str.format(" {0,number,#.##} ", rsi ),width_c0,vWhite,rsi  < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
    if rsiShowTF1
        newTC(tBox, 0,2,TF2txt(rsiTF1),width_c0,vWhite,color.rgb(0,0,0,100),'right',rsiTextSize)
        newTC(tBox, 1,2,str.format(" {0,number,#.##} ", rsi1),width_c0,vWhite,rsi1 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
        newTC(tBox, 4,2,bbTxt(bullTF1, bearTF1),width_c0,vWhite,bbColor(bullTF1,bearTF1),'center',rsiTextSize)
        if rsiShowHist
            newTC(tBox, 2,2,str.format(" {0,number,#.##} ", rsi1_1),width_c0,vWhite,rsi1_1 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
            newTC(tBox, 3,2,str.format(" {0,number,#.##} ", rsi1_2),width_c0,vWhite,rsi1_2 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
    if rsiShowTF2
        newTC(tBox, 0,3,TF2txt(rsiTF2),width_c0,vWhite,color.rgb(0,0,0,100),'right',rsiTextSize)
        newTC(tBox, 1,3,str.format(" {0,number,#.##} ", rsi2),width_c0,vWhite,rsi2 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
        newTC(tBox, 4,3,bbTxt(bullTF2, bearTF2),width_c0,vWhite,bbColor(bullTF2,bearTF2),'center',rsiTextSize)
        if rsiShowHist
            newTC(tBox, 2,3,str.format(" {0,number,#.##} ", rsi2_1),width_c0,vWhite,rsi2_1 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
            newTC(tBox, 3,3,str.format(" {0,number,#.##} ", rsi2_2),width_c0,vWhite,rsi2_2 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
    if rsiShowTF3
        newTC(tBox, 0,4,TF2txt(rsiTF3),width_c0,vWhite,color.rgb(0,0,0,100),'right',rsiTextSize)
        newTC(tBox, 1,4,str.format(" {0,number,#.##} ", rsi3),width_c0,vWhite,rsi3 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
        newTC(tBox, 4,4,bbTxt(bullTF3, bearTF3),width_c0,vWhite,bbColor(bullTF3,bearTF3),'center',rsiTextSize)
        if rsiShowHist
            newTC(tBox, 2,4,str.format(" {0,number,#.##} ", rsi3_1),width_c0,vWhite,rsi3_1 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
            newTC(tBox, 3,4,str.format(" {0,number,#.##} ", rsi3_2),width_c0,vWhite,rsi3_2 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
    if rsiShowTF4
        newTC(tBox, 0,5,TF2txt(rsiTF4),width_c0,vWhite,color.rgb(0,0,0,100),'right',rsiTextSize)
        newTC(tBox, 1,5,str.format(" {0,number,#.##} ", rsi4),width_c0,vWhite,rsi4 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
        newTC(tBox, 4,5,bbTxt(bullTF4, bearTF4),width_c0,vWhite,bbColor(bullTF4,bearTF4),'center',rsiTextSize)
        if rsiShowHist
            newTC(tBox, 2,5,str.format(" {0,number,#.##} ", rsi4_1),width_c0,vWhite,rsi4_1 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
            newTC(tBox, 3,5,str.format(" {0,number,#.##} ", rsi4_2),width_c0,vWhite,rsi4_2 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
//------------------------------------------------------
//--- Alerts -------------------------------------------
//------------------------------------------------------
MTF Supertrend + MA [TCMaster]Overview:
The MTF Supertrend + MA indicator combines two powerful multi-timeframe tools — the Supertrend and Moving Averages (MA) — into one unified and customizable framework. It allows traders to analyze market trends and dynamic support/resistance levels from multiple higher timeframes directly on a single chart.
⚙️ Features
🟩 Supertrend Section
Up to 4 configurable Supertrends, each from a different timeframe.
Adjustable ATR Length and Multiplier (Factor).
Independent visibility, colors, and timeframes for each layer.
Built-in alert conditions for trend reversals (Uptrend ↔ Downtrend).
Clean visual overlay on price chart.
🟦 Moving Average (MA) Section
Up to 4 multi-timeframe MAs displayed simultaneously.
Supports multiple MA types:
SMA, EMA, WMA, RMA, HMA, VWMA, DEMA, TEMA.
Independent control for each MA: color, line width, and timeframe.
Dynamic Info Label displaying distance between price and each MA in real-time.
Smooth, accurate MTF synchronization (no repainting from lookahead).
💡 How to Use
Identify higher-timeframe trend direction using Supertrend signals.
Use MAs as dynamic support/resistance or mean reversion zones.
Combine both for multi-timeframe confluence trading:
e.g., look for long entries when lower TF Supertrend turns bullish and price is above higher TF MAs.
Set alerts to get notified when any Supertrend flips its direction.
🧩 Customization
All parameters are grouped into two sections for clarity:
Supertrend Settings
MA Settings
Fully compatible with all chart types and timeframes.
⚠️ Notes
This indicator is designed for visual multi-timeframe analysis, not for automation.
Alerts only trigger when the corresponding timeframe bar closes.
Ensure replay mode or real-time conditions to verify alert behavior.
Tristan's Tri-band StrategyTristan's Tri-band Strategy - Confluence Trading System 
Strategy Overview:
 
 This strategy combines three powerful technical indicators - RSI, Williams %R, and Bollinger Bands - into a single visual trading system. Instead of cluttering your chart with separate indicator panels, all signals are displayed directly on the price chart using color-coded gradient overlays, making it easy to spot high-probability trade setups at a glance.
 
 How It Works: 
The strategy identifies trading opportunities when multiple indicators align (confluence), suggesting strong momentum shifts:
 📈 Long Entry Signals: 
 
 RSI drops to 30 or below (oversold)
 Williams %R reaches -80 to -100 range (oversold)
 Price touches or breaks below the lower Bollinger Band
 All three conditions must align during your selected trading session
 
 📉 Short Entry Signals: 
 
 RSI rises to 70 or above (overbought)
 Williams %R reaches 0 to -20 range (overbought)
 Price touches or breaks above the upper Bollinger Band
 All three conditions must align during your selected trading session
 
Visual Indicators:
 
 (faint) Green gradients below candles = Bullish oversold conditions (buying opportunity)
 (faint) Red/Orange gradients above candles = Bearish overbought conditions (selling opportunity)
 Stacked/brighter gradients = Multiple indicators confirming the same signal (higher probability) will stack and show brighter / less faint
 Blue Bollinger Bands = Volatility boundaries and mean reversion zones
 
 Exit Strategy: 
 
 Long trades exit when price reaches the upper Bollinger Band OR RSI becomes overbought (≥70)
 Short trades exit when price reaches the lower Bollinger Band OR RSI becomes oversold (≤30)
 
 Key Features: 
✅ Session Filters - Trade only during NY (9:30 AM-4 PM), London (3 AM-11:30 AM), or Asia (7 PM-1 AM EST) sessions
✅ No Repainting - Signals are confirmed on candle close for realistic backtesting and live trading
✅ Customizable Parameters - Adjust RSI levels, BB standard deviations, Williams %R periods, and gradient visibility
✅ Visual Clarity - See all three indicators at once without switching between panels
✅ Built-in Alerts - Get notified when entry and exit conditions are met
 How to Use Effectively: 
 
 Choose Your Trading Session - For day trading US stocks, enable only the NY session. For forex or 24-hour markets, select the sessions that match your schedule.
 Look for Gradient Stacking - The brightest, most visible gradients occur when both RSI and Williams %R signal together. These are your highest-probability setups.
 Confirm with Price Action - Wait for the candle to close before entering. The strategy enters on the next bar's open to prevent repainting.
 Respect the Bollinger Bands - Entries occur at the outer bands (price extremes), and exits occur at the opposite band or when momentum reverses.
 Backtest First - Test the strategy on your preferred instruments and timeframes. Works best on liquid assets with clear trends and mean reversion patterns (stocks, major forex pairs, indices).
 Adjust Gradient Visibility - Use the "Gradient Strength" slider (lower = more visible) to make signals stand out on your chart style.
 
Best Timeframes: 5-minute to 1-hour charts for intraday trading; 4-hour to daily for swing trading  (I have also found the 3 hour timeframe to work really well for some stocks / ETFs.) 
Best Markets: Liquid instruments with volatility - SPY, QQQ, major stocks, EUR/USD, GBP/USD, major indices
Risk Management: This is a mean reversion strategy that works best in ranging or choppy markets. In strong trends, signals may appear less frequently. Always use proper position sizing and stop losses based on your risk tolerance.
----------------------------------------------
Note: Past performance does not guarantee future results. This strategy is provided for educational purposes. Always backtest thoroughly and practice proper risk management before live trading.RetryClaude can make mistakes. Please double-check responses. Sonnet 4.5
Ichimoku Strict exit indicatorIndicator for ichimoku with exit 
entry - when all cond meet
exit on base line






















