CipherMatrix Dashboard (MarketCipher B)Pre-compute MarketCipher-B values for each fixed timeframe (5 m, 15 m, 30 m, 60 m, 4 H, Daily).
Pass those values into plotRow() instead of calling request.security() inside the helper—removes the style warning.
Added explicit range parameters to table.clear(dash, 0, 0, 2, 6) to satisfy v6’s argument requirement.
This version should compile without the previous warnings/errors. Swap in your real MarketCipher-B histogram when you’re ready, and the dashboard is good to go!
Penunjuk dan strategi
Relative Strength Suite [BLC]📊 Relative Strength Suite
A powerful, all-in-one relative strength toolkit for traders and analysts. Whether you're a trend follower, momentum trader, or sector rotator, this script gives you the flexibility to analyze and screen assets using three distinct RS methodologies—all in one clean interface.
🔍 What It Does
Flexible Relative Strength allows you to compare any asset to a benchmark (like SP:SPX , NASDAQ:QQQ , AMEX:IWM , etc.) using one of four modes:
📈 Relative Strength – Classic price ratio comparison
📘 Dorsey Relative Strength – Smoothed trend-based RS using EMA
📒 Mansfield Relative Strength – Momentum-based RS normalized to its own average
🧮 Screener Mode – Load Indicator into Pine Screener to see all 3 values.
🛠️ Key Features & Settings
🧩 Relative Strength
Comparison Symbol: Select the ticker you want to use as a benchmark.
Highlights new highs/lows in Relative Strength with dynamic line coloring:
🟢 Green = New high (outperformance)
🔴 Red = New low (underperformance)
Optional moving average overlay (SMA, EMA, WMA, HMA) for trend smoothing.
✅ Use Case: Identify when a stock is gaining strength relative to the market or sector.
📘 2. Dorsey RS (Smoothed Trend)
Uses an EMA of the RS ratio to smooth out noise.
Rising Dorsey RS = consistent outperformance.
Falling Dorsey RS = consistent underperformance.
✅ Use Case: Spot long-term relative trends regardless of price volatility.
📒 3. Mansfield RS (Performance Momentum)
Compares RS ratio to its own long-term SMA (default 200).
Values above 0 = outperforming the benchmark.
Values below 0 = underperforming.
✅ Use Case: Ideal for momentum traders and Stan Weinstein-style stage analysis.
🧮 4. Screener Mode
Not for use on your chart. This is only to use in TradingView's Pine Screener.
Displays all three RS lines simultaneously.
Includes all 3 modes to act as screener signals
🛠️How to Use Screener Mode
Add this indicator to your favorites list.
Open Pine Screener and select this indicator.
Select your timeframe.
Click Settings & Change Strength Type to Screener > Click Apply
Hit Scan!
New High Low Signal: Finds stocks making a new RS high (1) or low (-1) over your lookback period.
Dorsey Trend Signal: Finds stocks where the smoothed RS trend is rising (1) or falling (-1).
Mansfield Zone Signal: Finds stocks where momentum is in the positive zone (1) or negative zone (-1)
✅ Use Case: Quickly scan multiple assets for relative strength breakouts, trend shifts, or momentum zones.
🧪 Pro Tip
Combine this indicator with volume, price structure, or moving averages to confirm breakouts and trend strength. Use Screener Mode on a watchlist to identify top RS candidates in seconds.
To clean up your screener table, click the column settings icon ( ⋮ ) and uncheck any columns you don't need to see. You can still filter by them even if they are hidden.
📝 Credits & Notes
Inspired by classic RS methods (including Dorsey and Mansfield).
Final, production-ready version with tooltips, labels, and screener outputs.
For educational and informational purposes—always test before live trading!
Let me know if you see any bugs, miscalculations, or any features you'd like to see added to it!
Williams Alligator Price vs Jaw StrategyWilliams Alligator using Price crossing over Jaw to go long and Price crossing under Jaw to close
SuperPerformance_V1.2📊 SUPER PERFORMANCE INDICATOR
A comprehensive performance analysis tool that compares your stock against selected indices and tracks sector performance across multiple timeframes.
🎯 MAIN FEATURES
✅ Stock Performance Table
• Compares stock vs index performance across 1D, 5D, 10D, 20D, 50D, 200D periods
• Shows ✓/✗ indicators for outperformance tracking
• Displays percentage gains/losses with color coding (green=positive, red=negative)
• Calculates conviction score based on outperformance across timeframes
• Provides performance difference between stock and index
✅ Sector Performance Table
• Ranks top 5 performing sectors across different timeframes
• Shows real-time sector performance with percentage changes
• Tracks 19 major Indian market sectors
• Customizable time periods (1D, 5D, 10D, 20D, 60D)
✅ Sector Display Box
• Shows current stock's sector classification
• Customizable positioning and styling
• Optional sector abbreviations
🔧 CUSTOMIZATION OPTIONS
📋 Display Settings
• Dark/Light mode toggle
• Show/hide individual tables
• Mini mode for compact view
• Index selection (default: NIFTYMIDSML400)
📊 Table Controls
• Enable/disable specific columns and rows
• Adjustable table size (tiny/small/normal/large)
• 9 positioning options for each table
• Color customization for backgrounds and text
🎨 Advanced Features
• Conviction scoring system (Perfect/Solid/Good/Ok/Weak/Poor)
• Real-time performance tracking
• Multi-timeframe analysis
• Sector rotation insights
📈 CONVICTION LEVELS
• Perfect: Outperforms in all periods
• Solid: Outperforms in 67%+ periods
• Good: Outperforms in 50%+ periods
• Ok: Outperforms in 33%+ periods
• Weak: Outperforms in some periods
• Poor: Underperforms in all periods
⚙️ HOW TO USE
1. Add indicator to your chart
2. Select comparison index in Display Settings
3. Customize visible columns/rows as needed
4. Position tables on screen
5. Analyze green ✓ (outperforming) vs red ✗ (underperforming)
6. Use conviction score for overall performance assessment
🎯 IDEAL FOR
• Relative strength analysis
• Sector rotation strategies
• Performance benchmarking
• Indian equity markets
Note: Designed specifically for NSE/Indian market analysis with pre-configured sector indices.
Kelly Optimal Leverage IndicatorThe Kelly Optimal Leverage Indicator mathematically applies Kelly Criterion to determine optimal position sizing based on market conditions.
This indicator helps traders answer the critical question: "How much capital should I allocate to this trade?"
Note that "optimal position sizing" does not equal the position sizing that you should have. The Optima position sizing given by the indicator is based on historical data and cannot predict a crash, in which case, high leverage could be devastating.
Originally developed for gambling scenarios with known probabilities, the Kelly formula has been adapted here for financial markets to dynamically calculate the optimal leverage ratio that maximizes long-term capital growth while managing risk.
Key Features
Kelly Position Sizing: Uses historical returns and volatility to calculate mathematically optimal position sizes
Multiple Risk Profiles: Displays Full Kelly (aggressive), 3/4 Kelly (moderate), 1/2 Kelly (conservative), and 1/4 Kelly (very conservative) leverage levels
Volatility Adjustment: Automatically recommends appropriate Kelly fraction based on current market volatility
Return Smoothing: Option to use log returns and smoothed calculations for more stable signals
Comprehensive Table: Displays key metrics including annualized return, volatility, and recommended exposure levels
How to Use
Interpret the Lines: Each colored line represents a different Kelly fraction (risk tolerance level). When above zero, positive exposure is suggested; when below zero, reduce exposure. Note that this is based on historical returns. I personally like to increase my exposure during market downturns, but this is hard to illustrate in the indicator.
Monitor the Table: The information panel provides precise leverage recommendations and exposure guidance based on current market conditions.
Follow Recommended Position: Use the "Recommended Position" guidance in the table to determine appropriate exposure level.
Select Your Risk Profile: Conservative traders should follow the Half Kelly or Quarter Kelly lines, while more aggressive traders might consider the Three-Quarter or Full Kelly lines.
Adjust with Volatility: During high volatility periods, consider using more conservative Kelly fractions as recommended by the indicator.
Mathematical Foundation
The indicator calculates the optimal leverage (f*) using the formula:
f* = μ/σ²
Where:
μ is the annualized expected return
σ² is the annualized variance of returns
This approach balances potential gains against risk of ruin, offering a scientific framework for position sizing that maximizes long-term growth rate.
Notes
The Full Kelly is theoretically optimal for maximizing long-term growth but can experience significant drawdowns. You should almost never use full kelly.
Most practitioners use fractional Kelly strategies (1/2 or 1/4 Kelly) to reduce volatility while capturing most of the growth benefits
This indicator works best on daily timeframes but can be applied to any timeframe
Negative Kelly values suggest reducing or eliminating market exposure
The indicator should be used as part of a complete trading system, not in isolation
Enjoy the indicator! :)
P.S. If you are really geeky about the Kelly Criterion, I recommend the book The Kelly Capital Growth Investment Criterion by Edward O. Thorp and others.
Supertrend AT v1.0📌 Supertrend AT v1.0 — Strategy Overview
Overview
Supertrend AT v1.0 is a fully automated trading strategy based on the Supertrend indicator.
It identifies trend reversals and places long or short entries accordingly, with built-in position sizing, stop-loss/take-profit management, and commission-aware calculations.
🚀 Key Features
✅ Entry Signals Based on Trend Reversals
Long entry when Supertrend changes from downtrend to uptrend
Short entry when Supertrend changes from uptrend to downtrend
✅ Risk-Based Position Sizing
Calculates position size so that a stop-loss only risks a fixed percentage (RPT) of total capital
✅ Reward/Risk Ratio-Based Target Price Calculation
Take-profit price is computed not by price difference, but by actual loss and desired reward-to-risk (RR) ratio
✅ Fully Commission-Aware
Commission is factored into entry, stop-loss, and take-profit price calculations
Ensure commission settings match in both the input panel and the strategy properties tab
✅ Dual Language Support
Switch between English and Korean interface
✅ Visual Trade Levels & Info Display
Entry, stop, and target prices plotted on the chart
Real-time open PnL and equity shown in an on-screen table
⚙️ How to Use
Apply Strategy to Chart
Load the strategy and configure the following parameters in both the Input tab and the Properties tab:
Commission rate (e.g., 0.05%)
Market decimal precision (e.g., 4 for 0.0001)
Adjust Entry Parameters
RPT: Risk per trade as a percentage of your total equity (e.g., 2%)
RR: Reward-to-risk ratio (e.g., 3 = target profit is 3× the potential loss)
Choose whether to allow Long or Short trades
For Auto-Trading Integration
Make sure the minimum order size is valid for your exchange
If the calculated quantity is below the exchange's minimum unit, it may result in errors
⚠️ Important Notes
❗ Non-Repainting — Supertrend is based on confirmed candles and does not repaint
❗ Backtest-Only — The strategy is for signal generation only and does not execute real trades without external automation
❗ Margin-Based Calculations — Default settings assume margin trading; adjust accordingly
📄 License & Disclaimer
This strategy is licensed under the Mozilla Public License 2.0.
This script is not financial advice. Use at your own risk.
Always test thoroughly with backtesting and paper trading before using in live markets.
CM_VixFix_RSI_HMA200_TrailStop_vFinal📌 CM_VixFix_RSI_HMA200_TrailStop – vFinal | BTC 30-Minute Strategy (Long & Short)
This strategy combines volatility-based market shock detection (Williams Vix Fix), trend confirmation (HMA200), and momentum filtering (RSI) to generate high-probability trade entries. It is engineered for BTC/USDT on the 30-minute timeframe, with carefully tuned parameters through extensive backtesting.
🎯 Core Components:
WVF (Williams Vix Fix): Identifies volatility spikes, acting as a proxy for oversold conditions or panic drops.
RSI (Relative Strength Index): Generates directional momentum signals, with separate thresholds for long and short entries.
HMA200: Filters trades based on the prevailing market trend. Trades are only allowed in the direction of HMA slope and position.
ATR-Based Trailing Stop Engine: Activates after a minimum profit threshold is hit. Combines dynamic trailing logic with a Hard Stop (maximum loss limit) to mitigate risk.
⚠️ Short-Side Challenges & Solutions
During development, the short-side trades exhibited a lower win rate, a common behavior in crypto bull-biased markets. To address this, we implemented:
RSI trigger reduced to 20 to capture only high-momentum sell-offs.
Dual confirmation: RSI must also be below its EMA(21) and price below EMA(100).
MaxBars filter (10 candles): Prevents multiple short entries in tight ranges or low-volatility zones.
As a result:
Short trades now yield a Risk/Reward ratio above 3.4
Average short trade profit is ~3x the average loss, making short entries valuable despite lower hit rate.
📊 Performance Summary (Backtest: BTCUSDT, 30-Min, July 2024–July 2025)
Metric Long Short Overall
Total Trades 401 50 451
Win Rate 49.6% 30.0% 47.4%
Avg PnL 311 USDT 1,229 USDT 413 USDT
Risk/Reward (Avg K/L) 1.05 3.48 1.16
🚨 Disclaimer
This strategy is not a plug-and-play black box. While signals are statistically validated, we strongly recommend using this tool in conjunction with:
Volume and time-of-day filters
Fundamental/macro overlays (especially around Fed announcements or CPI data)
A broader risk management framework
Note: This strategy has been optimized exclusively for BTC/USDT on the 30-minute timeframe. If applied to other assets or timeframes, recalibration is necessary.
Price × Volume Momentum (FSTO / RSI / Avg)decided to combine my PXVS and PXVR in to one script. user has the option to use FSTO, RSI, or the average between the two oscillators.
the oscillator components have been modified to range from -100 to +100 to express directional magnitude.
volume remains 0 to 100, so it can function as a direction-neutral amplifier.
The result is a bi-directional composite oscillator that:
>> Emphasizes congruent signals (e.g., strong price direction with strong volume).
>> Minimizes misleading or incongruent signals from high volume paired with neutral or conflicting price movement.
Ideal for identifying high-conviction breakouts and momentum divergences with volume support.
BullFinder_15M_OBV_RSI_MFI📊 BullFinder_15M_OBV_RSI_MFI
15-Minute BTC/USDT Long-Only Strategy Powered by OBV, NetVolume, RSI and MFI
Designed for high-frequency bullish opportunities, this strategy combines volume-confirmed momentum with dynamic trailing stop exits. Ideal for breakout traders seeking consistency over noise.
🔍 Indicators Used:
OBV + Net Volume: Volume divergence & pressure detection
RSI + MFI: Momentum and liquidity filters
EMA21: Baseline trend confirmation
Advanced Trailing Stop: Dynamic trigger + offset + hard loss control
📅 Backtest Summary (Last 12 Months | BTC/USDT | 15m TF):
Total Trades: 381
Win Rate: 83.20%
Avg. PnL per Trade: +746.18 USDT
Avg. Winner: 7,097 USDT
Avg. Loser: -30,713 USDT
Best Trade: 65,654 USDT
Profit Factor: 0.231
✅ Alerts Available
To automate entries or get Telegram alerts, set an alarm with the message:
📢 "BullFinder: Long Entry Triggered"
Improved Breakout-Retest Strategy (5M Entry)This strategy combines the strength of a higher timeframe structure with precision 5-minute entries. It identifies consolidation zones on the 4H chart, waits for a strong breakout in the direction of the trend, and then enters on a retest confirmed by an engulfing candle on the 5-minute timeframe. A 200 EMA filter ensures trades align with the dominant trend, while a strict 1:3 risk-to-reward ratio maximizes profitability. It's designed to reduce false breakouts and optimize small account growth with tight stop losses and high probability setups during active trading hours.
SMMA Cross Strategy stopsuzThey were formed by the intersections of 2 SMMA moving averages. You can adjust the parameter and make profit.
Custom Daily Session Zones by KoenigseggCustom Daily Session Zones
🟣 Description
This indicator displays customizable trading session time zones as background highlights on your chart, on any timeframe you choose. The inline info tooltip provides the precise start and end times of the three largest market sessions—the US, the EU, and ASIA—for quick reference. It provides flexible control over session times for different days of the week, making it ideal for traders who need to visualize specific market hours or trading sessions.
🟣 Key Features
- Flexible Session Configuration: Set a common session time for all days or customize individual sessions for each day of the week
- Per-Day Control: Enable or disable sessions for specific days (Monday through Sunday)
- Color Customization: Choose unique colors for each day's session zones
- UTC Timezone Standard: All session times are defined in UTC to ensure consistency across charts
- Clean Visual Display: Non-intrusive background highlighting that doesn't interfere with price action
🟣 How to Use
- Common Session Mode: Use the default mode to apply the same session time across all enabled days
- Manual Per-Day Mode: Enable "Manual per-day sessions" to set different session times for each day
- Day Selection: Toggle individual days on/off based on your trading schedule
- Color Coding: Customize colors for each day to easily distinguish between different sessions
🟣 Technical Details
- Uses Pine Script v6 for optimal performance
- Implements proper session time detection using TradingView's built-in time functions
- Operates in UTC timezone for all session calculations
- Lightweight code that doesn't impact chart performance
🟣 Use Cases
- Highlight specific trading sessions (London, New York, Tokyo, etc.)
- Mark important market hours for your trading strategy
- Visualize different session overlaps
- Create custom trading time windows
- Track market activity during specific hours
🟣 Compatibility
- Works on all timeframes
- Compatible with all asset classes (Forex, Stocks, Crypto, Futures, etc.)
- Supports all TradingView chart types
- Responsive design that adapts to different screen sizes
🟣 Image Descriptions
- First Image (main image): Shows multiple New York Stock Exchange sessions from 1:30 p.m. to 8:00 p.m. (UTC), on the 15-minute timeframe, with each day’s zone colored differently to demonstrate the indicator’s customizable color settings.
- Second Image: A zoomed‑in fractal chart view of the same New York session on the 15-minute timeframe, illustrating how the background session zone appears even at higher detail levels.
Third Image: A close‑up of the New York session (1:30 p.m. to 8:00 p.m.) on the 3-minute timeframe, reaffirming the consistency of zone highlighting across different zoom levels.
🟣 Future Updates (v2)
In the next release, you’ll be able to define multiple session blocks per day—displaying two distinct colored zones within the same trading day. This will help you visualize when one market session ends and another begins without losing chart clarity.
🟣 Conclusion
This indicator is perfect for traders who need precise control over Market Session visualization and want to maintain a clean, professional chart appearance.
🟣 Disclaimer
This script is provided for educational and illustrative purposes only. It is not financial or trading advice, nor a recommendation to buy or sell any asset. Always conduct your own research and consult a professional before making any trading decisions.
Supports & Resistances with MomentumSupports & Resistances with Momentum is an advanced indicator for scalping and intraday trading It shows dynamic support and resistance levels, clear BUY/SELL signals with TP targets and stop-loss lines, plus optional RSI and volume plots Fully customizable and designed for quick, precise trade decisions.
Sanuja nuwanThe Zero Fear Indicator is a custom-built trading tool designed for confident and precise entries. Powered by real-time market structure, volume pressure, and volatility logic, it filters out noise and shows clear buy/sell signals with zero hesitation. Perfect for both beginners and experienced traders looking to trade without fear.
Candlesticks MTF + Prev Daily RangeCandlesticks MTF + Previous Daily Range
This TradingView script displays higher timeframe candlesticks on a lower timeframe chart and optionally projects the previous day's high, low, and close levels. The user can define the timeframe from which the candles are taken, typically a higher timeframe like daily. A specified number of historical candles are drawn on the chart using boxes for candle bodies and lines for wicks. The color of each candle indicates its direction: bullish candles use a "long" color (default teal), and bearish candles use a "short" color (default red).
An optional feature allows the projection of the previous daily range. When enabled, the script draws horizontal lines extending across the chart to mark the high, low, and close of the second most recent higher timeframe candle. These lines are color-coded for easy visual identification and can help identify potential support and resistance zones.
All visual elements, including the number of candles, their width, and the colors of candles and projection lines, can be customized through the settings. The script dynamically updates in real time, clearing outdated boxes and lines to avoid visual clutter. This makes it a useful tool for traders who want to incorporate multi-timeframe analysis and key price levels directly into their intraday charting.
Short-Term Holder MVRVThis script calculates and visualizes the Market Value to Realized Value (MVRV) ratio for Bitcoin, specifically focusing on short-term holders (STH). The MVRV ratio is a key on-chain metric that compares Bitcoin's market cap to its realized cap (the aggregate cost basis of all coins). It helps traders identify overbought and oversold conditions in the market.
Key Features
1. Moving Averages (Customizable)
The script allows users to apply different moving averages to smooth the MVRV data:
EMA (Exponential Moving Average)
SMA (Simple Moving Average)
SMMA/RMA (Smoothed/Rolling Moving Average)
WMA (Weighted Moving Average)
VWMA (Volume-Weighted Moving Average)
HMA (Hull Moving Average)
2. Core Calculation
Fetches BTC_MVRV data from TradingView's security function.
Computes a moving average (default: 238-period WMA) of the MVRV values.
Calculates the Ratio_MVRV as:
text
Ratio_MVRV = Current MVRV / Moving Average of MVRV
A bullish signal is generated when Ratio_MVRV > 1 (market is heating up).
A bearish signal is generated when Ratio_MVRV < 1 (market is cooling down).
3. Visual Output
Main Plot:
A line chart showing Ratio_MVRV.
Orange when bullish (Ratio_MVRV > 1).
Purple when bearish (Ratio_MVRV < 1).
Horizontal Line:
A dotted white line at 1.0, acting as a threshold.
Table Display:
A small table in the top-right corner showing "↑ Bull" (green) or "↓ Bear" (red) based on the current market state.
4. Alerts
Triggers TradingView alerts when the market state changes between bullish and bearish.
Interpretation & Trading Signals
When Ratio_MVRV > 1 (Bullish):
Suggests Bitcoin is gaining momentum, possibly entering an overbought phase.
Could indicate a good time to hold or accumulate, but extreme highs may signal a potential top.
When Ratio_MVRV < 1 (Bearish):
Suggests Bitcoin is undervalued, possibly in an oversold phase.
Could indicate a buying opportunity, but prolonged lows may signal further downside.
Default Settings & Customization
Length: 238 (adjustable, default based on common long-term trend analysis).
Moving Average Type: WMA (Weighted Moving Average).
Users can modify these settings in the Inputs menu in TradingView.
Use Case
Helps traders identify market cycles by tracking short-term holder behavior.
Works best as a confirmation tool alongside other indicators (e.g., RSI, MACD).
Useful for swing traders and long-term investors looking for trend reversals.
Simple Volume IndicatorBased on the great work of Nitin Ranjan .
Plots volume in 4 different colors and reduce all the noise.
VWMA + ML RSI StrategyVWMA + ML RSI Strategy
This strategy combines the power of Volume-Weighted Moving Average (VWMA) with a Machine Learning-enhanced RSI to generate high-probability long entries.
✅ Buy Logic:
A buy signal is triggered when:
The candle closes above the VWMA
The ML RSI (smoothed using advanced moving averages) is above 60
If only one of the above conditions is met, the strategy waits for the second to confirm before entering.
❌ Sell Logic:
The position is closed when:
The candle closes below the VWMA, and
The ML RSI falls below 40
🎯 Risk Management:
Take Profit: 1.5% above entry
Stop Loss: 1.5% below entry
🤖 ML RSI Explanation:
The ML RSI is a refined version of the traditional RSI using smoothing techniques (like ALMA, EMA, etc.) to reduce noise and enhance responsiveness to price action. It helps filter out weak signals and improves trend confirmation.
🔧 Customization:
Adjustable VWMA length
Configurable ML RSI smoothing method, length, and ALMA sigma
Thresholds for entry/exit RSI levels
Byquan ADX RSI EMA9 Cross AlertThis indicator is used when the ADX exceeds the 40 threshold to look for potential reversals, confirmed by the crossover between the RSI and the RSI-based moving average, as well as the EMA 9.
Overlapping FVG - [Fandesoft Trading Academy]🧠 Overview
This script plots Higher Timeframe Fair Value Gaps (FVGs) with full visibility and precise placement on lower timeframe charts. Each timeframe (30s–15m) has its own independent toggle, custom label, and box styling, allowing traders to analyze market structures in detail.
🎯 Features
✅ Identifies Fair Value Gaps using a 3-candle logic (candle 1 high vs candle 3 low, and vice versa).
✅ Plots HTF FVG boxes aligned to lower timeframes for intraday analysis.
✅ Supports custom timeframes: 30s to 15m, with individual toggles.
✅ Full visual customization: border color, bullish/bearish box opacity, label font size and color.
✅ Modular inputs to enable or disable specific timeframes for performance.
✅ Uses barstate.isconfirmed logic for stable, non-repainting plots.
⚙️ How It Works
The script requests higher timeframe data via request.security. For each confirmed bar, it checks for FVGs based on:
Bullish FVG: low >= high
Bearish FVG: low >= high
If a gap is detected, a box is plotted between candle 1 and candle 3 using box.new().
Timeframe toggles ensure calculations remain within the limit of 40 request.security calls.
📈 Use Cases
Scalpers and intraday traders analyzing microstructure.
ICT methodology practitioners visualizing displacement and inefficiencies.
Traders layering multiple FVG timeframes for confluence.
3.RSI LIJO 45*55//@version=6
indicator(title="3.RSI LIJO 45*55", shorttitle="RSI-LIJO-45-55", format=format.price, precision=2, timeframe="", timeframe_gaps=true)
rsiLengthInput = input.int(9, minval=1, title="RSI Length", group="RSI Settings")
rsiSourceInput = input.source(close, "Source", group="RSI Settings")
calculateDivergence = input.bool(false, title="Calculate Divergence", group="RSI Settings", display=display.data_window, tooltip="Calculating divergences is needed in order for divergence alerts to fire.")
change = ta.change(rsiSourceInput)
up = ta.rma(math.max(change, 0), rsiLengthInput)
down = ta.rma(-math.min(change, 0), rsiLengthInput)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
// Change RSI line color based on bands
rsiColor = rsi > 50 ? color.green : rsi < 50 ? color.red : color.white
rsiPlot = plot(rsi, "RSI", color=rsiColor)
rsiUpperBand = hline(55, "RSI Upper Band", color=color.rgb(5, 247, 22))
midline = hline(50, "RSI Middle Band", color=color.new(#787B86, 50))
rsiLowerBand = hline(45, "RSI Lower Band", color=color.rgb(225, 18, 14))
fill(rsiUpperBand, rsiLowerBand, color=color.rgb(126, 87, 194, 90), title="RSI Background Fill")
midLinePlot = plot(50, color=na, editable=false, display=display.none)
fill(rsiPlot, midLinePlot, 100, 55, top_color=color.new(color.green, 0), bottom_color=color.new(color.green, 100), title="Overbought Gradient Fill")
fill(rsiPlot, midLinePlot, 45, 0, top_color=color.new(color.red, 100), bottom_color=color.new(color.red, 0), title="Oversold Gradient Fill")
// Smoothing MA inputs
GRP = "Smoothing"
TT_BB = "Only applies when 'SMA + Bollinger Bands' is selected. Determines the distance between the SMA and the bands."
maTypeInput = input.string("SMA", "Type", options= , group=GRP, display=display.data_window)
maLengthInput = input.int(31, "Length", group=GRP, display=display.data_window)
bbMultInput = input.float(2.0, "BB StdDev", minval=0.001, maxval=50, step=0.5, tooltip=TT_BB, group=GRP, display=display.data_window)
var enableMA = maTypeInput != "None"
var isBB = maTypeInput == "SMA + Bollinger Bands"
// Smoothing MA Calculation
ma(source, length, MAtype) =>
switch MAtype
"SMA" => ta.sma(source, length)
"SMA + 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)
// Smoothing MA plots
smoothingMA = enableMA ? ma(rsi, maLengthInput, maTypeInput) : na
smoothingStDev = isBB ? ta.stdev(rsi, maLengthInput) * bbMultInput : na
plot(smoothingMA, "RSI-based MA", color=color.yellow, display=enableMA ? display.all : display.none, editable=enableMA)
bbUpperBand = plot(smoothingMA + smoothingStDev, title="Upper Bollinger Band", color=color.green, display=isBB ? display.all : display.none, editable=isBB)
bbLowerBand = plot(smoothingMA - smoothingStDev, title="Lower Bollinger Band", color=color.green, display=isBB ? display.all : display.none, editable=isBB)
fill(bbUpperBand, bbLowerBand, color=isBB ? color.new(color.green, 90) : na, title="Bollinger Bands Background Fill", display=isBB ? display.all : display.none, editable=isBB)
// Divergence
lookbackRight = 5
lookbackLeft = 5
rangeUpper = 60
rangeLower = 5
bearColor = color.red
bullColor = color.green
textColor = color.white
noneColor = color.new(color.white, 100)
_inRange(bool cond) =>
bars = ta.barssince(cond)
rangeLower <= bars and bars <= rangeUpper
plFound = false
phFound = false
bullCond = false
bearCond = false
rsiLBR = rsi
if calculateDivergence
//------------------------------------------------------------------------------
// Regular Bullish
// rsi: Higher Low
plFound := not na(ta.pivotlow(rsi, lookbackLeft, lookbackRight))
rsiHL = rsiLBR > ta.valuewhen(plFound, rsiLBR, 1) and _inRange(plFound )
// Price: Lower Low
lowLBR = low
priceLL = lowLBR < ta.valuewhen(plFound, lowLBR, 1)
bullCond := priceLL and rsiHL and plFound
//------------------------------------------------------------------------------
// Regular Bearish
// rsi: Lower High
phFound := not na(ta.pivothigh(rsi, lookbackLeft, lookbackRight))
rsiLH = rsiLBR < ta.valuewhen(phFound, rsiLBR, 1) and _inRange(phFound )
// Price: Higher High
highLBR = high
priceHH = highLBR > ta.valuewhen(phFound, highLBR, 1)
bearCond := priceHH and rsiLH and phFound
plot(
plFound ? rsiLBR : na,
offset = -lookbackRight,
title = "Regular Bullish",
linewidth = 2,
color = (bullCond ? bullColor : noneColor),
display = display.pane,
editable = calculateDivergence)
plotshape(
bullCond ? rsiLBR : na,
offset = -lookbackRight,
title = "Regular Bullish Label",
text = " Bull ",
style = shape.labelup,
location = location.absolute,
color = bullColor,
textcolor = textColor,
display = display.pane,
editable = calculateDivergence)
plot(
phFound ? rsiLBR : na,
offset = -lookbackRight,
title = "Regular Bearish",
linewidth = 2,
color = (bearCond ? bearColor : noneColor),
display = display.pane,
editable = calculateDivergence)
plotshape(
bearCond ? rsiLBR : na,
offset = -lookbackRight,
title = "Regular Bearish Label",
text = " Bear ",
style = shape.labeldown,
location = location.absolute,
color = bearColor,
textcolor = textColor,
display = display.pane,
editable = calculateDivergence)
alertcondition(bullCond, title='Regular Bullish Divergence', message="Found a new Regular Bullish Divergence, Pivot Lookback Right number of bars to the left of the current bar.")
alertcondition(bearCond, title='Regular Bearish Divergence', message='Found a new Regular Bearish Divergence, Pivot Lookback Right number of bars to the left of the current bar.')
AV BTC Top Cap ModelThe Bitcoin Top Cap
Developed by Willy Woo to identify market cycle tops. Top Cap is calculated by multiplying the Average Cap by 35. Average cap is calculated by taking the cumulative sum of daily market cap divided by the age of market in days. Additional Top Cap using 15x multiplier is included to show sensitivity and to gauge the effect of diminishing returns.
For the use on BTC Market Cap Chart : No changes necessary. Switching to logarithmic scale in recommended.
For the use on BTC Price Chart : After adding the indicator, enable Convert to price setting.
Customization of multipliers is enabled in the settings.
Data sources used: GLASSNODE:BTC_MARKETCAP and GLASSNODE:BTC_SUPPLY (for price conversion)
Note: Use with caution. I coded this for learning. This model might be past it's usefulness date. I am also seeing single digit % difference between this indicator values and top cap indicators available online.
minchang volume tradingCondition
Point color
Volume ≥ 3× MA(24)
Violet
Volume ≥ 1.5× MA(24)
Red
Volume < 1.5× MA(24) & bullish
White
Volume < 1.5× MA(24) & bearish
Black