Buy/Sell Indicator (RSI, MACD, ATR) v6+Buy Sell indicators based on EMA, Volume and MACD Has buy and sale flag indicators
Ketidakstabilan
Adaptive Causal Wavelet Trend FilterThe Adaptive Causal Wavelet Trend Filter is a technical indicator implementing causal approximations of wavelet transform properties for better trend detection with adaptive volatility response.
The Adaptive Causal Wavelet Trend Filter (ACWTF) applies mathematical principles derived from wavelet analysis to financial time series, providing robust trend identification with minimal lag. Unlike conventional moving averages, it preserves significant price movements while filtering market noise through signal processing that i describe below.
I was inspired to build this indicator after reading " Wavelet-Based Trend Identification in Financial Time Series " by In, F., & Kim, S. 2013 and reading about Mexican Hat wavelet filters.
The ACWTF maintains optimal performance across varying market regimes without requiring parameter adjustments by adapting filter characteristics to current volatility conditions.
Mathematical Foundation
Inspired by the Mexican Hat wavelet (Ricker wavelet), this indicator implements causal approximations of wavelet filters optimized for real-time financial analysis. The multi-resolution approach identifies features at different scales and the adaptive component dynamically adjusts filtering characteristics based on local volatility measurements.
Key mathematical properties include:
Non-linear frequency response adaptation
Edge-preserving signal extraction
Scale-space analysis through dual filter implementation
Volatility-dependent coefficient adjustment, which I love
Filter Methods
Adaptive: Implements a volatility-weighted combination of multiple filter types to optimize the time-frequency resolution trade-off
Hull: Provides a causal approximation of wavelet edge detection properties with forward-projection characteristics
VWMA: Incorporates volume information into the filtering process for enhanced signal detection
EMA Cascade: Creates a multi-pole filter structure that approximates certain wavelet scaling properties
Suggestion: try all as they will provide slightly different signals. Try also different time-frames.
Practical Applications
Trend Direction Identification: Clear visual trend direction with reduced noise and lag
Regime Change Detection: Early identification of significant trend reversals
Market Condition Analysis: Integrated volatility metrics provide context for current market behavior
Multi-timeframe Confirmation: Alignment between primary and secondary filters offers additional confirmation
Entry/Exit Timing: Filter crossovers and trend changes provide potential trading signals
The comprehensive information panel provides:
Current filter method and trend state
Trend alignment between timeframes
Real-time volatility assessment
Price position relative to filter
Overall trading bias based on multiple factors
Implementation Notes
Log returns option provides improved statistical properties for financial time series
Primary and secondary filter lengths can be adjusted to optimize for specific instruments and timeframes
The indicator performs particularly well during trend transitions and regime changes
The indicator reduces the need for using additional indicators to check trend reversion
Non-Repainting RSI 30/70 SignalA simple buy and sell indicator that relies on overbought and oversold areas that you enter whenyou get either a buy or sold signal.
Smart Deviation Trend Bands PRO + MTF Filter
Smart Deviation Trend Bands PRO + MTF Filter
This advanced version of Smart Deviation Bands gives you everything you need to catch cleaner trend bounces and avoid fake signals.
🔹 Classic deviation bands with 1, 2 and 3 standard deviations
🔹 Dynamic SMA line with clear trend coloring
🔹 Built-in multi-timeframe trend filter (MTF)
🔹 Signals only appear when they align with the higher timeframe trend
🔹 Ready-to-use alerts for bullish and bearish bounces
How it works
When price bounces off a deviation band AND the higher timeframe trend confirms, you get a clean signal.
Use multiple deviation levels to spot deeper or shallower pullbacks.
The higher timeframe filter reduces noise and keeps you trading with the bigger trend.
Signal markers
🟢 Green circle: Bullish bounce — price crossing up from lower band with HTF uptrend.
🔴 Red circle: Bearish bounce — price crossing down from upper band with HTF downtrend.
Works best with:
Any market: crypto, stocks, forex
Any timeframe — filter works from M5 to 1D+
Adjustable filter timeframe: use H4, 1D, 1W — up to your strategy
📌 Subscribe to my TradingView to not miss new useful scripts and updates!
💡 Need a custom version?
I create private Pine Script indicators and trading tools on request — scalping, trend, breakout, or custom strategies for any market.
Contact me if you want a unique script built for your exact trading style!
📩 Telegram 👉 t.me
High-Low Range % – poslední 2 periodyHere’s a ready-to-use **English description** for publishing your script on TradingView:
---
## 📈 **High-Low Range % – Last 2 Periods**
This indicator calculates and visualizes the **percentage range** between the **High and Low** of the last **two closed periods** (daily, weekly, or monthly – user selectable).
### 🔍 Features:
* Displays the **High–Low range in %** for each of the **two most recent completed candles**.
* **Highlights** the range label if it exceeds a user-defined threshold (e.g., 10%).
* Allows switching between **daily, weekly, or monthly** timeframe bases.
* User controls for:
* Range threshold
* Label color (normal and highlighted)
* Label text size
* Vertical label offset above the High
### ⚙️ Inputs:
* **Timeframe**: Select between `"D"`, `"W"`, or `"M"` to define the range period.
* **Threshold (%)**: If the range exceeds this value, the label changes color.
* **Highlight Color**: Color for ranges above the threshold.
* **Normal Color**: Color for ranges below the threshold.
* **Text Size**: Tiny → Huge label size.
* **Offset**: Distance in ticks to place the label above the period's High.
### 🖼 Visual Output:
* A label placed **just above the High** of the respective candle.
* High and Low levels of the selected period are plotted as horizontal lines.
* Only the **two most recent closed periods** are displayed to keep the chart clean.
---
Let me know if you'd also like a **screenshot description** or **tags** for publication (e.g., `volatility`, `range`, `BTC`, `weekly`, etc.).
Time-Specific Volume AverageA volume indicator based on historic volume.
Checks for the average volume in the past few days at the same time of day. This helps you determine when there is truly volume in the markets.
We will see often see sustained volume above the average during a clear trend. If you see spikes in volume without it being sustained above the average, it is very likely that the trend will die off quickly.
This is very helpful in determining whether to trade based on a trend following system, or a range based system.
Settings are below:
Days to average: Number of days to look back(tradingview has limits depending on your plan)
SMA Length: Number of "volume averages" to look at. Keep this at 1 if you want the average volume at the exact moment in the day. If you increase it, will also average in the past few candles of "volume averages".
SMA Multiplier: Multiplies the SMA by this amount(helps to get higher quality trends)
VIX-Price Covariance MonitorThe VIX-Price Covariance Monitor is a statistical tool that measures the evolving relationship between a security's price and volatility indices such as the VIX (or VVIX).
It can give indication of potential market reversal, as typically, volatility and the VIX increase before markets turn red,
This indicator calculates the Pearson correlation coefficient using the formula:
ρ(X,Y) = cov(X,Y) / (σₓ × σᵧ)
Where:
ρ is the correlation coefficient
cov(X,Y) is the covariance between price and the volatility index
σₓ and σᵧ are the standard deviations of price and the volatility index
Enjoy!
Features
Dual Correlation Periods: Analyze both short-term and long-term correlation trends simultaneously
Adaptive Color Coding: Correlation strength is visually represented through color intensity
Market Condition Assessment: Automatic interpretation of correlation values into actionable market insights
Leading/Lagging Analysis: Optional time-shift analysis to detect predictive relationships
Detailed Information Panel: Real-time statistics including current correlation values, historical averages, and trading implications
Interpretation
Positive Correlation (Red): Typically bearish for price, as rising VIX correlates with falling markets. This is what traders should be looking for.
Negative Correlation (Green): Typically bullish for price, as falling VIX correlates with rising markets
How to use it
Apply the indicator to any chart to see its correlation with the default VIX index
Adjust the correlation length to match your trading timeframe (shorter for day trading, longer for swing trading)
Enable the secondary correlation period to compare different timeframes simultaneously
For advanced analysis, enable the Leading/Lagging feature to detect if VIX changes precede or follow price movements
Use the information panel to quickly assess the current market condition and potential trading implications
Dynamic Ray BandsAbout Dynamic Ray Bands
Dynamic Ray Bands is a volatility-adaptive envelope indicator that adjusts in real time to evolving market conditions. It uses a Double Exponential Moving Average (DEMA) as its central trend reference, with upper and lower bands scaled according to current volatility measured by the Average True Range (ATR).
This creates a dynamic structure that visually frames price action, helping traders identify areas of potential trend continuation, overextension, or mean reversion.
How It Works
🟡 Centerline (DEMA)
The central yellow line is a Double Exponential Moving Average, which offers a smoother, less laggy trend signal than traditional moving averages. It represents the market’s short- to medium-term “equilibrium.”
🔵 Outer Bands
Plotted at:
Upper Band = DEMA + (ATR × outerMultiplier)
Lower Band = DEMA - (ATR × outerMultiplier)
These bands define the extreme bounds of current volatility. When price breaks above or below them, it can signal strong directional momentum or overbought/oversold conditions, depending on context. They're often used as trend breakout zones or to time exits after extended runs.
🟣 Inner Bands
Plotted closer to the DEMA:
Inner Upper = DEMA + (ATR × innerMultiplier)
Inner Lower = DEMA - (ATR × innerMultiplier)
These are preliminary volatility thresholds, offering early cues for potential expansion or reversal. They may be used for scalping, tight stop zones, or pre-breakout positioning.
🔁 Dynamic Width (Bands are Dynamically Adjusted Per Tick)
The width of both inner and outer bands is based on ATR (Average True Range), which is recalculated in real time. This means:
During high volatility, the bands expand, allowing for wider price fluctuations.
During low volatility, the bands contract, tightening range expectations.
Unlike fixed-width channels or standard Bollinger Bands (which use standard deviation), this per-tick adjustment via ATR enables Dynamic Ray Bands to reduce false signals in choppy markets and remain more reactive during trending conditions.
⚙️ Inputs
DMA Length — Period for the central DEMA.
ATR Length — Lookback used for ATR volatility calculations.
Outer Band Multiplier — Controls sensitivity of extreme bands.
Inner Band Multiplier — Controls proximity of inner bands.
Show Inner Bands — Toggle for plotting the inner zone.
🔔 Alerts
Alert conditions are included for:
Price closing above/below the outer bands (trend momentum or overextension)
Price closing above/below the inner bands (early signs of strength/weakness)
🧭 Use Cases
Breakout detection — Catch price continuation beyond the outer bands.
Volatility filtering — Adjust trade logic based on band width.
Mean reversion — Monitor for snapbacks toward the DEMA after price stretches too far.
Trend guidance — Use band slope and price position to confirm direction.
⚠️ Disclaimer
This script is intended for educational and informational purposes only. It does not constitute financial advice or a recommendation to trade any specific market or security. Always test indicators thoroughly before using them in live trading.
PRO Investing - ATR Quant.algo by proinvesting.coATR Quant.algo by PROInvesting.co
A powerful and visually intuitive trend-following system designed to capture high-momentum moves and avoid market chop.
Quant.algo combines a dynamic trend-following EMA with multi-level ATR volatility zones to provide a complete trading framework with clear entry signals, stop-loss levels, and take-profit targets.
Key Features:
Dynamic Trend EMA: A thick baseline that turns Green for uptrends and Red for downtrends. Only trade in the direction of the trend.
Multi-Level ATR Zones: Automatically adapting channels that define ideal zones for entries, stops, and profit-taking.
Volatility Filter: A smart filter that tints the background when volatility is expanding, helping you avoid sideways markets and only trade when the market is ready to move.
Pullback Entry Signals: Clear BUY and SELL arrows appear after a pullback to the EMA, providing high-probability entry points.
Simple Trading Rules:
Go LONG: When the baseline is Green, wait for a Green BUY arrow, and aim for the upper TP Zone. Place your stop below the orange Stop Zone line.
Go SHORT: When the baseline is Red, wait for a Red SELL arrow, and aim for the lower TP Zone. Place your stop above the orange Stop Zone line.
Best For:
Traders: Swing Traders & Position Traders.
Timeframes: 4-Hour (H4) and Daily (D1).
Assets: Trending markets (Indices, Forex, Crypto).
Volatility Zones (STDEV %)This indicator calculates and visualizes the relative price volatility of any asset, expressed as a percentage of standard deviation over a rolling window.
🧠 How it works:
- Calculates rolling standard deviation of price (close) as a percentage of the current price.
- Classifies market into three volatility regimes :
• Low Volatility (≤2%) → Blue zone
• Medium Volatility (2–4%) → Orange zone
• High Volatility (>4%) → Red zone
📊 Why it matters:
Volatility structure reflects the underlying regime of the market — ranging, expanding, or trending. This tool helps traders:
- Spot optimal low-risk entry conditions
- Avoid chop zones or highly erratic moves
- Time breakouts or trend initiations
🛠 Usage:
- Works on any timeframe and instrument
- Adjustable lookback period
- Best used alongside trend filters or entry signals (e.g., SuperTrend, EMAs, etc.)
ATR as % of Close (Daily)Sometimes, ATR is more comparable and meaningful when we express it in % rather than dollar. This is a quickly developed version (using ChatGPT), so review it and use it with caution, although the calculation is quite straightforward.
Convergence [by Oberlunar]
The Convergence Indicator by Oberlunar is a multi-timeframe analysis tool that identifies and visualizes trend convergence across up to 10 configurable timeframes using advanced customizable moving averages, including Hull, OberX (a Hull mod), THMA, EMA, and SMA, with an optional pseudo-Hilbert Transform.
It provides a clear visual overlay through gradual fill areas that highlight bullish and bearish trends while offering a fully configurable dynamic table to monitor live trend states across all selected timeframes with user-defined colors and positioning.
This tool is designed for traders who seek to pinpoint multi-timeframe convergence points to enhance their decision-making process in trend-following and breakout strategies.
Oberlunar 👁️⭐
RSI- RSI 8 Level Indicator
- Finally, The Bullish and Bearish 8 Level Power Zone indicator with alerts on each level!
Customize the colors however you like and remember if you need to set alerts you can also do that in the alerts section of the indicator. Just make sure what level the alert is for, and always look out for regular divergence, hidden divergence, and exaggerated divergence using this indicator that goes along with the power zones. :)
- RSI Strategy
Trading Bullish & Bearish Power Zones using regular divergence, hidden divergence, and exaggerated divergence.
P.s.
90, 80, 50, 40 Bullish Power Zones in green
65, 55, 30, 20 Bearish Power Zones in red
Capital Risk OptimizerCapital Risk Optimizer 🛡️
The Capital Risk Optimizer is an educational tool designed to help traders study capital efficiency, risk management, and scaling strategies when using leverage.
This script calculates and visualizes essential metrics for managing leveraged positions, including:
Entry Price – The current market price.
Stop Loss Level – Automatically derived using the 30-bar lowest low minus 1 ATR (default: 14-period ATR), an approach designed to create a dynamic, volatility-adjusted stop loss.
Stop Loss Distance (%) – The percentage distance between entry and stop.
Maximum Safe Leverage – The highest leverage allowable without risking liquidation before your stop is reached.
Margin Required – The amount of collateral necessary to support the desired position size at the calculated leverage.
Position Size – The configurable notional value of your trade.
These outputs are presented in a clean, customizable table overlay so you can quickly understand how position sizing, volatility, and leverage interact.
By default, the script uses a 14-period ATR combined with the lowest low of the past 30 bars, providing an optimal balance between sensitivity and noise for defining stop placement. This methodology helps traders account for market volatility in a systematic way.
The Capital Risk Optimizer is particularly useful as a portfolio management tool, supporting traders who want to study how to scale into positions using risk-adjusted sizing and capital efficiency principles. It pairs best with backtested strategies, and does not directly produce signals of any kind.
How to Use:
Set your desired position size.
Adjust the ATR and lookback settings to fine-tune stop loss placement.
Study the resulting leverage and margin requirements in real time.
Use this information to simulate and visualize potential trade scenarios and capital allocation models.
Disclaimer:
This script is provided for educational and informational purposes only. It does not constitute financial advice and should not be relied upon for live trading decisions. Always do your own research and consult with a qualified professional before making any trading or investment decisions.
K Bands v2.2K Bands v2 - Settings Breakdown (Timeframe Agnostic)
K Bands v2 is an adaptive volatility envelope tool designed for flexibility across different trading
styles and timeframes.
The settings below allow complete control over how the bands are constructed, smoothed, and how
they respond to market volatility.
1. Upstream MA Type
Controls the core smoothing applied to price before calculating the bands.
Options:
- EMA: Fast, responsive, reacts quickly to price changes.
- SMA: Classic moving average, slower but provides stability.
- Hull: Ultra smooth, reduces noise significantly but may react differently to choppy conditions.
- GeoMean: Geometric mean smoothing, creates a unique, slightly smoother line.
- SMMA: Wilder-style smoothing, balances noise reduction and responsiveness.
- WMA: Weighted Moving Average, emphasizes recent price action for sharper responsiveness.
2. Smoothing Length
Lookback period for the upstream moving average.
- Lower values: Faster reaction, captures short-term shifts.
- Higher values: Smoother trend depiction, filters out noise.
3. Multiplier
Determines the width of the bands relative to calculated volatility.
- Lower multiplier: Tighter bands, more signals, but increased false breakouts.
- Higher multiplier: Wider bands, fewer false signals, more conservative.
4. Downstream MA Type
Applies final smoothing to the band plots after initial calculation.
Same options as Upstream MA.
5. Downstream Smoothing Length
Lookback period for downstream smoothing.
- Lower: More responsive bands.
- Higher: Smoother, visually cleaner bands.
6. Band Width Source
Selects the method used to calculate band width based on market volatility.
Options:
- ATR (Average True Range): Smooth, stable bands based on price range expansion.
- Stdev (Standard Deviation): More reactive bands highlighting short-term volatility spikes.
7. ATR Smoothing Type
Controls how the ATR or Stdev value is smoothed before applying to band width.
Options:
- Wilder: Classic, stable smoothing.
- SMA: Simple moving average smoothing.
- EMA: Faster, more reactive smoothing.
- Hull: Ultra-smooth, noise-reducing smoothing.
- GeoMean: Geometric mean smoothing.
8. ATR Length
Lookback period for smoothing the volatility measurement (ATR or Stdev).
- Lower: More reactive bands, captures quick shifts.
- Higher: Smoother, more stable bands.
9. Dynamic Multiplier Based on Volatility
Allows the band multiplier to adapt automatically to changes in market volatility.
- ON: Bands expand during high volatility and contract during low volatility.
- OFF: Bands remain fixed based on the set multiplier.
10. Dynamic Multiplier Sensitivity
Controls how aggressively the dynamic multiplier responds to volatility changes.
- Lower values: Subtle adjustments.
- Higher values: More aggressive band expansion/contraction.
K Bands v2 is designed to be adaptable across any market or timeframe, helping visualize price
structure, trend, and volatility behavior.
HL/OL Histogram + (Close-Open)🧠 Core Concept
This indicator is designed to detect meaningful directional intent in price action using a combination of:
Intrabar candle structure (high - open, open - low)
Net price momentum (close - open)
Timed trigger levels (frozen buy/sell prices based on selected timeframe closes)
The core idea is to visually separate bullish and bearish energy in the current bar, and to mark the price at which momentum flips from down to up or vice versa, based on a change in the close - open differential.
🔍 Components Breakdown
1. Histogram Bars
Green Bars (high - open): Represent bullish upper wicks, showing intrabar strength above the open.
Red Bars (open - low): Represent bearish lower wicks, showing pressure below the open.
Plotted as histograms above and below the zero line.
2. Close–Open Line (White)
Plots the difference between close and open for each bar.
Helps you visually track when momentum flips from negative to positive, or vice versa.
A bold black zero line provides clear reference for these flips.
3. Buy/Sell Signal Logic
A Buy Trigger is generated when close - open crosses above zero
A Sell Trigger occurs when close - open crosses below zero
These trigger events are one-shot, meaning they’re only registered once per signal direction. No retriggers occur until the opposite condition is met.
📈 Trigger Price Table (Static)
On a signal trigger, the close price from a lower timeframe (15S, 30S, 1, 2, 3, or 5 min) is captured.
This price is frozen and displayed in a table at the top-right of the pane.
The price remains fixed until the opposite trigger condition fires, at which point it is replaced.
Why close price?
Using the close from the lower timeframe gives a precise, decisive reference point — ideal for planning limit entries or confirming breakout commitment.
🛠️ Use Cases
Momentum traders can use the histogram and line to time entries after strong open rejection or close breakouts.
Scalpers can quickly gauge intrabar sentiment reversals and react to new momentum without waiting for candle closes.
Algo builders can use the frozen price logic as precise entry or confirmation points in automated strategies.
Asia Session Range Checker//@version=5
indicator("Asia Session Range Checker", overlay=true)
// Define session times in London timezone
asiaStart = timestamp("Europe/London", year(timenow), month(timenow), dayofmonth(timenow), 00, 00)
asiaEnd = timestamp("Europe/London", year(timenow), month(timenow), dayofmonth(timenow), 08, 00)
inAsiaSession = (time >= asiaStart and time <= asiaEnd)
// Variables to track high/low of Asia session
var float asiaHigh = na
var float asiaLow = na
var float asiaRangePercent = na
var bool newDay = false
// Reset daily at the start of a new session
if (not inAsiaSession)
newDay := true
else
if (newDay)
asiaHigh := high
asiaLow := low
newDay := false
else
asiaHigh := math.max(asiaHigh, high)
asiaLow := math.min(asiaLow, low)
// Calculate % range after session ends
if (not inAsiaSession and not na(asiaHigh) and not na(asiaLow))
asiaRangePercent := (asiaHigh - asiaLow) / asiaLow * 100
// Show background for Asian session
bgcolor(inAsiaSession ? color.new(color.blue, 85) : na)
// Plot session high/low
plot(inAsiaSession ? asiaHigh : na, "Asia High", color=color.green, linewidth=1)
plot(inAsiaSession ? asiaLow : na, "Asia Low", color=color.red, linewidth=1)
// Show label with % range when session ends
if (not inAsiaSession and not na(asiaRangePercent) and bar_index % 50 == 0)
label.new(x=bar_index, y=high,
text="Asia Range: " + str.tostring(asiaRangePercent, "#.##") + "%",
style=label.style_label_down,
color=asiaRangePercent > 2 ? color.red : color.green,
textcolor=color.white,
size=size.small)
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.
EVaR Indicator and Position SizingThe Problem:
Financial markets consistently show "fat-tailed" distributions where extreme events occur with higher frequency than predicted by normal distributions (Gaussian or even log-normal). These fat tails manifest in sudden price crashes, volatility spikes, and black swan events that traditional risk measures like volatility can underestimate. Standard deviation and conventional VaR calculations assume normally distributed returns, leaving traders vulnerable to severe drawdowns during market stress.
Cryptocurrencies and volatile instruments display particularly pronounced fat-tailed behavior, with extreme moves occurring 5-10 times more frequently than normal distribution models would predict. This reality demands a more sophisticated approach to risk measurement and position sizing.
The Solution: Entropic Value at Risk (EVAR)
EVaR addresses these limitations by incorporating principles from statistical mechanics and information theory through Tsallis entropy. This advanced approach captures the non-linear dependencies and power-law distributions characteristic of real financial markets.
Entropy is more adaptive than standard deviations and volatility measures.
I was inspired to create this indicator after reading the paper " The End of Mean-Variance? Tsallis Entropy Revolutionises Portfolio Optimisation in Cryptocurrencies " by by Sana Gaied Chortane and Kamel Naoui.
Key advantages of EVAR over traditional risk measures:
Superior tail risk capture: More accurately quantifies the probability of extreme market moves
Adaptability to market regimes: Self-calibrates to changing volatility environments
Non-parametric flexibility: Makes less assumptions about the underlying return distribution
Forward-looking risk assessment: Better anticipates potential market changes (just look at the charts :)
Mathematically, EVAR is defined as:
EVAR_α(X) = inf_{z>0} {z * log(1/α * M_X(1/z))}
Where the moment-generating function is calculated using q-exponentials rather than conventional exponentials, allowing precise modeling of fat-tailed behavior.
Technical Implementation
This indicator implements EVAR through a q-exponential approach from Tsallis statistics:
Returns Calculation: Price returns are calculated over the lookback period
Moment Generating Function: Approximated using q-exponentials to account for fat tails
EVAR Computation: Derived from the MGF and confidence parameter
Normalization: Scaled to for intuitive visualization
Position Sizing: Inversely modulated based on normalized EVAR
The q-parameter controls tail sensitivity—higher values (1.5-2.0) increase the weighting of extreme events in the calculation, making the model more conservative during potentially turbulent conditions.
Indicator Components
1. EVAR Risk Visualization
Dynamic EVAR Plot: Color-coded from red to green normalized risk measurement (0-1)
Risk Thresholds: Reference lines at 0.3, 0.5, and 0.7 delineating risk zones
2. Position Sizing Matrix
Risk Assessment: Current risk level and raw EVAR value
Position Recommendations: Percentage allocation, dollar value, and quantity
Stop Parameters: Mathematically derived stop price with percentage distance
Drawdown Projection: Maximum theoretical loss if stop is triggered
Interpretation and Application
The normalized EVAR reading provides a probabilistic risk assessment:
< 0.3: Low risk environment with minimal tail concerns
0.3-0.5: Moderate risk with standard tail behavior
0.5-0.7: Elevated risk with increased probability of significant moves
> 0.7: High risk environment with substantial tail risk present
Position sizing is automatically calculated using an inverse relationship to EVAR, contracting during high-risk periods and expanding during low-risk conditions. This is a counter-cyclical approach that ensures consistent risk exposure across varying market regimes, especially when the market is hyped or overheated.
Parameter Optimization
For optimal risk assessment across market conditions:
Lookback Period: Determines the historical window for risk calculation
Q Parameter: Controls tail sensitivity (higher values increase conservatism)
Confidence Level: Sets the statistical threshold for risk assessment
For cryptocurrencies and highly volatile instruments, a q-parameter between 1.5-2.0 typically provides the most accurate risk assessment because it helps capturing the fat-tailed behavior characteristic of these markets. You can also increase the q-parameter for more conservative approaches.
Practical Applications
Adaptive Risk Management: Quantify and respond to changing tail risk conditions
Volatility-Normalized Positioning: Maintain consistent exposure across market regimes
Black Swan Detection: Early identification of potential extreme market conditions
Portfolio Construction: Apply consistent risk-based sizing across diverse instruments
This indicator is my own approach to entropy-based risk measures as an alterative to volatility and standard deviations and it helps with fat-tailed markets.
Enjoy!
H BollingerBollinger Bands are a widely used technical analysis indicator that helps spot relative price highs and lows. The tool comprises three lines: a central band representing the 20-period simple moving average (SMA), and upper and lower bands usually placed two standard deviations above and below the SMA. These bands adjust with market volatility, offering insights into price fluctuations and trading conditions.
How this indicator works
Bollinger Bands helps traders assess price volatility and potential price reversals. They consist of three bands: the middle band, the upper band, and the lower band. Here's how Bollinger Bands work:
Middle band: This is typically a simple moving average (SMA) of the asset's price over a specified period. The most common period used is 20 days.
Upper band: This is calculated by adding a specified number of standard deviations to the middle band. The standard deviation measures the asset's price volatility. Commonly, two standard deviations are added to the middle band.
Lower band: Similar to the upper band, it is calculated by subtracting a specified number of standard deviations from the middle band.
What do Bollinger Bands tell you?
Bollinger bands primarily indicate the level of market volatility and trading opportunities. Narrow bands indicate low market volatility, while wide bands suggest high market volatility. Bollinger bands indicators can be used by traders to assess potential buy or sell signals. For instance, a sell signal may be interpreted or generated if the asset’s price moves closer or crosses the upper band, as it may indicate that the asset is overbought. Alternatively, a buy signal may be interpreted or generated if the price moves closer to the lower band, as it may signify that the asset is oversold.
However, traders should be cautious when using Bollinger Bands as standalone indicators when making trading decisions. Experienced traders refrain from confirming signals based on one indicator. Instead, they generally combine various technical indicators and fundamental analysis methods to make informed trading decisions. Basing trading decisions on only one indicator can result in misinterpretation of signals and heavy losses.
Bollinger Bands assist in identifying whether prices are relatively high or low. They are applied as a pair—upper and lower bands—alongside a moving average. However, these bands are not designed to be used in isolation. Instead, they should be used to validate signals generated by other technical indicators.
Calculation of Bollinger Band
Fear and Greed Index [DunesIsland]The Fear and Greed Index is a sentiment indicator designed to measure the emotions driving the stock market, specifically investor fear and greed. Fear represents pessimism and caution, while greed reflects optimism and risk-taking. This indicator aggregates multiple market metrics to provide a comprehensive view of market sentiment, helping traders and investors gauge whether the market is overly fearful or excessively greedy.How It WorksThe Fear and Greed Index is calculated using four key market indicators, each capturing a different aspect of market sentiment:
Market Momentum (30% weight)
Measures how the S&P 500 (SPX) is performing relative to its 125-day simple moving average (SMA).
A higher value indicates that the market is trading well above its moving average, signaling greed.
Stock Price Strength (20% weight)
Calculates the net number of stocks hitting 52-week highs minus those hitting 52-week lows on the NYSE.
A greater number of net highs suggests strong market breadth and greed.
Put/Call Options (30% weight)
Uses the 5-day average of the put/call ratio.
A lower ratio (more call options being bought) indicates greed, as investors are betting on rising prices.
Market Volatility (20% weight)
Utilizes the VIX index, which measures market volatility.
Lower volatility is associated with greed, as investors are less fearful of large market swings.
Each component is normalized using a z-score over a 252-day lookback period (approximately one trading year) and scaled to a range of 0 to 100. The final Fear and Greed Index is a weighted average of these four components, with the weights specified above.Key FeaturesIndex Range: The index value ranges from 0 to 100:
0–25: Extreme Fear (red)
25–50: Fear (orange)
50–75: Neutral (yellow)
75–100: Greed (green)
Dynamic Plot Color: The plot line changes color based on the index value, visually indicating the current sentiment zone.
Reference Lines: Horizontal lines are plotted at 0, 25, 50, 75, and 100 to represent the different sentiment levels: Extreme Fear, Fear, Neutral, Greed, and Extreme Greed.
How to Interpret
Low Values (0–25): Indicate extreme fear, which may suggest that the market is oversold and could be due for a rebound.
High Values (75–100): Indicate greed, which may signal that the market is overbought and could be at risk of a correction.
Neutral Range (25–75): Suggests a balanced market sentiment, neither overly fearful nor greedy.
This indicator is a valuable tool for contrarian investors, as extreme readings often precede market reversals. However, it should be used in conjunction with other technical and fundamental analysis tools for a well-rounded view of the market.
Institutional Momentum Scanner [IMS]Institutional Momentum Scanner - Professional Momentum Detection System
Hunt explosive price movements like the professionals. IMS identifies maximum momentum displacement within 10-bar windows, revealing where institutional money commits to directional moves.
KEY FEATURES:
▪ Scans for strongest momentum in rolling 10-bar windows (institutional accumulation period)
▪ Adaptive filtering reduces false signals using efficiency ratio technology
▪ Three clear states: LONG (green), SHORT (red), WAIT (gray)
▪ Dynamic volatility-adjusted thresholds (8% ATR-scaled)
▪ Visual momentum flow with glow effects for signal strength
BASED ON:
- Pocket Pivot concept (O'Neil/Morales) applied to price momentum
- Adaptive Moving Average principles (Kaufman KAMA)
- Market Wizards momentum philosophy
- Institutional order flow patterns (5-day verification window)
HOW IT WORKS:
The scanner finds the maximum price displacement in each 10-bar window - where the market showed its hand. An adaptive filter (5-bar regression) separates real moves from noise. When momentum exceeds the volatility-adjusted threshold, states change.
IDEAL FOR:
- Momentum traders seeking explosive moves
- Swing traders (especially 4H timeframe)
- Position traders wanting institutional footprints
- Anyone tired of false breakout signals
Default parameters (10,5) optimized for 4H charts but adaptable to any timeframe. Remember: The market rewards patience and punishes heroes. Wait for clear signals.
"The market is honest. Are you?"