BollingerBands MTF | AlchimistOfCrypto🌌 Bollinger Bands – Unveiling Market Volatility Fields 🌌
"The Bollinger Bands, reimagined through quantum mechanics principles, visualizes the probabilistic distribution of price movements within a multi-dimensional volatility field. This indicator employs principles from wave function mathematics where standard deviation creates probabilistic boundaries, similar to electron cloud models in quantum physics. Our implementation features algorithmically enhanced visualization derived from extensive mathematical modeling, creating a dynamic representation of volatility compression and expansion cycles with adaptive glow effects that highlight the critical moments where volatility phase transitions occur."
📊 Professional Trading Application
The Bollinger Bands Quantum transcends traditional volatility measurement with a sophisticated gradient illumination system that reveals the underlying structure of market volatility fields. Scientifically calibrated for multiple timeframes and featuring eight distinct visual themes, it enables traders to perceive volatility contractions and expansions with unprecedented clarity.
⚙️ Indicator Configuration
- Volatility Field Parameters 📏
Python-optimized settings for specific market conditions:
- Period: 20 (default) - The quantum time window for volatility calculation
- StdDev Multiplier: 2.0 - The probabilistic boundary coefficient
- MA Type: SMA/EMA/VWMA/WMA/RMA - The quantum field smoothing algorithm
- Visual Theming 🎨
Eight scientifically designed visual palettes optimized for volatility pattern recognition:
- Neon (default): High-contrast green/red scheme enhancing volatility transition visibility
- Cyan-Magenta: Vibrant palette for maximum volatility boundary distinction
- Yellow-Purple: Complementary colors for enhanced compression/expansion detection
- Specialized themes (Green-Red, Forest Green, Blue Ocean, Orange-Red, Grayscale): Each calibrated for different market environments
- Opacity Control 🔍
- Variable transparency system (0-100) allowing seamless integration with price action
- Adaptive glow effect that intensifies during volatility phase transitions
- Quantum field visualization that reveals the probabilistic nature of price movements
🚀 How to Use
1. Select Visualization Parameters ⏰: Adjust period and standard deviation to match market conditions
2. Choose MA Type 🎚️: Select the appropriate smoothing algorithm for your trading strategy
3. Select Visual Theme 🌈: Choose a color scheme that enhances your personal pattern recognition
4. Adjust Opacity 🔎: Fine-tune visualization intensity to complement your chart analysis
5. Identify Volatility Phases ✅: Monitor band width to detect compression (pre-breakout) and expansion (trend)
6. Trade with Precision 🛡️: Enter during band contraction for breakouts, or trade mean reversion using band boundaries
7. Manage Risk Dynamically 🔐: Use band width as volatility-based position sizing parameter
Indicators and strategies
Setup Score Check Final AlertTotal Score
Significance
0–6 points
No trade – "Instinct instead of system"
7–12 points
C-Setup – only small test size
13–17 points
B-Setup – entry with caution
18–21 points
A-Setup – fully feasible
ICT Ultimate Checklist | MARKET MAVERISK MOHAMMAD ESMAILIIThis indicator serves as a checklist for ICT traders. It stays on the chart regularly because the ICT method has various components for confirmation needed to enter a trade, helping us not to get distracted and stay on our strategy.
BB SqueezeBB Squeeze
This indicator detects volatility contraction ("squeeze") by checking when Bollinger Bands are entirely inside the Keltner Channels — a condition that often precedes significant price movement.
🟦 Visual Highlight
Unlike traditional squeeze indicators, this version highlights the squeeze only between the upper and lower Bollinger Bands, creating a clean and focused visual cue.
How it works:
When the Bollinger Bands fall inside the Keltner Channels:
A semi-transparent aqua background fills the BB area
No full-screen background is used — minimal and precise
Useful for identifying potential breakout setups and volatility cycles
Parameters include:
BB and Keltner lengths & multipliers
Toggle between “Both bands inside” vs “At least one inside” logic
📈 Ideal for breakout traders, volatility scalpers, and swing strategy setups.
Sharpe & Sortino Ratio PROSharpe & Sortino Ratio PRO offers an advanced and more precise way to calculate and visualize the Sharpe and Sortino Ratios for financial assets on TradingView. Its main goal is to provide a scientifically accurate method for assessing the risk-adjusted performance of assets, both in the short and long term. Unlike TradingView’s built-in metrics, this script correctly handles periodic returns, uses optional logarithmic returns, properly annualizes both returns and volatility, and adjusts for the risk-free rate — all critical factors for truly meaningful Sharpe and Sortino calculations.
Users can customize the rolling analysis window (e.g., 252 periods for one year on daily data) and the long-term smoothing period (e.g., 1260 periods for five years). There’s also an option to select between linear and logarithmic returns and to manually input a risk-free rate if real-time data from FRED (the 3-Month T-Bill Rate via FRED:DGS3MO) is unavailable. Based on the chart’s timeframe (daily, weekly, or monthly), the script automatically adjusts the risk-free rate to a per-period basis.
The Sharpe Ratio is calculated by first determining the asset’s excess returns (returns after subtracting the risk-free return per period), then computing the average and standard deviation of those excess returns over the specified window, and finally annualizing these figures separately — in line with best scientific practices (Sharpe, 1994). The Sortino Ratio follows a similar approach but only considers negative returns, focusing specifically on downside risk (Sortino & Van der Meer, 1991).
To enhance readability, the script visualizes the ratios using a color gradient: strong negative values are shown in red, neutral values in yellow, and strong positive values in green. Additionally, the long-term averages for both Sharpe and Sortino are plotted with steady colors (teal and orange, respectively), making it easier to spot enduring performance trends.
Why calculating Sharpe and Sortino Ratios manually on TradingView is necessary?
While TradingView provides basic Sharpe and Sortino Ratios, they come with significant methodological flaws that can lead to misleading conclusions about an asset’s true risk-adjusted performance.
First, TradingView often computes volatility based on the standard deviation of price levels rather than returns (TradingView, 2023). This method is problematic because it causes the volatility measure to be directly dependent on the asset’s absolute price. For instance, a stock priced at $1,000 will naturally show larger absolute daily price moves than a $10 stock, even if their percentage changes are similar. This artificially inflates the measured standard deviation and, as a result, depresses the calculated Sharpe Ratio.
Second, TradingView frequently neglects to adjust for the risk-free rate. By treating all returns as risky returns, the computed Sharpe Ratio may significantly underestimate risk-adjusted performance, especially when interest rates are high (Sharpe, 1994).
Third, and perhaps most critically, TradingView doesn’t properly annualize the mean excess return and the standard deviation separately. In correct financial math, the mean excess return should be multiplied by the number of periods per year, while the standard deviation should be multiplied by the square root of the number of periods per year (Cont, 2001; Fabozzi et al., 2007). Incorrect annualization skews the Sharpe and Sortino Ratios and can lead to under- or overestimating investment risk.
These flaws lead to three major issues:
• Overstated volatility for high-priced assets.
• Incorrect scaling between returns and risk.
• Sharpe Ratios that are systematically biased downward, especially in high-price or high-interest environments.
How to properly calculate Sharpe and Sortino Ratios in Pine Script?
To get accurate results, the Sharpe and Sortino Ratios must be calculated using the correct methodology:
1. Use returns, not price levels, to calculate volatility. Ideally, use logarithmic returns for better mathematical properties like time additivity (Cont, 2001).
2. Adjust returns by subtracting the risk-free rate on a per-period basis to obtain true excess returns.
3. Annualize separately:
• Multiply the mean excess return by the number of periods per year (e.g., 252 for daily data).
• Multiply the standard deviation by the square root of the number of periods per year.
4. Finally, divide the annualized mean excess return by the annualized standard deviation to calculate the Sharpe Ratio.
The Sortino Ratio follows the same structure but uses downside deviations instead of standard deviations.
By following this scientifically sound method, you ensure that your Sharpe and Sortino Ratios truly reflect the asset’s real-world risk and return characteristics.
References
• Cont, R. (2001). Empirical properties of asset returns: stylized facts and statistical issues. Quantitative Finance, 1(2), pp. 223–236.
• Fabozzi, F.J., Gupta, F. and Markowitz, H.M. (2007). The Legacy of Modern Portfolio Theory. Journal of Investing, 16(3), pp. 7–22.
• Sharpe, W.F. (1994). The Sharpe Ratio. Journal of Portfolio Management, 21(1), pp. 49–58.
• Sortino, F.A. and Van der Meer, R. (1991). Downside Risk: Capturing What’s at Stake in Investment Situations. Journal of Portfolio Management, 17(4), pp. 27–31.
• TradingView (2023). Help Center - Understanding Sharpe and Sortino Ratios. Available at: www.tradingview.com (Accessed: 25 April 2025).
Reversal Sweeps (R/G & G/R V+) with BB FilterRed then green (or green then red) candle setup where the green sweeps the low of the red candle and has more volume, while also wicking the BB
Dow Trend clean MTF - Anticipated SignalsThis is MTF Dow theory arrows... you have the chart timeframe plus 4 other timeframe options. The issue is if you are on a low time frame for example on 1min then you can not see into the future.... a problem we all can relate to ;) I'm working on it. So there will be a delay in a 1 hr dow signal until all the 1hr criteria are met. I have added 2 "sets" of arrows. The 2nd set attempts to anticipate what the longer timeframe signal will be based on aggregate bars. So they may not always be correct. It's an experiment. Enjoy. Screenshot is not using the aggregate arrows just the regular ones. Showing arrows for 15s, 30s, 1m, 2m, and 4 min. progressively larger arrows. transparency is in the code rather than user interface...but should be fine.
Price Flip StrategyPrice Flip Strategy with User-Defined Ticker Max/Max
This strategy leverages an inverted price calculation based on user-defined maximum and minimum price levels over customizable lookback periods. It generates buy and sell signals by comparing the previous bar's original price to the inverted price, within a specified date range. The script plots key metrics, including ticker max/min, original and inverted prices, moving averages, and HLCC4 averages, with customizable visibility toggles and labels for easy analysis.
Key Features:
Customizable Inputs: Set lookback periods for ticker max/min, moving average length, and date range for signal generation.
Inverted Price Logic: Calculates an inverted price using ticker max/min to identify trading opportunities.
Flexible Visualization: Toggle visibility for plots (e.g., ticker max/min, prices, moving averages, HLCC4 averages) and last-bar labels with user-defined colors and sizes.
Trading Signals: Generates buy signals when the previous original price exceeds the inverted price, and sell signals when it falls below, with alerts for real-time notifications.
Labeling: Displays values on the last bar for all plotted metrics, aiding in quick reference.
How to Use:
Add to Chart: Apply the script to a TradingView chart via the Pine Editor.
Configure Settings:
Date Range: Set the start and end dates to define the active trading period.
Ticker Levels: Adjust the lookback periods for calculating ticker max and min (e.g., 100 bars for max, 100 for min).
Moving Averages: Set the length for exponential moving averages (default: 20 bars).
Plots and Labels: Enable/disable specific plots (e.g., Inverted Price, Original HLCC4) and customize label colors/sizes for clarity.
Interpret Signals:
Buy Signal: Triggered when the previous close price is above the inverted price; marked with an upward label.
Sell Signal: Triggered when the previous close price is below the inverted price; marked with a downward label.
Set Alerts: Use the built-in alert conditions to receive notifications for buy/sell signals.
Analyze Plots: Review plotted lines (e.g., ticker max/min, HLCC4 averages) and last-bar labels to assess price behavior.
Tips:
Use in trending markets by enabling ticker max for uptrends or ticker min for downtrends, as indicated in tooltips.
Adjust the label offset to prevent overlapping text on the last bar.
Test the strategy on a demo account to optimize lookback periods and moving average settings for your asset.
Disclaimer: This script is for educational purposes and should be tested thoroughly before use in live trading. Past performance is not indicative of future results.
KingMR Multi Stoch Div Strat w/MA CrossStochastics averages with 9/20 ma up/down indicators.
Reports Higher high / lower high/ lower low/ higher low signals of stochastic averages.
Best used with individual stochastics for full view of individual periods.
⚡ High-Frequency Pro Strategy | Enhanced Filtersfind the supply ondemand for Gold and the best areat to import
Whale Psychology Insights
### 🧠 Whale Psychology Insights – Unmasking Smart Money Moves
**Understand the mind games behind every candle.**
This advanced indicator is designed to reveal the psychological warfare played by whales and market manipulators in the crypto space. Stop trading blind—start trading with the insights of the smart money.
#### 🔍 What It Does:
- **Liquidity Zone Detection** – Automatically identifies key **swing highs/lows** where stop hunts are likely.
- **Volume Spike Alerts** – Spot **suspicious activity** where big players enter or exit.
- **Order Block Zones** – Highlights **bullish/bearish engulfing patterns** used by institutions.
- **Fair Value Gaps (FVG)** – Marks price inefficiencies where price may return.
- **Fakeout Detection** – Finds **manipulative wicks** designed to trap retail traders.
#### 💡 Use Cases:
- Avoid getting stopped out by **liquidity grabs**
- Enter after the **whales have made their move**
- Identify **high-probability reversal zones**
- Trade **with smart money**, not against it
Perfect for scalpers, intraday traders, and swing traders looking to understand *why* price moves—not just *where*.
> 🧠 **Trade the psychology, not just the chart.**
RSI-WMA + EMA Trend Filter | SL/TP DynamicA Simple Edge in Trending Markets
Base on RSI & WMA (RSI) Cross with EMA for trend filter.
GER MCB V2My version of Market Cipher B. V1
Combination of oscillator, vwap, rsi all in one.
Multi-timeframe.
Dskyz Options Flow Flux (OFF) - FuturesDskyz Options Flow Flux (OFF) - Futures
*This is a repost due to moderator intervention on use of ™ in my scripts. I'm in the process of getting this rectified. This was originally posted around mid-night CDT.
🧠 The Dskyz Options Flow Flux (OFF) - Futures indicator is a game changer for futures traders looking to tap into institutional activity with limited resources. Designed for TradingView this tool simulates options flow data (call/put volume and open interest) for futures contracts like MNQ MES NQ and ES giving u actionable insights through volume spike detection volatility adjustments and stunning visuals like aurora flux bands and round number levels. Whether u’re a beginner learning the ropes or a pro hunting for an edge this indicator delivers real time market sentiment and key price levels to boost ur trading game
Key Features
⚡ Simulated Options Flow: Breaks down call/put volume and open interest using market momentum and volatility
📈 Spike Detection: Spots big moves in volume and open interest with customizable thresholds
🧠 Volatility Filter: Adapts to market conditions using ATR for smarter spike detection
✨ Aurora Flux Bands: Glows with market sentiment showing u bullish or bearish vibes at a glance
🎯 Round Number Levels: Marks key psychological levels where big players might step in
📊 Interactive Dashboard: Real time metrics like sentiment score and volatility factor right on ur chart
🚨 Alerts: Get notified of bullish or bearish spikes so u never miss a move
How It Works
🧠 This indicator is built to make complex options flow analysis simple even with the constraints of Pine Script. Here’s the step by step:
Simulated Volume Data (Dynamic Split):
Pulls daily volume for ur chosen futures contract (MNQ1! MES1! NQ1! ES1!)
Splits it into call and put volume based on momentum (ta.mom) and volatility (ATR vs its 20 period average)
Estimates open interest (OI) for calls and puts (1.15x for calls 1.1x for puts)
Formula: callRatio = 0.5 + (momentum / close) * 10 + (volatility - 1) * 0.1 capped between 0.3 and 0.7
Why It Matters: Mimics how big players might split their trades giving u a peek into institutional sentiment
Spike Detection:
Compares current volume/OI to short term (lookbackShort) and long term (lookbackLong) averages
Flags spikes when volume/OI exceeds the average by ur set threshold (spikeThreshold for regular highConfidenceThreshold for strong)
Adjusts for volatility so u’re not fooled by choppy markets
Output: optionsSignal (2 for strong bullish -2 for strong bearish 1 for bullish -1 for bearish 0 for neutral)
Why It Matters: Pinpoints where big money might be stepping in
Volatility Filter:
Uses ATR (10 periods) and its 20 period average to calculate a volatility factor (volFactor = ATR / avgAtr)
Scales spike thresholds based on market conditions (volAdjustedThreshold = spikeThreshold * max(1 volFactor * volFilter))
Why It Matters: Keeps ur signals reliable whether the market is calm or wild
Sentiment Score:
Calculates a call/put ratio (callVolume / putVolume) and adjusts for volatility
Converts it to a 0 to 100 score (higher = bullish lower = bearish)
Formula: sentimentScore = min(max((volAdjustedSentiment - 1) * 50 0) 100)
Why It Matters: Gives u a quick read on market bias
Round Number Detection:
Finds the nearest round number (e.g. 100 for MNQ1! 50 for MES1!)
Checks for volume spikes (volume > 3 period SMA * spikeThreshold) and if price is close (within ATR * atrMultiplier)
Updates the top activity level every 15 minutes when significant activity is detected
Why It Matters: Highlights psychological levels where price often reacts
Visuals and Dashboard:
Combines aurora flux bands glow effects round number lines and a dashboard to make insights pop (see Visual Elements below)
Plots triangles for call/put spikes (green/red for strong lime/orange for regular)
Sets up alerts for key market moves
Why It Matters: Makes complex data easy to read at a glance
Inputs and Customization
⚙️ Beginners can tweak these settings to match their trading style while pros can dig deeper for precision:
Futures Symbol (symbol): Pick ur contract (MNQ1! MES1! NQ1! ES1!). Default: MNQ1!
Short Lookback (lookbackShort): Days for short term averages. Smaller = more sensitive. Range: 1+. Default: 5
Long Lookback (lookbackLong): Days for long term averages. Range: 5+. Default: 10
Spike Threshold (spikeThreshold): How big a spike needs to be (e.g. 1.1 = 10% above average). Range: 1.0+. Default: 1.1
High Confidence Threshold (highConfidenceThreshold): For strong spikes (e.g. 3.0 = 3x average). Range: 2.0+. Default: 3.0
Volatility Filter (volFilter): Adjusts for market volatility (e.g. 1.2 = 20% stricter in volatile markets). Range: 1.0+. Default: 1.2
Aurora Flux Transparency (glowOpacity): Controls band transparency (0 = solid 100 = invisible). Range: 0 to 100. Default: 65
Show Show OFF Dashboard (showDashboard): Toggles the dashboard with key metrics. Default: true
Show Nearest Round Number (showRoundNumbers): Displays round number levels. Default: true
ATR Multiplier for Proximity (atrMultiplier): How close price needs to be to a round number (e.g. 1.5 = within 1.5x ATR). Range: 0.5+. Default: 1.5
Functions and Logic
🧠 Here’s the techy stuff pros will love:
Simulated Volume Data : Splits daily volume into call/put volume and OI using momentum and volatility
Volatility Filter: Scales thresholds with volFactor = atr / avgAtr for adaptive detection
Spike Detection: Flags spikes and assigns optionsSignal (2, -2, 1, -1, 0) for sentiment
Sentiment Score: Converts call/put ratio into a 0-100 score for quick bias reads
Round Number Detection: Identifies key levels and significant activity for trading zones
Dashboard Display: Updates real time metrics like sentiment score and volatility factor
Visual Elements
✨ These visuals make data come alive:
Gradient Background: Green (bullish) red (bearish) or yellow (neutral/choppy) at 95% transparency to show trend
Aurora Flux Bands: Stepped bands (linewidth 3) around a 14 period EMA ± ATR * 1.8. Colors shift with sentiment (green red lime orange gray) with glow effects at 85% transparency
Round Number Visualization: Stepped lines (linewidth 2) at key levels (solid if active dashed if not) with labels (black background white text size.normal)
Visual Signals: Triangles above/below bars for spikes (size.small for strong size.tiny for regular)
Dashboard: Bottom left table (2 columns 10 rows) with a black background (29% transparency) gray border and metrics:
⚡ Round Number Activity: “Detected” or “None”
📈 Trend: “Bullish” “Bearish” or “Neutral” (colored green/red/gray)
🧠 ATR: Current 10 period ATR
📊 ATR Avg: 20 period SMA of ATR
📉 Volume Spike: “YES” (green) or “NO” (red)
📋 Call/Put Ratio: Current ratio
✨ Flux Signal: “Strong Bullish” “Strong Bearish” “Bullish” “Bearish” or “Neutral” (colored green/red/gray)
⚙️ Volatility Factor: Current volFactor
📈 Sentiment Score: 0-100 score
Usage and Strategy Recommendations
🎯 For Beginners: Use high confidence spikes (green/red triangles) for easy entries. Check the dashboard for a quick market read (sentiment score above 60 = bullish below 40 = bearish). Watch round number levels for support/resistance
💡 For Pros: Combine flux signals with round number activity for high probability setups. Adjust lookbackShort/lookbackLong for trending vs choppy markets. Use volFactor for position sizing (higher = smaller positions)
MA10+10ProKey Features:
Displays up to 20 MAs (customizable EMA/SMA types) in two color groups (Red/Blue)
Dual Fill Areas: Visualize the space between any two MAs with dynamic colors (Green=Uptrend, Red=Downtrend)
Dual Cross Signals: Buy (△/↑) and Sell (▽/↓) markers when MAs crossover
Full Customization: Choose any MAs for fills or cross alerts
🔧 How to Use:
Set MA Parameters:
Adjust periods for MA1-MA20 (e.g., 10, 20, 50, 200)
Switch between EMAs (fast) or SMAs (slow) types
Fill Area Setup:
Pick any two MAs (e.g., MA1 & MA2) to generate trend zones
Cross Alerts:
Select two MAs (e.g., MA3 & MA4) to trigger buy/sell arrows
🎯 Best For:
Trend following: Use fill colors to identify market bias
Entry/exit signals: Arrow markers highlight potential reversals
Multi-timeframe analysis: Track both short & long-term MAs
功能简介:
同时显示最多20条均线(可自定义EMA/SMA类型),分为两组(红/蓝颜色区分)
双填充区域:动态显示两条均线之间的区域,颜色反映趋势(绿涨红跌)
双交叉信号:当均线交叉时,自动标记买入(△/↑)和卖出(▽/↓)信号
完全可定制:自由选择任意两条均线进行填充或交叉检测
🔧 使用方法:
设置均线参数:
调整MA1-MA20的周期(如10、20、50、200等)
选择均线类型(EMA快线 / SMA慢线)
填充区域设置:
选择任意两条均线(如MA1和MA2)生成趋势填充带
交叉信号设置:
指定两条均线(如MA3和MA4)触发买卖箭头标记
🎯 适用场景:
趋势跟踪:通过填充区域颜色判断多空趋势
买卖点提示:箭头标记辅助识别突破时机
多周期分析:同时监控短期和长期均线
Scalper Signal PRO (EMA + RSI + Stoch)//@version=5
indicator("Scalper Signal PRO (EMA + RSI + Stoch)", overlay=true)
// === INPUTS ===
emaFastLen = input.int(5, "EMA Fast")
emaSlowLen = input.int(13, "EMA Slow")
rsiLen = input.int(14, "RSI Length")
rsiBuy = input.int(30, "RSI Buy Level")
rsiSell = input.int(70, "RSI Sell Level")
kPeriod = input.int(5, "Stoch K")
dPeriod = input.int(3, "Stoch D")
slowing = input.int(3, "Stoch Smoothing")
// === SESSION TIME ===
sessionStart = timestamp ("GMT+8", year, month, dayofmonth, 8, 0)
sessionEnd = timestamp("GMT+8" ,year, month, dayofmonth, 18, 0)
withinSession = time >= sessionStart and time <= sessionEnd
// === LOGIC ===
emaFast = ta.ema(close, emaFastLen)
emaSlow = ta.ema(close, emaSlowLen)
emaBullish = emaFast > emaSlow and ta.crossover(emaFast, emaSlow)
emaBearish = emaFast < emaSlow and ta.crossunder(emaFast, emaSlow)
rsi = ta.rsi(close, rsiLen)
k = ta.sma(ta.stoch(close, high, low, kPeriod), slowing)
d = ta.sma(k, dPeriod)
buyCond = emaBullish and rsi < rsiBuy and k > d and withinSession
sellCond = emaBearish and rsi > rsiSell and k < d and withinSession
// === PLOTS ===
showSignals = input.bool(true, "Show Buy/Sell Signals?")
plotshape(showSignals and buyCond, location=location.belowbar, style=shape.labelup, color=color.green, text="BUY", title="Buy Signal")
plotshape(showSignals and sellCond, location=location.abovebar, style=shape.labeldown, color=color.red, text="SELL", title="Sell Signal")
plot(emaFast, "EMA Fast", color=color.orange)
plot(emaSlow, "EMA Slow", color=color.blue)
// === ALERTS ===
alertcondition(buyCond, title="Buy Alert", message="Scalper PRO Buy Signal")
alertcondition(sellCond, title="Sell Alert", message="Scalper PRO Sell Signal")
// === DASHBOARD ===
var table dash = table.new(position.top_right, 2, 5, frame_color=color.gray, frame_width=1)
bg = color.new(color.black, 85)
table.cell(dash, 0, 0, "Scalper PRO", bgcolor=bg, text_color=color.white, text_size=size.normal)
table.cell(dash, 0, 1, "Trend", bgcolor=bg)
table.cell(dash, 1, 1, emaFast > emaSlow ? "Bullish" : "Bearish", bgcolor=emaFast > emaSlow ? color.green : color.red, text_color=color.white)
table.cell(dash, 0, 2, "RSI", bgcolor=bg)
table.cell(dash, 1, 2, str.tostring(rsi, "#.0"), bgcolor=color.gray, text_color=color.white)
table.cell(dash, 0, 3, "Stoch K/D", bgcolor=bg)
table.cell(dash, 1, 3, str.tostring(k, "#.0") + "/" + str.tostring(d, "#.0"), bgcolor=color.navy, text_color=color.white)
table.cell(dash, 0, 4, "Session", bgcolor=bg)
table.cell(dash, 1, 4, withinSession ? "LIVE" : "OFF", bgcolor=withinSession ? color.green : color.red, text_color=color.white)
Sharpe Ratio Forced Selling StrategyThis study introduces the “Sharpe Ratio Forced Selling Strategy”, a quantitative trading model that dynamically manages positions based on the rolling Sharpe Ratio of an asset’s excess returns relative to the risk-free rate. The Sharpe Ratio, first introduced by Sharpe (1966), remains a cornerstone in risk-adjusted performance measurement, capturing the trade-off between return and volatility. In this strategy, entries are triggered when the Sharpe Ratio falls below a specified low threshold (indicating excessive pessimism), and exits occur either when the Sharpe Ratio surpasses a high threshold (indicating optimism or mean reversion) or when a maximum holding period is reached.
The underlying economic intuition stems from institutional behavior. Institutional investors, such as pension funds and mutual funds, are often subject to risk management mandates and performance benchmarking, requiring them to reduce exposure to assets that exhibit deteriorating risk-adjusted returns over rolling periods (Greenwood and Scharfstein, 2013). When risk-adjusted performance improves, institutions may rebalance or liquidate positions to meet regulatory requirements or internal mandates, a behavior that can be proxied effectively through a rising Sharpe Ratio.
By systematically monitoring the Sharpe Ratio, the strategy anticipates when “forced selling” pressure is likely to abate, allowing for opportunistic entries into assets priced below fundamental value. Exits are equally mechanized, either triggered by Sharpe Ratio improvements or by a strict time-based constraint, acknowledging that institutional rebalancing and window-dressing activities are often time-bound (Coval and Stafford, 2007).
The Sharpe Ratio is particularly suitable for this framework due to its ability to standardize excess returns per unit of risk, ensuring comparability across timeframes and asset classes (Sharpe, 1994). Furthermore, adjusting returns by a dynamically updating short-term risk-free rate (e.g., US 3-Month T-Bills from FRED) ensures that macroeconomic conditions, such as shifting interest rates, are accurately incorporated into the risk assessment.
While the Sharpe Ratio is an efficient and widely recognized measure, the strategy could be enhanced by incorporating alternative or complementary risk metrics:
• Sortino Ratio: Unlike the Sharpe Ratio, the Sortino Ratio penalizes only downside volatility (Sortino and van der Meer, 1991). This would refine entries and exits to distinguish between “good” and “bad” volatility.
• Maximum Drawdown Constraints: Integrating a moving window maximum drawdown filter could prevent entries during persistent downtrends not captured by volatility alone.
• Conditional Value at Risk (CVaR): A measure of expected shortfall beyond the Value at Risk, CVaR could further constrain entry conditions by accounting for tail risk in extreme environments (Rockafellar and Uryasev, 2000).
• Dynamic Thresholds: Instead of static Sharpe thresholds, one could implement dynamic bands based on the historical distribution of the Sharpe Ratio, adjusting for volatility clustering effects (Cont, 2001).
Each of these risk parameters could be incorporated into the current script as additional input controls, further tailoring the model to different market regimes or investor risk appetites.
References
• Cont, R. (2001) ‘Empirical properties of asset returns: stylized facts and statistical issues’, Quantitative Finance, 1(2), pp. 223-236.
• Coval, J.D. and Stafford, E. (2007) ‘Asset Fire Sales (and Purchases) in Equity Markets’, Journal of Financial Economics, 86(2), pp. 479-512.
• Greenwood, R. and Scharfstein, D. (2013) ‘The Growth of Finance’, Journal of Economic Perspectives, 27(2), pp. 3-28.
• Rockafellar, R.T. and Uryasev, S. (2000) ‘Optimization of Conditional Value-at-Risk’, Journal of Risk, 2(3), pp. 21-41.
• Sharpe, W.F. (1966) ‘Mutual Fund Performance’, Journal of Business, 39(1), pp. 119-138.
• Sharpe, W.F. (1994) ‘The Sharpe Ratio’, Journal of Portfolio Management, 21(1), pp. 49-58.
• Sortino, F.A. and van der Meer, R. (1991) ‘Downside Risk’, Journal of Portfolio Management, 17(4), pp. 27-31.
Flask's Week IndicatorThis indicator shows the start of each new week and syncs local timezone to exchange you trading on.
V3 Theonator Bank Volume Entry & Exitsnipe the huz out of the banks like tralala leo trlala like this indicator is fine shi liek fr
Williams Percent Range proOverview
Williams Percent Range Pro is a powerful divergence detection tool based on the Williams %R oscillator.
It automatically identifies and plots regular and hidden divergences between price action and the %R oscillator, providing traders with early indications of potential trend reversals or trend continuations.
This indicator enhances the classic Williams %R by adding intelligent divergence detection logic, customizable visualization, and integrated alert conditions — making it a highly versatile tool for both manual and automated trading.
Features
Automatic Divergence Detection
Regular Divergence (signals trend reversals)
Hidden Divergence (signals trend continuations)
Customizable Settings
Period length, source price, color customization for each divergence type
Visual Enhancements
Overbought, Mid, and Oversold levels (-20, -50, -80)
Shaded background for easier visual interpretation
Pivot Detection
Identifies key swing points on the Williams %R line for divergence comparison
Integrated Alerts
Set up alerts for each type of divergence without coding
Lightweight and Optimized
Designed for fast loading and efficient operation on any timeframe
How It Works
Williams %R Calculation
The script calculates the Williams %R as follows:
%R = 100 × (Close - Highest High over Period) ÷ (Highest High - Lowest Low)
This results in a value that moves between -100 and 0, indicating overbought and oversold conditions.
Pivot Detection
The indicator uses pivot highs and pivot lows on the %R line to determine important swing points.
Pivot logic is based on comparing neighboring candles (5 bars to the left and 5 bars to the right by default).
Divergence Detection
1. Regular Divergence
Regular Bullish Divergence:
Price makes a Lower Low
Williams %R makes a Higher Low
→ Signals potential upward reversal
Regular Bearish Divergence:
Price makes a Higher High
Williams %R makes a Lower High
→ Signals potential downward reversal
2. Hidden Divergence
Hidden Bullish Divergence:
Price makes a Higher Low
Williams %R makes a Lower Low
→ Signals potential upward continuation
Hidden Bearish Divergence:
Price makes a Lower High
Williams %R makes a Higher High
→ Signals potential downward continuation
Each type of divergence is plotted with a specific label and customizable color on the indicator.
Input Parameters
Input Description
Length Period length for Williams %R calculation (default: 14)
Source Data source (default: Close)
Show Regular Divergence Enable/disable regular divergence detection
Show Hidden Divergence Enable/disable hidden divergence detection
Regular Bullish Color Color for regular bullish divergence labels
Regular Bearish Color Color for regular bearish divergence labels
Hidden Bullish Color Color for hidden bullish divergence labels
Hidden Bearish Color Color for hidden bearish divergence labels
Visual Elements
Horizontal Lines:
-20: Overbought zone
-50: Mid-level (dashed line)
-80: Oversold zone
Background Shading:
Fills between -20 and -80 for better visual focus on active trading zones.
Divergence Labels:
Bull = Regular Bullish Divergence
Bear = Regular Bearish Divergence
H Bull = Hidden Bullish Divergence
H Bear = Hidden Bearish Divergence
Each label appears exactly at the pivot points of the Williams %R line, offset slightly for clarity.
Alerts
You can create TradingView alerts based on the following conditions:
Regular Bullish Divergence Detected
Regular Bearish Divergence Detected
Hidden Bullish Divergence Detected
Hidden Bearish Divergence Detected
This allows fully automated trading setups or mobile push notifications.
Example alert message:
"Williams %R Regular Bullish Divergence Detected"
Usage Tips
Entry Strategy:
Combine divergence signals with trend confirmation indicators like EMA/SMA, MACD, or Volume.
Exit Strategy:
Monitor when price reaches key resistance/support zones or overbought/oversold levels on the %R.
Higher Accuracy:
Always confirm divergences with price action patterns such as breakouts, candlestick formations, or trendline breaks.
Conclusion
The Williams Percent Range Pro indicator brings powerful divergence detection and customization features to a classic momentum oscillator.
It provides clear visual and alert-based trading signals that help you anticipate major turning points or trend continuations in any market and timeframe.
Whether you are a swing trader, day trader, or scalper, this tool can be an essential addition to your technical analysis toolkit.
Weekday Colors with Time Highlighting by NabojeetThis script is a Pine Script (version 6) indicator called "Weekday Colors with Time Highlighting" designed for TradingView charts. It has several key functions:
1. **Weekday Color Coding**:
- Assigns different background colors to each trading day (Monday through Friday)
- Allows users to customize the color for each day
- Includes toggles to enable/disable colors for specific days
2. **Time Range Highlighting**:
- Highlights a specific time period (e.g., 18:15-18:30) on every trading day
- Uses a custom color that can be adjusted by the user
- The time range is specified in HHMM-HHMM format
3. **High/Low Line Drawing**:
- Automatically identifies the highest high and lowest low points within the specified time range
- Draws horizontal lines at these levels when the time period ends
- Lines extend forward in time to serve as support/resistance references
- Users can customize the line color, width, and style (solid, dotted, or dashed)
The script is organized into logical sections with input parameters grouped by function (Weekday Colors, Weekday Display, Time Highlighting, and Horizontal Lines). Each section's inputs are customizable through the indicator settings panel.
This indicator would be particularly useful for traders who:
- Want visual distinction between different trading days
- Focus on specific time periods each day (like market opens, closes, or specific sessions)
- Use intraday support/resistance levels from key time periods
- Want to quickly identify session highs and lows
The implementation resets tracking variables at the beginning of each new time range and draws the lines once the time period ends, ensuring accurate high/low marking for each day's specified time window.
Author - Nabojeet
ExtremePointtop+botttom_fxtop+botttom_fxtop+botttom_fxtop+botttom_fxtop+botttom_fxtop+botttom_fxtop+botttom_fx