OPEN-SOURCE SCRIPT
Force Pulse

█ OVERVIEW
Force Pulse is a fast-reacting oscillator that measures the internal strength of market sides by analyzing the aggregated dominance of bulls and bears based on candle size.
The indicator normalizes this difference into a 0–100 range, generates signals (OB/OS, midline cross, MA midline cross), and detects divergences between price and the oscillator.
It also offers advanced visualization, signal markers, and alerts, making it a versatile tool suitable for many trading styles.
█ CONCEPTS
Force Pulse was designed as a universal tool that can be applied to various trading strategies depending on its settings:
- increasing the period lengths and smoothing transforms it into a momentum/trend indicator, revealing a stable dominance of one market side.
- Lowering these parameters turns it into a peak/low detector, ideal for contrarian and mean-reversion strategies.
The oscillator analyzes the relationship between the sum of bullish and bearish candles over a selected period, based on:
- candle body size, or
- average candle body size (AVG Body).
Depending on the selected mode, OB/OS levels should be adjusted, as value dynamics differ between modes.
The output is normalized to 0–100, where:
> 50 – bullish dominance,
< 50 – bearish dominance.
The additional MA line is derived from smoothed oscillator values and serves as a signal line for midline crosses and as a trend filter.
The indicator also detects divergences (HL/LL) between price and the oscillator.
█ FEATURES
Bull & Bear Strength:
- Calculations are based on Body or AVG Body – mode selection requires adjusting OB/OS levels.
- Bullish and bearish candle values are summed separately.
- All results are normalized to the 0–100 scale.
Force Pulse Oscillator:
- The main line reflects the current dominance of either market side.
Dynamic colors:
- Green – above 50,
- Red – below 50.
Signal MA:
- SMA based on oscillator values functions as a signal line.
- Helps detect momentum shifts and generates signals via midline crosses.
- Can serve as a trend confirmation filter.
Overbought / Oversold:
- Configurable OB/OS levels, also for the MA line.
- Dynamic OB/OS line colors: when the MA line exceeds the defined threshold (e.g., MA > maOverbought or MA < maOversold), OB/OS lines change color (red/green).
- This often signals a potential reversal or correction and may act as additional confirmation for oscillator-generated signals.
Divergences:
- Detection based on swing pivots:
- Bullish: price LL, oscillator HL
- Bearish: price HH, oscillator LH
- Displayed as “Bull” / “Bear” labels.
Signals:
Supports multiple signal types:
- Overbought/Oversold Cross
- Midline Cross
- MA Midline Cross (based on the signal MA line)
- Signals appear as triangles above/below the oscillator.
Visualization:
- Gradient options for lines and levels.
- Full customization of colors, transparency, and line thickness.
Alerts available for:
- Divergences
- OB/OS crossings
- Midline crossings
- MA midline crossings
█ HOW TO USE
Add the indicator to your TradingView chart → Indicators → search “Force Pulse”
Parameter Configuration
Calculation Settings:
- Calculation Period (lookback) – defines the strength calculation window.
Force Mode (Body / AVG Body):
- Body – faster response, higher sensitivity.
- AVG Body – more stable output; adjust band levels and periods to your strategy.
- EMA Smoothing (smoothLen) – reduces oscillator noise.
- MA Length – length of the signal line (SMA).
Threshold Levels:
- Set Overbought/Oversold levels for both the oscillator and the MA line.
- Adjust levels depending on Body / AVG Body mode.
Divergence Detection:
- Enable/disable divergence detection.
- PivotLength affects both delay and signal quality.
- Signal Settings: Choose one or multiple signal types.
- Style & Colors: Full control over color schemes, gradients, and transparency.
Signal Interpretation
BUY:
- Oscillator leaves oversold (OS crossover).
- Midline cross upward.
- MA crosses the midline from below.
- Bullish divergence.
SELL:
- Oscillator leaves overbought (drops below OB).
- Midline cross downward.
- MA crosses the midline from above.
- Bearish divergence.
Trend / Momentum:
-Longer periods and stronger smoothing → stable directional signals.
-MA as a trend filter: e.g., signal line above the midline (50) and MA pointing upward indicates continuation of a bullish impulse.
Contrarian / Mean Reversion:
- Short periods → rapid detection of peaks and troughs; ideal for contrarian signals and pullback entries.
█ APPLICATIONS
- Trend Trading: Using midline and MA midline crosses to determine direction.
- Reversal Trading: OB/OS levels and divergences help identify reversals.
- Scalping & Intraday: Short settings + signal line above the midline with bullish MA → shows short-term impulse and continuation.
- Swing Trading: Longer MA and higher lookback provide a stable view of market-side dominance.
- Momentum Analysis: Force Pulse highlights the strength of the wave before price movement occurs.
█ NOTES
- In strong trends, the oscillator may stay in extreme zones for a long time — this reflects dominance, not necessarily a reversal signal.
- Divergences are more reliable on higher timeframes.
- OB/OS levels should be tailored to Body/AVG Body mode and the instrument.
- Best results come from combining the indicator with other tools (S/R, market structure, volume).
Force Pulse is a fast-reacting oscillator that measures the internal strength of market sides by analyzing the aggregated dominance of bulls and bears based on candle size.
The indicator normalizes this difference into a 0–100 range, generates signals (OB/OS, midline cross, MA midline cross), and detects divergences between price and the oscillator.
It also offers advanced visualization, signal markers, and alerts, making it a versatile tool suitable for many trading styles.
█ CONCEPTS
Force Pulse was designed as a universal tool that can be applied to various trading strategies depending on its settings:
- increasing the period lengths and smoothing transforms it into a momentum/trend indicator, revealing a stable dominance of one market side.
- Lowering these parameters turns it into a peak/low detector, ideal for contrarian and mean-reversion strategies.
The oscillator analyzes the relationship between the sum of bullish and bearish candles over a selected period, based on:
- candle body size, or
- average candle body size (AVG Body).
Depending on the selected mode, OB/OS levels should be adjusted, as value dynamics differ between modes.
The output is normalized to 0–100, where:
> 50 – bullish dominance,
< 50 – bearish dominance.
The additional MA line is derived from smoothed oscillator values and serves as a signal line for midline crosses and as a trend filter.
The indicator also detects divergences (HL/LL) between price and the oscillator.
█ FEATURES
Bull & Bear Strength:
- Calculations are based on Body or AVG Body – mode selection requires adjusting OB/OS levels.
- Bullish and bearish candle values are summed separately.
- All results are normalized to the 0–100 scale.
Force Pulse Oscillator:
- The main line reflects the current dominance of either market side.
Dynamic colors:
- Green – above 50,
- Red – below 50.
Signal MA:
- SMA based on oscillator values functions as a signal line.
- Helps detect momentum shifts and generates signals via midline crosses.
- Can serve as a trend confirmation filter.
Overbought / Oversold:
- Configurable OB/OS levels, also for the MA line.
- Dynamic OB/OS line colors: when the MA line exceeds the defined threshold (e.g., MA > maOverbought or MA < maOversold), OB/OS lines change color (red/green).
- This often signals a potential reversal or correction and may act as additional confirmation for oscillator-generated signals.
Divergences:
- Detection based on swing pivots:
- Bullish: price LL, oscillator HL
- Bearish: price HH, oscillator LH
- Displayed as “Bull” / “Bear” labels.
Signals:
Supports multiple signal types:
- Overbought/Oversold Cross
- Midline Cross
- MA Midline Cross (based on the signal MA line)
- Signals appear as triangles above/below the oscillator.
Visualization:
- Gradient options for lines and levels.
- Full customization of colors, transparency, and line thickness.
Alerts available for:
- Divergences
- OB/OS crossings
- Midline crossings
- MA midline crossings
█ HOW TO USE
Add the indicator to your TradingView chart → Indicators → search “Force Pulse”
Parameter Configuration
Calculation Settings:
- Calculation Period (lookback) – defines the strength calculation window.
Force Mode (Body / AVG Body):
- Body – faster response, higher sensitivity.
- AVG Body – more stable output; adjust band levels and periods to your strategy.
- EMA Smoothing (smoothLen) – reduces oscillator noise.
- MA Length – length of the signal line (SMA).
Threshold Levels:
- Set Overbought/Oversold levels for both the oscillator and the MA line.
- Adjust levels depending on Body / AVG Body mode.
Divergence Detection:
- Enable/disable divergence detection.
- PivotLength affects both delay and signal quality.
- Signal Settings: Choose one or multiple signal types.
- Style & Colors: Full control over color schemes, gradients, and transparency.
Signal Interpretation
BUY:
- Oscillator leaves oversold (OS crossover).
- Midline cross upward.
- MA crosses the midline from below.
- Bullish divergence.
SELL:
- Oscillator leaves overbought (drops below OB).
- Midline cross downward.
- MA crosses the midline from above.
- Bearish divergence.
Trend / Momentum:
-Longer periods and stronger smoothing → stable directional signals.
-MA as a trend filter: e.g., signal line above the midline (50) and MA pointing upward indicates continuation of a bullish impulse.
Contrarian / Mean Reversion:
- Short periods → rapid detection of peaks and troughs; ideal for contrarian signals and pullback entries.
█ APPLICATIONS
- Trend Trading: Using midline and MA midline crosses to determine direction.
- Reversal Trading: OB/OS levels and divergences help identify reversals.
- Scalping & Intraday: Short settings + signal line above the midline with bullish MA → shows short-term impulse and continuation.
- Swing Trading: Longer MA and higher lookback provide a stable view of market-side dominance.
- Momentum Analysis: Force Pulse highlights the strength of the wave before price movement occurs.
█ NOTES
- In strong trends, the oscillator may stay in extreme zones for a long time — this reflects dominance, not necessarily a reversal signal.
- Divergences are more reliable on higher timeframes.
- OB/OS levels should be tailored to Body/AVG Body mode and the instrument.
- Best results come from combining the indicator with other tools (S/R, market structure, volume).
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.