OPEN-SOURCE SCRIPT

Average Bullish & Bearish Percentage Change

Aktualisiert
Average Bullish & Bearish Percentage Change
Processes two key aspects of directional market movements relative to price levels. Unlike traditional momentum tools, it separately calculates the average of positive and negative percentage changes in price using user-defined independent counts of actual past bullish and bearish candles. This approach delivers comprehensive and precise view of average percentage changes.


FEATURES:
  • Count-Based Averages: Separate averaging of bullish and bearish %𝜟 based on their respective number of occurrences ensures reliable and precise momentum calculations.
  • Customizable Averaging: User-defined number of candle count sets number of past bullish and bearish candles used in independent averaging.
  • Two Methods of Candle Metrics:1. Net Move: Focuses on the body range of the candle, emphasizing the net directional movement.
    2. Full Capacity: Incorporates wicks and gaps to capture full potential of the bar.
  • The indicator classifies Doji candles contextually, ensuring they are appropriately factored into the bullish or bearish metrics to avoid mistakes in calculation:
    1. Standard Doji - open equals close.
    2. Flat Close Doji - Candles where the close matches the previous close.
  • Timeframe Flexibility:
    The indicator can be applied across any desired timeframe, allowing for seamless multi-timeframe analysis.



HOW TO USE
  1. Select Method of Bar Metrics:

    Net Move: For analyzing markets where price changes are consistent and bars are close to each other.
    Snapshot

    Full Capacity: Incorporates wicks and gaps, providing relevant figures for markets like stocks
    Snapshot
  2. Set the number of past candles to average:
    🟩 Average Past Bullish Candles (Default: 10)
    🟥 Average Past Bullish Candles (Default: 10)



Why Percentage Change Is Important
Standardized Measurement Across Assets:
Percentage change normalizes price movements, making it easier to compare different assets with varying price levels. For example, a $1 move in a $10 stock is significant, but the same $1 move in a $1,000 stock is negligible.
Highlights Relative Impact:
By measuring the price change as a percentage of the close, traders can better understand the relative impact of a move on the asset’s overall value.
Volatility Insights:
A high percentage change indicates heightened volatility, which can be a signal of potential opportunities or risks, making it more actionable than raw price changes. Percents directly reflect the strength of buying or selling pressure, providing a clearer view of momentum compared to raw price moves, which may not account for the relative size of the move.


By focusing on percentage change, this indicator provides a normalized, actionable, and insightful measure of market momentum, which is critical for comparing, analyzing, and acting on price movements across various assets and conditions.
Versionshinweise
  • Line 23,24: Fixed mistake after Doji2 (Flat Close) condition. Had "open[1]" by a mistake.
  • Upon realizing that the outputs were originally based on a simple arithmetic averaging method, I took the opportunity to introduce additional 2 averaging options where weights are not equally distributed as in Arithmetic.

    Snapshot

    1. Exponential Averaging:
    Assigns greater weight to recent data while rapidly reducing the influence of older data. This makes it highly responsive and effective at capturing momentum shifts in the market.
    2. Weighted Averaging:
    Applies linearly increasing weights to newer candles, providing a balanced approach that blends smoothness with responsiveness, making it ideal for identifying trends with moderate sensitivity.
  • Arithmetic avg will remain as default

Versionshinweise
Updates
  • Removed Doji candles from classification logic. Previously, conditions like close == close[1] or open == close affected the accurate targeting of bullish/bearish candles for averaging. This issue has been resolved using simple mathematical sign checks.
  • Added "Show corresponding average of candle color" BOOL: When Enabled it will show the output of corresponding average. Otherwise it will show the average based on the change of closing price.
    DISABLED:
    Snapshot
    ENABLED:
    Snapshot
  • Full Capacity uses True Range because during a move price reaches extreme point and leaves wick as traces. (Full potential range during bullish/bearish change)
  • After careful observation, the Exponential Averaging is set to default.
Bearish PatternsBullish PatternschangepercentagestatisticsVolatility

Open-source Skript

Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun das Script auch andere Trader verstehen und prüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden. Die Nutzung dieses Codes in einer Veröffentlichung wird in unseren Hausregeln reguliert. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Möchten Sie dieses Skript auf einem Chart verwenden?


Unlock exclusive tools: fractlab.com

ᴀʟʟ ᴄᴏɴᴛᴇɴᴛ ᴘʀᴏᴠɪᴅᴇᴅ ʙʏ ꜰʀᴀᴄᴛʟᴀʙ ɪꜱ ɪɴᴛᴇɴᴅᴇᴅ ꜰᴏʀ ɪɴꜰᴏʀᴍᴀᴛɪᴏɴᴀʟ ᴀɴᴅ ᴇᴅᴜᴄᴀᴛɪᴏɴᴀʟ ᴘᴜʀᴘᴏꜱᴇꜱ ᴏɴʟʏ.

ᴘᴀꜱᴛ ᴘᴇʀꜰᴏʀᴍᴀɴᴄᴇ ɪꜱ ɴᴏᴛ ɪɴᴅɪᴄᴀᴛɪᴠᴇ ᴏꜰ ꜰᴜᴛᴜʀᴇ ʀᴇꜱᴜʟᴛꜱ.

Haftungsausschluss