Smart Directional Fib Zone (Selectable Session)🎯 Overview
This indicator plots a dynamic Fibonacci zone between the 0.5 and 0.618 levels , calculated from the previous day’s price action , and is designed specifically for intraday traders.
It visually highlights key retracement or reaction areas where the market often pauses or reverses.
🔍 How it works
At the start of each day, the script automatically captures:
the previous day’s open (pdo),
high (pdh),
low (pdl),
and close (pdc).
It then determines if the previous day was bullish (Close > Open) or bearish (Close < Open).
Based on that:
If the previous day was bullish, it projects the Fibonacci levels down from the high (typical for expecting retracements).
If bearish, it projects them up from the low.
The two key levels are:
0.5 (50%) retracement / projection
0.618 (61.8%) retracement / projection
A colored zone is plotted between these levels to act as a leading guide for intraday setups.
⏰ Time filtering & session customization
A unique feature is the dynamic session filtering:
By default, the zone is only plotted during active market hours, keeping your chart clean outside trading hours.
The script provides a dropdown selector so you can quickly switch between:
India session (9:15 to 15:30)
Europe session (9:00 to 17:30)
US session (9:30 to 16:00)
Or even define your own custom session times.
This makes it ideal for intraday traders in any region.
🎨 Visual features
The fill zone changes color based on the previous day’s sentiment:
Green zone if the previous day was bullish
Red zone if the previous day was bearish
🚨 Alerts
The script includes an alert condition, so you can easily set up TradingView alerts to notify you when:
Price enters the Fibonacci zone.
This is extremely helpful for catching retracements or reversals without staring at the screen all day.
⚙️ How to use
✅ Works on any intraday timeframe (1 min, 5 min, 15 min, etc.).
✅ Simply add it to your chart, pick your session in the dropdown, and watch the Fibonacci zone automatically adjust to your selected market hours.
Use it as a confluence tool alongside other indicators like VWAP, EMAs, Bollinger Bands, or price action patterns to time entries and exits.
💪 Why this is powerful
This is more than a simple Fib retracement tool:
It dynamically adapts to the previous day’s sentiment, helping you trade in alignment with recent market psychology.
The session filtering ensures your charts are focused only on the periods
Forecasting
DAX Setup ScreenerPine Script – Setup Screener
This code detects:
Range trading zone
Breakout long & breakdown short signals
With visual overlay
Use it like this:
Adjust rangeHigh, rangeLow, and breakoutBuffer
Enabled: Draws signals on the live chart
Unicorn Trade Indicator - EnhancedThis script displays breaker blocks and if the correct conditions are met it will indicate a unicorn entry with a yellow diamond.
Users need to experiment with setting the swing length option, I found 2 or 3 to work best.
I decided to build this indicator as I could not find an open source one that worked adequately
Enjoy
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
HSHS Volume Divergence MTF v6 (Final Fix)HSHS Volume Divergence MTF v6
Zmienność
Dywergencja
Momentum
RSI
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
Moving Average Exponential//@version=5
indicator("ETH Scalping Strategy", overlay=true)
// Define the short-term and medium-term EMAs
ema9 = ta.ema(close, 9)
ema21 = ta.ema(close, 21)
// Define RSI
rsi = ta.rsi(close, 14)
// Define Buy and Sell conditions
buyCondition = ta.crossover(ema9, ema21) and rsi > 50
sellCondition = ta.crossunder(ema9, ema21) and rsi < 50
// Plot the EMAs on the chart
plot(ema9, color=color.green, title="EMA 9", linewidth=2)
plot(ema21, color=color.red, title="EMA 21", linewidth=2)
// Plot buy/sell signals as arrows on the chart
plotshape(series=buyCondition, location=location.belowbar, color=color.green, style=shape.labelup, title="Buy Signal", text="BUY")
plotshape(series=sellCondition, location=location.abovebar, color=color.red, style=shape.labeldown, title="Sell Signal", text="SELL")
// Generate alerts based on buy/sell conditions
alertcondition(buyCondition, title="Buy Signal", message="ETH Buy Signal: EMA9 crossed above EMA21 and RSI > 50")
alertcondition(sellCondition, title="Sell Signal", message="ETH Sell Signal: EMA9 crossed below EMA21 and RSI < 50")
Position Size Calculator with Fees# Position Size Calculator with Portfolio Management - Manual
## Overview
The Position Size Calculator with Portfolio Management is an advanced Pine Script indicator designed to help traders calculate optimal position sizes based on their total portfolio value and risk management strategy. This tool automatically calculates your risk amount based on portfolio allocation percentages and determines the exact position size needed while accounting for trading fees.
## Key Features
- **Portfolio-Based Risk Management**: Calculates risk based on total portfolio value
- **Tiered Risk Allocation**: Separates trading allocation from total portfolio
- **Automatic Trade Direction Detection**: Determines long/short based on entry vs stop loss
- **Fee Integration**: Accounts for trading fees in position size calculations
- **Risk Factor Adjustment**: Allows scaling of position size up or down
- **Visual Display**: Shows all calculations in a clear, color-coded table
- **Automatic Risk Calculation**: No need to manually input risk amount
## Input Parameters
### Total Portfolio ($)
- **Purpose**: The total value of your investment portfolio
- **Default**: 0.0
- **Range**: Any positive value
- **Step**: 0.01
- **Example**: If your total portfolio is worth $100,000, enter 100000
### Trading Portfolio Allocation (%)
- **Purpose**: The percentage of your total portfolio allocated to active trading
- **Default**: 20.0%
- **Range**: 0.0% to 100.0%
- **Step**: 0.01
- **Example**: If you allocate 20% of your portfolio to trading, enter 20
### Risk from Trading (%)
- **Purpose**: The percentage of your trading allocation you're willing to risk per trade
- **Default**: 0.1%
- **Range**: Any positive value
- **Step**: 0.01
- **Example**: If you risk 0.1% of your trading allocation per trade, enter 0.1
### Entry Price ($)
- **Purpose**: The price at which you plan to enter the trade
- **Default**: 0.0
- **Range**: Any positive value
- **Step**: 0.01
### Stop Loss ($)
- **Purpose**: The price at which you will exit if the trade goes against you
- **Default**: 0.0
- **Range**: Any positive value
- **Step**: 0.01
### Risk Factor
- **Purpose**: A multiplier to scale your position size up or down
- **Default**: 1.0 (no scaling)
- **Range**: 0.0 to 10.0
- **Step**: 0.1
- **Examples**:
- 1.0 = Normal position size
- 2.0 = Double the position size
- 0.5 = Half the position size
### Fee (%)
- **Purpose**: The percentage fee charged per transaction
- **Default**: 0.01% (0.01)
- **Range**: 0.0% to 1.0%
- **Step**: 0.001
## How Risk Amount is Calculated
The script automatically calculates your risk amount using this formula:
```
Risk Amount = Total Portfolio × Trading Allocation (%) × Risk % ÷ 10,000
```
### Example Calculation:
- Total Portfolio: $100,000
- Trading Allocation: 20%
- Risk per Trade: 0.1%
**Risk Amount = $100,000 × 20 × 0.1 ÷ 10,000 = $20**
This means you would risk $20 per trade, which is 0.1% of your $20,000 trading allocation.
## Portfolio Structure Example
Let's say you have a $100,000 portfolio:
### Allocation Structure:
- **Total Portfolio**: $100,000
- **Trading Allocation (20%)**: $20,000
- **Long-term Investments (80%)**: $80,000
### Risk Management:
- **Risk per Trade (0.1% of trading)**: $20
- **Maximum trades at risk**: Could theoretically have 1,000 trades before risking entire trading allocation
## How Position Size is Calculated
### Trade Direction Detection
- **Long Trade**: Entry price > Stop loss price
- **Short Trade**: Entry price < Stop loss price
### Position Size Formulas
#### For Long Trades:
```
Position Size = -Risk Factor × Risk Amount / (Stop Loss × (1 - Fee) - Entry Price × (1 + Fee))
```
#### For Short Trades:
```
Position Size = -Risk Factor × Risk Amount / (Entry Price × (1 - Fee) - Stop Loss × (1 + Fee))
```
## Output Display
The indicator displays a comprehensive table with color-coded sections:
### Portfolio Information (Light Blue Background)
- **Portfolio (USD)**: Your total portfolio value
- **Trading Portfolio Allocation (%)**: Percentage allocated to trading
- **Risk as % of Trading**: Risk percentage per trade
### Trade Setup (Gray Background)
- **Entry Price**: Your specified entry price
- **Stop Loss**: Your specified stop loss price
- **Fee (%)**: Trading fee percentage
- **Risk Factor**: Position size multiplier
### Risk Analysis (Red Background)
- **Risk Amount**: Automatically calculated dollar risk
- **Effective Entry**: Actual entry cost including fees
- **Effective Exit**: Actual exit value including fees
- **Expected Loss**: Calculated loss if stop loss is hit
- **Deviation from Risk %**: Accuracy of risk calculation
### Final Result (Blue Background)
- **Position Size**: Number of shares/units to trade
## Usage Examples
### Example 1: Conservative Long Trade
- **Total Portfolio**: $50,000
- **Trading Allocation**: 15%
- **Risk per Trade**: 0.05%
- **Entry Price**: $25.00
- **Stop Loss**: $24.00
- **Risk Factor**: 1.0
- **Fee**: 0.01%
**Calculated Risk Amount**: $50,000 × 15% × 0.05% ÷ 100 = $3.75
### Example 2: Aggressive Short Trade
- **Total Portfolio**: $200,000
- **Trading Allocation**: 30%
- **Risk per Trade**: 0.2%
- **Entry Price**: $150.00
- **Stop Loss**: $155.00
- **Risk Factor**: 2.0
- **Fee**: 0.01%
**Calculated Risk Amount**: $200,000 × 30% × 0.2% ÷ 100 = $120
**Actual Risk**: $120 × 2.0 = $240 (due to risk factor)
## Color Coding System
- **Green/Red Header**: Trade direction (Long/Short)
- **Light Blue**: Portfolio management parameters
- **Gray**: Trade setup parameters
- **Red**: Risk-related calculations and results
- **Blue**: Final position size result
## Best Practices
### Portfolio Management
1. **Keep trading allocation reasonable** (typically 10-30% of total portfolio)
2. **Use conservative risk percentages** (0.05-0.2% per trade)
3. **Don't risk more than you can afford to lose**
### Risk Management
1. **Start with small risk factors** (1.0 or less) until comfortable
2. **Monitor your total exposure** across all open positions
3. **Adjust risk based on market conditions**
### Trade Execution
1. **Always validate calculations** before placing trades
2. **Account for slippage** in volatile markets
3. **Consider position size relative to liquidity**
## Risk Management Guidelines
### Conservative Approach
- Trading Allocation: 10-20%
- Risk per Trade: 0.05-0.1%
- Risk Factor: 0.5-1.0
### Moderate Approach
- Trading Allocation: 20-30%
- Risk per Trade: 0.1-0.15%
- Risk Factor: 1.0-1.5
### Aggressive Approach
- Trading Allocation: 30-40%
- Risk per Trade: 0.15-0.25%
- Risk Factor: 1.5-2.0
## Troubleshooting
### Common Issues
1. **Position Size shows 0**
- Verify all portfolio inputs are greater than 0
- Check that entry price differs from stop loss
- Ensure calculated risk amount is positive
2. **Very small position sizes**
- Increase risk percentage or risk factor
- Check if your risk amount is too small for the price difference
3. **Large risk deviation**
- Normal for very small positions
- Consider adjusting entry/stop loss levels
### Validation Checklist
- Total portfolio value is realistic
- Trading allocation percentage makes sense
- Risk percentage is conservative
- Entry and stop loss prices are valid
- Trade direction matches your intention
## Advanced Features
### Risk Factor Usage
- **Scaling up**: Use risk factors > 1.0 for high-confidence trades
- **Scaling down**: Use risk factors < 1.0 for uncertain trades
- **Never exceed**: Risk factors that would risk more than your comfort level
### Multiple Timeframe Analysis
- Use different risk factors for different timeframes
- Consider correlation between positions
- Adjust trading allocation based on market conditions
## Disclaimer
This tool is for educational and planning purposes only. Always verify calculations manually and consider market conditions, liquidity, and correlation between positions. The automated risk calculation assumes you're comfortable with the mathematical relationship between portfolio allocation and individual trade risk. Past performance doesn't guarantee future results, and all trading involves risk of loss.
Easy Position Size Calculator with Fees# Easy Position Size Calculator with Fees - Manual
## Overview
The Easy Position Size Calculator is a Pine Script indicator designed to help traders calculate the optimal position size for their trades while accounting for trading fees. This tool automatically determines whether you're planning a long or short position and calculates the exact position size needed to risk a specific dollar amount.
## Key Features
- **Automatic Trade Direction Detection**: Determines if you're going long or short based on entry price vs stop loss
- **Fee Integration**: Accounts for trading fees in position size calculations
- **Risk Management**: Calculates position size based on your specified risk amount
- **Risk Factor Adjustment**: Allows you to scale your position size up or down
- **Visual Display**: Shows all calculations in a clear, organized table
## Input Parameters
### Entry Price ($)
- **Purpose**: The price at which you plan to enter the trade
- **Default**: 0.0
- **Range**: Any positive value
- **Step**: 0.01
### Stop Loss ($)
- **Purpose**: The price at which you will exit the trade if it goes against you
- **Default**: 0.0
- **Range**: Any positive value
- **Step**: 0.01
### Risk ($)
- **Purpose**: The maximum dollar amount you're willing to lose on this trade
- **Default**: 0.0
- **Range**: Any positive value
- **Step**: 0.01
### Risk Factor
- **Purpose**: A multiplier to scale your position size up or down
- **Default**: 1.0 (no scaling)
- **Range**: 0.0 to 10.0
- **Step**: 0.1
- **Examples**:
- 1.0 = Normal position size
- 2.0 = Double the position size
- 0.5 = Half the position size
### Fee (%)
- **Purpose**: The percentage fee charged per transaction (buy/sell)
- **Default**: 0.01% (0.01)
- **Range**: 0.0% to 1.0%
- **Step**: 0.001
## How It Works
### Trade Direction Detection
The script automatically determines your trade direction:
- **Long Trade**: Entry price > Stop loss price
- **Short Trade**: Entry price < Stop loss price
### Position Size Calculation
#### For Long Trades:
```
Position Size = -Risk Factor × Risk Amount / (Stop Loss × (1 - Fee) - Entry Price × (1 + Fee))
```
#### For Short Trades:
```
Position Size = -Risk Factor × Risk Amount / (Entry Price × (1 - Fee) - Stop Loss × (1 + Fee))
```
### Fee Adjustment
The script accounts for fees on both entry and exit:
- **Long trades**: You pay fees when buying (entry) and selling (exit)
- **Short trades**: You pay fees when shorting (entry) and covering (exit)
## Output Display
The indicator displays a table with the following information:
### Trade Information
- **Trade Type**: Shows whether it's a LONG, SHORT, or INVALID trade
- **Entry Price**: Your specified entry price
- **Stop Loss**: Your specified stop loss price
- **Fee (%)**: The fee percentage being used
### Risk Parameters
- **Risk Amount**: The dollar amount you're willing to risk
- **Risk Factor**: The multiplier being applied
### Calculated Values
- **Effective Entry**: The actual cost per share including fees
- **Effective Exit**: The actual exit value per share including fees
- **Expected Loss**: The calculated loss if stop loss is hit
- **Deviation from Risk %**: Shows how close the expected loss is to your target risk
- **Position Size**: The number of shares/units to trade
## Usage Examples
### Example 1: Long Trade
- Entry Price: $100.00
- Stop Loss: $95.00
- Risk Amount: $500.00
- Risk Factor: 1.0
- Fee: 0.01%
**Result**: The script will calculate how many shares to buy so that if the stop loss is hit, you lose approximately $500 (accounting for fees). Position Size: 99.61152
### Example 2: Short Trade
- Entry Price: $50.00
- Stop Loss: $55.00
- Risk Amount: $300.00
- Risk Factor: 1.0
- Fee: 0.01%
**Result**: The script will calculate how many shares to short so that if the stop loss is hit, you lose approximately $300 (accounting for fees). Position Size: 59.87426
## Important Notes
### Validation Requirements
For the script to work properly, all of the following must be true:
- Entry price > 0
- Stop loss > 0
- Risk amount > 0
- Entry price ≠ Stop loss (to determine direction)
### Negative Position Sizes
The script may show negative position sizes, which is normal:
- **Negative values for long trades**: Represents shares to buy
- **Negative values for short trades**: Represents shares to short
### Risk Deviation
The "Deviation from Risk %" shows how closely the calculated position size matches your target risk. Small deviations are normal due to:
- Fee calculations
- Rounding
- Market precision
## Color Coding
The table uses color coding for easy identification:
- **Green**: Long trade information
- **Red**: Short trade information
- **Gray**: Invalid trade (when inputs are incorrect)
- **Blue**: Final position size
- **Red background**: Risk-related calculations
## Troubleshooting
### Common Issues
1. **Position Size shows 0**
- Check that all inputs are greater than 0
- Ensure entry price is different from stop loss
2. **Trade Type shows INVALID**
- Verify that entry price and stop loss are both positive
- Make sure entry price ≠ stop loss
3. **Large Risk Deviation**
- This is normal for very small position sizes
- Consider adjusting your risk amount or price levels
## Best Practices
1. **Always validate your inputs** before placing actual trades
2. **Double-check the trade direction** shown in the table
3. **Review the expected loss** to ensure it aligns with your risk management
4. **Consider the effective entry/exit prices** which include fees
5. **Use appropriate risk factors** - avoid extreme values that could lead to overexposure
## Disclaimer
This tool is for educational and planning purposes only. Always verify calculations manually and consider market conditions, liquidity, and other factors before placing actual trades. The script assumes that fees are charged on both entry and exit transactions.
Second Pullback Finderlion pull back rocks, by using a familiar trend trading strategy, i have enhance a little more to this. correct positioning of market structure will help make these signals come alive
Dynamic Gap Probability ToolDynamic Gap Probability Tool measures the percentage gap between price and a chosen moving average, then analyzes your chart history to estimate the likelihood of the next candle moving up or down. It dynamically adjusts its sample size to ensure statistical robustness while focusing on the exact deviation level.
Originality and Value:
• Combines gap-based analysis with dynamic sample aggregation to balance precision and reliability.
• Automatically extends the sample when exact matches are scarce, avoiding misleading signals on rare extreme moves.
• Provides real “next-candle” probabilities based on historical occurrences rather than fixed thresholds or untested heuristics.
• Adds value by giving traders an evidence-based edge: you see how similar past deviations actually played out.
How It Works:
1. Calculate gap = (close – moving average) / moving average * 100.
2. Round the absolute gap to nearest percent (X%).
3. Count historical bars where gap ≥ X% above or ≤ –X% below.
4. If exact X% count is below the minimum occurrences threshold, include gaps at X+1%, X+2%, etc., until threshold is reached.
5. Compute “next-candle” green vs. red probabilities from the aggregated sample.
6. Display current gap, sample size, green probability, and red probability in a table.
Inputs:
• Moving Average Type (SMA, EMA, WMA, VWMA, HMA, SMMA, TMA)
• Moving Average Period (default 200)
• Minimum Occurrences Threshold (default 50)
• Table position and styling options
Examples:
• If price is 3% above the 200-period SMA and 120 occurrences ≥3% are found, with 84 green next candles (70%) and 36 red (30%), the script displays “3% | 120 | 70% green | 30% red.”
• If price is 8% below the SMA but only 20 exact matches exist, the script will include 9% and 10% gaps until it reaches 50 samples, then calculate probabilities from that broader set.
Why It’s Useful:
• Mean-reversion traders see green-probability signals at extreme overbought or oversold levels.
• Trend-followers identify continuation likelihood when red probability is high.
• Risk managers gauge reliability by inspecting sample size before acting on any signal.
Limitations:
• Historical probabilities do not guarantee future performance.
• Results depend on timeframe and symbol, backtest with your data before trading.
• Use realistic slippage and commission when overlaying on strategy scripts.
liq depth fvg/bprA script that draws liquidity depth boxes from the 9.30-10.00 am range which can prove decent areas to look for a reversal. It also draws in fvg and bpr levels which can help add confluence to a trade ideas. The 9.30 to 10.00 am range is highlighted by blue lines to assist in opening range trades as described by Casper SMC.
FULLY FUNCTIONAL INDICATOR TESTER🎯 Purpose:
A comprehensive strategy testing framework designed to evaluate custom indicators and trading signals with professional-grade risk management and signal detection capabilities.
✨ Key Features:
Multiple Signal Detection Methods - Value changes, crossovers, threshold-based triggers
Advanced Confluence Filtering - Multi-source confirmation system with lookback periods
Professional Risk Management - Static TP/SL, break-even functionality, position sizing
Custom Exit Signals - Independent exit logic for refined strategy testing
Visual Feedback System - Clear signal plots and real-time status monitoring
Flexible Input Sources - Connect any custom indicator or built-in study
🔧 How to Use:
Connect your indicator outputs to the Entry/Exit source inputs
Select appropriate signal detection method for your indicator type
Configure risk parameters (TP/SL/Break-even)
Enable confluence filters if needed for additional confirmation
Backtest and analyze results with built-in performance metrics
📈 Signal Detection Options:
Value Change: Detects when indicator values change
Crossover Above/Below: Traditional crossover signals
Threshold Triggers: Value-based entry/exit levels
⚙️ Technical Specifications:
Compatible with Pine Script v6
Overlay strategy with position tracking
Real-time performance monitoring table
Configurable margin requirements
Full backtesting compatibility
⚠️ Important Notes:
This is a testing framework - not financial advice
Always validate signals in demo environment first
Past performance does not guarantee future results
Use proper risk management in live trading
🔄 Updates:
Enhanced signal detection algorithms
Improved confluence logic
Added break-even functionality
Visual debugging tools
Perfect for traders and developers looking to systematically tes
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!
Enhanced Gann Time-Price SquaresEnhanced Gann Time-Price Squares Indicator
A comprehensive Pine Script indicator that identifies and visualizes W.D. Gann's time-price square formations on your charts. This tool helps traders spot potential market turning points where time and price movements align according to Gann's legendary market theories.
Key Features:
Automatic Square Detection - Identifies completed squares where price movement equals time movement
Future Projections - Shows forming squares with projected completion points
Pivot Integration - Automatically detects pivot highs/lows as square starting points
Visual Clarity - Clean box outlines with customizable colors and styles
Smart Filtering - Prevents overlapping squares and includes minimum move thresholds
Real-time Status - Information table showing current square formations
How to Use:
The indicator draws boxes when price moves from pivot points equal the time elapsed (number of bars). Green squares indicate upward movements, red squares show downward movements. Dashed lines show forming squares, while dotted lines project where they might complete.
Settings:
Adjust pivot sensitivity and minimum price moves
Customize tolerance for time-price matching
Toggle projections, labels, and visual elements
Fine-tune colors and line styles
Perfect for Gann theory practitioners and traders looking for time-based market analysis. The squares often coincide with significant support/resistance levels and potential reversal points.
Compatible with all timeframes and instruments.
More updates to follow
EMA Shadow Trading_TixThis TradingView indicator, named "EMA Shadow Trading_Tix", combines Exponential Moving Averages (EMAs) with VWAP (Volume-Weighted Average Price) and a shadow fill between EMAs to help traders identify trends, momentum, and potential reversal zones. Below is a breakdown of its key functions:
1. EMA (Exponential Moving Average) Settings
The indicator allows customization of four EMAs with different lengths and colors:
EMA 1 (Default: 9, Green) – Short-term trend filter.
EMA 2 (Default: 21, Red) – Medium-term trend filter.
EMA 3 (Default: 50, Blue) – Mid-to-long-term trend filter.
EMA 4 (Default: 200, Orange) – Long-term trend filter (often used as a "bull/bear market" indicator).
Key Features:
Global EMA Source: All EMAs use the same source (default: close), ensuring consistency.
Toggle Visibility: Each EMA can be independently shown/hidden.
Precision Calculation: EMAs are rounded to the minimum tick size for accuracy.
Customizable Colors & Widths: Helps in distinguishing different EMAs easily.
How Traders Use EMAs:
Trend Identification:
If price is above all EMAs, the trend is bullish.
If price is below all EMAs, the trend is bearish.
Crossovers:
A shorter EMA crossing above a longer EMA (e.g., EMA 9 > EMA 21) suggests bullish momentum.
A shorter EMA crossing below a longer EMA (e.g., EMA 9 < EMA 21) suggests bearish momentum.
Dynamic Support/Resistance:
EMAs often act as support in uptrends and resistance in downtrends.
2. Shadow Fill Between EMA 1 & EMA 2
The indicator includes a colored fill (shadow) between EMA 1 (9-period) and EMA 2 (21-period) to enhance trend visualization.
How It Works:
Bullish Shadow (Green): Applies when EMA 1 > EMA 2, indicating a bullish trend.
Bearish Shadow (Red): Applies when EMA 1 < EMA 2, indicating a bearish trend.
Why It’s Useful:
Trend Confirmation: The shadow helps traders quickly assess whether the short-term trend is bullish or bearish.
Visual Clarity: The fill makes it easier to spot EMA crossovers and trend shifts.
3. VWAP (Volume-Weighted Average Price) Integration
The indicator includes an optional VWAP overlay, which is useful for intraday traders.
Key Features:
Customizable Anchor Periods: Options include Session, Week, Month, Quarter, Year, Decade, Century, Earnings, Dividends, Splits.
Hide on Higher Timeframes: Can be disabled on 1D or higher charts to avoid clutter.
Adjustable Color & Width: Default is purple, but users can change it.
How Traders Use VWAP:
Mean Reversion: Price tends to revert to VWAP.
Trend Confirmation:
Price above VWAP = Bullish bias.
Price below VWAP = Bearish bias.
Breakout/Rejection Signals: Strong moves away from VWAP may indicate continuation or exhaustion.
4. Practical Trading Applications
Trend-Following Strategy:
Long Entry: Price above all EMAs + EMA 1 > EMA 2 (green shadow). Optional: Price above VWAP for intraday trades.
Short Entry: Price below all EMAs + EMA 1 < EMA 2 (red shadow). Optional: Price below VWAP for intraday trades.
Mean Reversion Strategy:
Pullback to EMA 9/21/VWAP: Look for bounces near EMAs or VWAP in a strong trend.
Multi-Timeframe Confirmation:
Higher timeframe EMAs (50, 200) can be used to filter trades (e.g., only trade longs if price is above EMA 200).
Conclusion
This EMA Shadow Trading Indicator is a versatile tool that combines:
✔ Multiple EMAs for trend analysis
✔ Shadow fill for quick trend visualization
✔ VWAP integration for intraday trading
It is useful for swing traders, day traders, and investors looking for trend confirmation, momentum shifts, and dynamic support/resistance levels.
200 EMA Power Bounce Screenerthis indicator work on bullish reversal strategy. when stock is abov 200 ema and touch 200 ema for reversal. it will confirm that there is a revesal candle, stron support on 200 ema, primary trend is strong than secondary trand, have a strong volume, rsi cross 50 in upperside.
VEP - Volume Explosion Predictor💥 VEP - Volume Explosion Predictor
General Overview
The Volume Explosion Predictor (VEP) is an advanced indicator that analyzes volume peaks to predict when the next volume explosion might occur. Using statistical analysis on historical patterns, it provides accurate probabilities on moments of greater trading activity.
MAIN FEATURES
🎯 Intelligent volume peak detection
Automatically identifies significant volume peaks
Anti-consecutive filter to avoid redundant signals
Customizable threshold for detection sensitivity
📊 Advanced statistical analysis
Calculates the average distance between volume peaks
Monitors the number of sessions without peaks
Tracks the maximum historical range without activity
🔮 Predictive system
Dynamic probability: Calculates the probability of an imminent peak
Visual indicators: Background colors that change based on probability
Time forecasts: Estimates remaining sessions to the next peak
📈 Visual signals
Colored arrows: Green for bullish peaks, red for bearish peaks
Statistics table: Complete real-time overview
ALERT SYSTEM
🚨 Three Alert Levels
New Valid Volume Peak: New peak detected
Approaching Prediction: Increasing probability
High Peak Probability: High probability of explosion
HOW TO USE IT
📋 Recommended setup
Timeframe : Works on all timeframes but daily, weekly or monthly timeframe usage is recommended. In any case, it should always be used consistently with your time horizon
Markets : Stocks, crypto, forex, commodities
Threshold for volume peak realization : It's recommended to start with 2.0x (i.e., twice the volume average) for normal markets, 1.5x for more volatile markets. This parameter can be set in the settings as desired
🎨 Visual interpretation
Green Arrows : Peak during bullish candle
Red Arrows : Peak during bearish candle
Red Background : High probability (>90%) of new peak
Yellow Background : Medium probability (50-70%)
📊 STATISTICS TABLE
The table shows:
Total peaks analyzed
Average distance between peaks
Current sessions without peaks
Forecast remaining sessions
Percentage probability
Volume threshold needed for peak realization
STRATEGIC ADVANTAGES
🎯 For Day Traders
Anticipates moments of greater volatility for analysis, supporting the evaluation of trading setups and providing context on low volume periods
📈 For Swing Traders
Identifies high-probability volume patterns, supporting breakout analysis with volume and improving understanding of market timing
🔍 For Technical Analysts
Understands the stock's volume patterns.
Helps evaluate the historical market interest and supports quantitative research and analysis
OTHER THINGS TO KNOW...
A) Anti-Consecutive Algorithm : allows to avoid multiple and consecutive volume signals and peaks at close range
B) Statistical Validation : Uses standard deviation for accuracy
C) Memory Management : Limits historical data for optimal performance
D) Compatibility : Works with all TradingView chart types
⚠️ IMPORTANT DISCLAIMER
This indicator is exclusively a technical analysis tool for studying volume patterns. It does not provide investment advice, trading signals or entry/exit points. All trading decisions are at the complete discretion and responsibility of the user. Always use in combination with other technical and fundamental analysis and proper risk management.
DESCRIZIONE IN ITALIANO
💥 VEP - Volume Explosion Predictor
Panoramica Generale
Il Volume Explosion Predictor (VEP) è un indicatore avanzato che analizza i picchi di volume per prevedere quando potrebbe verificarsi la prossima esplosione di volume. Utilizzando analisi statistiche sui pattern storici, fornisce probabilità accurate sui momenti di maggiore attività di trading.
CARATTERISTICHE PRINCIPALI
🎯 Rilevamento intelligente dei picchi di volume
- Identifica automaticamente i picchi di volume significativi
- Filtro anti-consecutivo per evitare segnali ridondanti
- Soglia personalizzabile per la sensibilità del rilevamento
📊 Analisi statistica avanzata
Calcola la distanza media tra i picchi di volume
Monitora il numero di sessioni senza picchi
Traccia il range massimo storico senza attività
🔮 Sistema predittivo
Probabilità dinamica: Calcola la probabilità di un imminente picco
Indicatori visivi: Colori di sfondo che cambiano in base alla probabilità
Previsioni temporali: Stima delle sessioni rimanenti al prossimo picco
📈 Segnali visivi
1) Frecce colorate: Verdi per picchi rialzisti, rosse per ribassisti
2) Tabella statistiche: Panoramica completa in tempo reale
SISTEMA DI ALERT
🚨 Tre Livelli di Alert
1) New Valid Volume Peak: Nuovo picco rilevato
2) Approaching Prediction: Probabilità in aumento
3) High Peak Probability: Alta probabilità di esplosione
COME UTILIZZARLO
📋 Setup consigliato
- Timeframe : Funziona su tutti i timeframe ma è consigliabile un utilizzo su timeframe giornaliero, settimanale o mensile. In ogni caso va sempre utilizzato coerentemente con il proprio orizzonte temporale
- Mercati : Azioni, crypto, forex, commodities
- Limite affinché si realizzi il picco di volumi : Si consiglia di iniziare con 2.0x (ovvero due volte la media dei volumi) per mercati normali, 1.5x per mercati più volatili. Questo parametro può essere settato nelle impostazioni a proprio piacimento
🎨 Interpretazione visuale
Frecce Verdi : Picco durante candela rialzista
Frecce Rosse : Picco durante candela ribassista
Sfondo Rosso : Alta probabilità (>90%) di nuovo picco
Sfondo Giallo : Probabilità media (50-70%)
📊 TABELLA STATISTICHE
La tabella mostra:
1. Totale picchi analizzati
2. Distanza media tra picchi
3. Sessioni attuali senza picchi
4. Previsione sessioni rimanenti
5. Probabilità percentuale
6. Soglia volume necessaria affinché si realizzi il picco di volumi
VANTAGGI STRATEGICI
🎯 Per Day Traders
Anticipa i momenti di maggiore volatilità per analisi, supportando la valutazione dei setup di trading e fornendo al contempo un contesto sui periodi di basso volume
📈 Per Swing Traders
1. Identifica pattern di volume ad alta probabilità, supportando l'analisi dei breakout con volume e migliorando la comprensione dei tempi di mercato
🔍 Per Analisti Tecnici
Comprende i pattern di volume del titolo.
Aiuta a fare una valutazione dell'interesse storico del mercato ed è di supporto alla ricerca e analisi quantitativa
ALTRE COSE DA SAPERE...
A) Algoritmo Anti-Consecutivo : permette di evitare segnali e picchi di volume multipli e consecutivi multipli a distanza ravvicinata
B) Validazione Statistica : Utilizza deviazione standard per l'accuratezza
C) Gestione Memoria : Limita i dati storici per performance ottimali
D) Compatibilità : Funziona con tutti i tipi di grafico TradingView
⚠️ DISCLAIMER IMPORTANTE
Questo indicatore è esclusivamente uno strumento di analisi tecnica per lo studio dei pattern di volume. Non fornisce consigli di investimento, segnali di trading o punti di ingresso/uscita. Tutte le decisioni di trading sono a completa discrezione e responsabilità dell'utente. Utilizzare sempre in combinazione con altre analisi tecniche, fondamentali e una adeguata gestione del rischio.
GER40 Opening Range Breakout (Simple)✅ GER40 Opening Range Breakout Strategy — Trading Plan
🎯 Objective:
Capture early momentum after the Frankfurt open by trading breakouts of the initial 15-minute range.
📌 Rules Summary:
Instrument: GER40 (DAX40)
Timeframe: 5-minute or 15-minute chart
Session Focus: 08:00–10:00 CET
Opening Range: 08:00–08:15 CET
🛠 Entry Conditions:
Long entry: Price breaks above the 08:00–08:15 high with volume confirmation.
Short entry: Price breaks below the 08:00–08:15 low with volume confirmation.
Optional confirmation: RSI > 50 for long, RSI < 50 for short.
My Strategy: Uptrend Pullback ScreenerUptrend Pullback Screener. this will filter the stock who is in uptrend and ready to pullback from support.