OPEN-SOURCE SCRIPT
تم تحديثه

Hierarchical + K-Means Clustering Strategy

955
===== USER GUIDE =====
Hierarchical + K-Means Clustering Strategy

OVERVIEW:
This strategy combines hierarchical clustering and K-means algorithms to analyze market volatility patterns
and generate trading signals. It uses a modified SuperTrend indicator with ATR-based volatility clustering
to identify potential trend changes and market conditions.

KEY FEATURES:
- Advanced volatility analysis using hierarchical clustering and K-means algorithms
- Modified SuperTrend indicator for trend identification
- Multiple filter options including moving average and ADX trend strength
- Volume-based exit mechanism to protect profits
- Customizable appearance settings

SETTINGS EXPLANATION:

1. SuperTrend Settings:
- ATR Length: Period for ATR calculation (default: 11)
- SuperTrend Factor: Multiplier for ATR to determine trend bands (default: 3)

2. Hierarchical Clustering Settings:
- Training Data Length: Number of bars used for clustering analysis (default: 200)

3. Appearance Settings:
- Transparency 1 & 2: Control the opacity of trend lines and fills
- Bullish/Bearish Color: Colors for uptrend and downtrend visualization

4. Time Settings:
- Start Year/Month: Define when the strategy should start executing trades

5. Filter Settings:
- Moving Average Filter: Uses SMA to filter trades (only enter when price is on correct side of MA)
- Trend Strength Filter: Uses ADX to ensure trades are taken in strong trend conditions

6. Volume Stop Loss Settings:
- Volume Ratio Threshold: Controls sensitivity of volume-based exits
- Monitoring Delay Bars: Number of bars to wait before monitoring volume for exit signals

HOW TO USE:
1. Apply the indicator to your chart
2. Adjust settings according to your trading preferences and timeframe
3. Long signals appear when price crosses above the SuperTrend line (▲k marker)
4. Short signals appear when price crosses below the SuperTrend line (▼k marker)
5. The strategy automatically manages exits based on volume balance conditions

INTERPRETATION:
- Green line/area: Bullish trend - consider long positions
- Red line/area: Bearish trend - consider short positions
- Yellow line: Moving average for additional trend confirmation
- Volume balance exits occur when buying/selling pressure equalizes

RECOMMENDED TIMEFRAMES:
This strategy works best on 1H, 4H, and daily charts for most markets.
For highly volatile assets, shorter timeframes may also be effective.

RISK MANAGEMENT:
Always use proper position sizing and consider setting additional stop losses
beyond the strategy's built-in exit mechanisms.

===== END OF USER GUIDE =====
ملاحظات الأخبار
===== USER GUIDE =====
Hierarchical + K-Means Clustering Strategy

OVERVIEW:
This strategy combines hierarchical clustering and K-means algorithms to analyze market volatility patterns
and generate trading signals. It uses a modified SuperTrend indicator with ATR-based volatility clustering
to identify potential trend changes and market conditions.

KEY FEATURES:
- Advanced volatility analysis using hierarchical clustering and K-means algorithms
- Modified SuperTrend indicator for trend identification
- Multiple filter options including moving average and ADX trend strength
- Volume-based exit mechanism to protect profits
- Customizable appearance settings

SETTINGS EXPLANATION:

1. SuperTrend Settings:
- ATR Length: Period for ATR calculation (default: 11)
- SuperTrend Factor: Multiplier for ATR to determine trend bands (default: 3)

2. Hierarchical Clustering Settings:
- Training Data Length: Number of bars used for clustering analysis (default: 200)

3. Appearance Settings:
- Transparency 1 & 2: Control the opacity of trend lines and fills
- Bullish/Bearish Color: Colors for uptrend and downtrend visualization

4. Time Settings:
- Start Year/Month: Define when the strategy should start executing trades

5. Filter Settings:
- Moving Average Filter: Uses SMA to filter trades (only enter when price is on correct side of MA)
- Trend Strength Filter: Uses ADX to ensure trades are taken in strong trend conditions

6. Volume Stop Loss Settings:
- Volume Ratio Threshold: Controls sensitivity of volume-based exits
- Monitoring Delay Bars: Number of bars to wait before monitoring volume for exit signals

HOW TO USE:
1. Apply the indicator to your chart
2. Adjust settings according to your trading preferences and timeframe
3. Long signals appear when price crosses above the SuperTrend line (▲k marker)
4. Short signals appear when price crosses below the SuperTrend line (▼k marker)
5. The strategy automatically manages exits based on volume balance conditions

INTERPRETATION:
- Green line/area: Bullish trend - consider long positions
- Red line/area: Bearish trend - consider short positions
- Yellow line: Moving average for additional trend confirmation
- Volume balance exits occur when buying/selling pressure equalizes

RECOMMENDED TIMEFRAMES:
This strategy works best on 1H, 4H, and daily charts for most markets.
For highly volatile assets, shorter timeframes may also be effective.

RISK MANAGEMENT:
Always use proper position sizing and consider setting additional stop losses
beyond the strategy's built-in exit mechanisms.

===== END OF USER GUIDE =====

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.