
Pinescriptlabs Store indicators: Pinescriptlabs Store cBots : (cBot) Gold & BTC BreakoutSession Pivots(new)
PRICE ACTION (New)
Trailing Smart Algorithm (New)
Prediction Based on Linreg & ATR
SmartTrend Support &
Resistance
Lines
Dynamic
Market Structure
Analysis
of
Turning
Points
Fibonacci
Linear
Regression
Multi-timeframe
Auto
Support and
Resistance
Trend
Lines
All
Support and
Resistance
Levels
Description:
Advance HTF Trend Buy & Sell Trading System
What is it and what is it for?
Itβs a technical analysis algorithm that automatically identifies support and resistance levels π based on historical price ranges, and detects when price breaks these levels to generate trend signals π‘.
How does the logic work?
1οΈβ£ Range Calculation
The indicator analyzes a defined historical period (fully configurable) to find:
β’ The highest price reached in that period π
β’ The lowest price reached in that period π
β’ The midpoint between both levels βοΈ
2οΈβ£ Level Establishment
Once the extremes are identified, the indicator:
β’ Draws a red line at the maximum level (resistance)
β’ Draws a green line at the minimum level (support)
β’ Adds a safety buffer to each level to prevent false signals π‘οΈ
3οΈβ£ Breakout Detection
The system constantly monitors the price to detect:
β’ Bullish breakout π: when the price closes above the resistance level + buffer
β’ Bearish breakout π»: when the price closes below the support level - buffer
4οΈβ£ Confirmation System
Before generating a final signal β
, the indicator:
β’ Waits for a configurable number of consecutive bars confirming the breakout β³
β’ Only after confirmation does it officially change the trend
5οΈβ£ Dynamic Updating
Levels are recalculated automatically:
β’ When a new period starts (daily, weekly, or monthly, depending on your settings) π
β’ Lines extend until new levels are set
β’ The midpoint line changes color according to the current trend
How to Use the ?
β¨ Signals:
β’ Buy: The π symbol appears when a bullish breakout is confirmed
β’ Sell: The π» symbol appears when a bearish breakout is confirmed
π¨ Candle Coloring:
β’ Candles are automatically colored according to the current trend:
β
Green: Active bullish trend
β Red: Active bearish trend
Parameter Settings
π§ Lookback Period (5β200, default: 11)
What does it control?
The number of historical bars used to calculate highs and lows.
Impact when modified:
β’ Low values (5β15):
- More reactive and frequent levels
- Higher number of signals
- Best for scalping and short-term trades
- Ideal for highly volatile markets
β’ High values (30β50):
- More stable and lasting levels ποΈ
- Fewer but more reliable signals
- Better for swing trading and medium-term positions
- Ideal for more stable markets
π Breakout Threshold (0.01β5.0%, default: 0.1%)
What does it control?
The extra buffer the price must exceed to confirm a breakout.
Impact when modified:
β’ Low values (0.05β0.15%):
- Earlier and more sensitive signals π
- Higher risk of false breakouts
- Ideal for Forex majors with low spreads
- Best for high liquidity markets
β’ High values (0.3β1.0%):
- Later but more reliable signals π‘οΈ
- Lower risk of market noise
- Ideal for cryptocurrencies and volatile assets
- Best for markets with wider spreads
β³ Confirmation Bars (1β5, default: 1)
What does it control?
How many consecutive bars must confirm the breakout before generating a signal.
Impact when modified:
β’ 1 bar:
- Instant signals β‘
- More trading opportunities
- Higher risk of premature signals
- Ideal for active traders
β’ 2β3 bars:
- Balance between speed and reliability βοΈ
- Significantly reduces false signals
- Ideal for most strategies
β’ 4β5 bars:
- Very conservative signals ποΈ
- Maximum reliability
- May miss early opportunities
- Ideal for long-term positions
π Optimization by Asset Type
π± Forex Majors (EUR/USD, GBP/USD, etc.)
β’ Lookback: 15β25
β’ Threshold: 0.05β0.15%
β’ Confirmation: 1β2 bars
π° Cryptocurrencies
β’ Lookback: 10β20
β’ Threshold: 0.2β0.8%
β’ Confirmation: 2β3 bars
π Stock Indices
β’ Lookback: 20β30
β’ Threshold: 0.1β0.3%
β’ Confirmation: 1β2 bars
πΎ Commodities
β’ Lookback: 25β35
β’ Threshold: 0.15β0.4%
β’ Confirmation: 2β3 bars
Considerations
β’ May generate late signals in very fast-moving markets πββοΈ
β’ Less effective in extremely sideways markets
β’ Requires parameter adjustments depending on asset and timeframe β±οΈ