GapDetect

This library, GapDetect, simplifies the identification and evaluation of overnight gaps by leveraging statistical metrics such as standard deviation and percentage moves. It is ideal for detecting large abnormal gaps which may be used to modify how strategies may decide to enter or exit.
Key Features:
Overnight Gap Detection
Provides two core functions:
- today: Computes the value of today's overnight gap.
- todayPercent: Computes the percentage change for today's overnight gap.
Volatility Analysis
Includes functions for statistical gap analysis:
- normal: Calculates the normal daily standard deviation of the overnight gap, filtering outliers using customizable thresholds.
- normalPercent: Similar to normal, but for percentage-based gap moves.
Gap Severity Metric
- severity: a positive or negative value that represents the ratio of the current overnight move compared to the standard deviation of previous ones.
Customizable Parameters
Supports custom session specifications, resolutions, and outlier thresholds.
Perpustakaan Pine
Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai perpustakaan sumber terbuka supaya pengaturcara Pine lain dari komuniti kami boleh menggunakannya semula. Sorakan kepada penulis! Anda juga boleh menggunakan perpustakaan ini secara peribadi atau dalam penerbitan sumber terbuka lain, tetapi penggunaan semula kod ini dalam penerbitan adalah tertakluk kepada Peraturan Dalaman.
Penafian
Perpustakaan Pine
Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai perpustakaan sumber terbuka supaya pengaturcara Pine lain dari komuniti kami boleh menggunakannya semula. Sorakan kepada penulis! Anda juga boleh menggunakan perpustakaan ini secara peribadi atau dalam penerbitan sumber terbuka lain, tetapi penggunaan semula kod ini dalam penerbitan adalah tertakluk kepada Peraturan Dalaman.