Update BB volume protection
This commit is contained in:
@@ -34,29 +34,30 @@ public class BollingerBandsVolatilityProtection : BollingerBandsBase
|
||||
// Determine confidence based on width levels (bandwidth as % of SMA)
|
||||
// Lower width = less volatility = higher confidence for trading
|
||||
// Higher width = more volatility = lower confidence for trading
|
||||
// Typical BB bandwidth values: 0.01-0.08 for most markets
|
||||
Confidence confidence;
|
||||
|
||||
if (width >= 0.15) // Extremely high volatility - dangerous expansion
|
||||
if (width >= 0.06) // High volatility - dangerous expansion (6%+)
|
||||
{
|
||||
// Block all signals during dangerous volatility expansion
|
||||
confidence = Confidence.None;
|
||||
}
|
||||
else if (width <= 0.02) // Extremely low volatility - dead market/squeeze
|
||||
else if (width <= 0.01) // Extremely low volatility - dead market/squeeze (1% or less)
|
||||
{
|
||||
// Block all signals in dead markets or extreme squeezes
|
||||
confidence = Confidence.None;
|
||||
}
|
||||
else if (width <= 0.05) // Low to normal volatility - good for trading
|
||||
else if (width <= 0.025) // High confidence - optimal for trading (1% - 2.5%)
|
||||
{
|
||||
// Validate signals during low volatility trending conditions
|
||||
confidence = Confidence.High;
|
||||
}
|
||||
else if (width <= 0.10) // Normal volatility - acceptable for trading
|
||||
else if (width <= 0.035) // Medium confidence - acceptable for trading (2.5% - 3.5%)
|
||||
{
|
||||
// Validate signals during normal volatility conditions
|
||||
confidence = Confidence.Medium;
|
||||
}
|
||||
else // Moderate high volatility (0.10 - 0.15)
|
||||
else // Moderate high volatility (3.5% - 6%)
|
||||
{
|
||||
// Lower confidence during elevated but not extreme volatility
|
||||
confidence = Confidence.Low;
|
||||
|
||||
Reference in New Issue
Block a user