Editors' picksOPEN-SOURCE SCRIPT

TASC 2024.07 Gaps and Extreme Closes

█ OVERVIEW

This script, inspired by Perry Kaufman's article "Trading Opening Gaps and Extreme Closes in Stocks" from the TASC's July 2024 edition of Traders' Tips, provides analytical insights into stock price behaviors following significant price moves. The information about the frequency, pullbacks, and closing patterns of these extreme price movements can aid in developing more effective trading strategies by understanding what to expect during volatile market conditions.


█ CONCEPTS

Perry Kaufman's article investigates the behavior of stock prices following substantial opening gaps and extreme closing moves to identify patterns and expectations that traders can utilize to make informed decisions. The motivation behind the article is to offer traders a more scientific approach to understanding price movements during volatile market conditions, particularly during earnings season or significant economic events. Kaufman's analysis reveals that stock prices have a history of exhibiting certain behaviors after substantial price gaps and extreme closes. This script follows Perry Kaufman's study and helps provide insight into how prices often behave after significant price changes. This analysis can help traders establish price movement expectations and potential strategies for trading such occurrences.


█ CALCULATIONS

Input Parameters:
This script offers users the choice to analyze "Opening Gaps" or "Extreme Closes" for price movements of different predefined magnitudes in a specified direction ("Upward" or "Downward").

Outputs:
Based on the specified inputs, the script performs the following calculations for the active ticker displayed on the chart:
  • Frequency of Extreme Price Movements: Quantifies the occurrences of directional price movements within predefined percentage ranges.
  • Average Pullbacks: Computes the average retracement (pullback) from analyzed price movements within each percentage range.
  • Average Closes: Analyzes the typical closing behavior relative to the directional price movements within each range.

The script organizes the results from these calculations within the table on a separate chart pane, providing users with helpful insights into how a stock historically behaved following significant price movements.
Chart patternsstatisticstasc

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Tools and ideas for all Pine coders: tradingview.com/u/PineCoders/
Pine news broadcasts: t.me/PineCodersSquawkBox or twitter.com/PineCoders
TASC: traders.com/
Also on:

Disclaimer