OPEN-SOURCE SCRIPT

Cumulative Price Change Alert

453
Cumulative Price Change Alert
Version: 1.0
Author: QCodeTrader ๐Ÿš€

Overview ๐Ÿ”
The Cumulative Price Change Alert indicator analyzes the percentage change between the current and previous open prices and sums these changes over a user-defined number of bars. It then generates visual buy and sell signals using arrows and labels on the chart, helping traders spot cumulative price momentum and potential trading opportunities.

Key Features โš™๏ธ

Customizable Timeframe ๐Ÿ•’:
Use a custom timeframe or default to the chart's timeframe for price data.
User-Defined Summation ๐Ÿ”ข:
Specify the number of bars to sum, allowing you to analyze cumulative price changes.
Custom Buy & Sell Conditions ๐Ÿ””:
Set individual percentage change thresholds and cumulative sum thresholds to tailor signals for
your strategy.
Visual Alerts ๐Ÿš€:
Displays green upward arrows for buy signals and red downward arrows for sell signals directly
on the chart.
Informative Labels ๐Ÿ“:
Provides labels with formatted percentage change and cumulative sum details for the analyzed
bars.
Versatile Application ๐Ÿ“Š:
Suitable for stocks, forex, crypto, commodities, and more.

How It Works โšก

Price Change Calculation โž—:
The indicator calculates the percentage change between the current bar's open price and the
previous bar's open price.
Cumulative Sum โž•:
It then sums these percentage changes over the last N bars (as specified by the user).
Signal Generation ๐Ÿšฆ:
Buy Signal ๐ŸŸข: When both the individual percentage change and the cumulative sum exceed
their respective buy thresholds, a green arrow and label are displayed.
Sell Signal ๐Ÿ”ด: Conversely, if the individual change and cumulative sum fall below the sell
thresholds, a red arrow and label are shown.

How to Use ๐Ÿ’ก

Add the Indicator โž•:
Apply the indicator to your chart.
Customize Settings โš™๏ธ:
Set a custom timeframe if desired.
Define the number of bars to sum.
Adjust the buy/sell percentage change and cumulative sum thresholds to match your trading
strategy.
Interpret Visual Cues ๐Ÿ‘€:
Monitor the chart for green or red arrows and corresponding labels that signal potential buy or
sell opportunities based on cumulative price movements.

Settings Explained ๐Ÿ› ๏ธ

Custom Timeframe:
Select an alternative timeframe for analysis, or leave empty to use the current chart's timeframe.
Number of Last Bars to Sum:
Determines how many bars are used to compute the cumulative percentage change.
Buy Condition - Min % Change:
The minimum individual percentage change required to consider a buy signal.
Buy Condition - Min Sum of Bars:
The minimum cumulative percentage change over the defined bars needed for a buy signal.
Sell Condition - Max % Change:
The maximum individual percentage change threshold for a sell signal.
Sell Condition - Max Sum of Bars:
The maximum cumulative percentage change over the defined bars for triggering a sell signal.

Best Use Cases ๐ŸŽฏ

Momentum Identification ๐Ÿ“ˆ:
Quickly spot strong cumulative price movements and momentum shifts.
Entry/Exit Signals ๐Ÿšช:
Use the visual signals to determine potential entry and exit points in your trading.
Versatile Strategy Application ๐Ÿ”„:
Effective for scalping, swing trading, and longer-term analysis across various markets.

UPD: uncheck labels for better performance

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.