Thank you Bigbeluga for this amazing code. I have updated the code little bit to add alerts and also to allow user to adjust setting of selection of left bar and right bar in settings.
The High Volume Points script from BigBeluga is designed to detect significant price levels (pivots) on a chart that occur alongside high trading volumes. These points can be potential areas for reversals or key support/resistance levels. The script plots circles at pivot points and allows for visual analysis of these significant price levels in conjunction with volume.
This can help traders identify critical points in the market where the price might reverse or consolidate, particularly when high volume is present, indicating strong market participation.
Main Features of the Script: Pivot Points Detection:
The script identifies pivot highs and pivot lows. A pivot high is a point where the price is higher than its neighboring bars, and a pivot low is where the price is lower than its neighboring bars. These pivots are calculated using a user-defined number of bars to the left and right of the pivot (controlled by the leftBars and rightBars input). Volume Filtering:
The script filters pivots by volume. Only pivots that occur when the volume exceeds a certain threshold (set by the filter_vol input) are plotted and considered significant. Volume is normalized to a scale of 0 to 6, based on its percentile rank relative to the recent historical volumes. Visual Aids:
Circles are drawn around the pivot points to make them easy to spot. These circles' size and position depend on the volume and proximity to the pivot. The script uses different colors for pivot highs and pivot lows (defined by upper_col for highs and lower_col for lows) to differentiate between the two types of pivots. The script also draws levels (lines) at pivot highs and lows, which extend indefinitely to the right of the chart to highlight key support or resistance zones. Dynamic Line Widths:
The width of the lines drawn at the pivots is dynamically adjusted based on the normalized volume, providing an indication of how significant the volume is relative to the overall market. Volume Threshold:
The script compares the current volume to a reference volume (the 95th percentile of volume over the lookback period). This comparison determines whether the volume is considered "high" and therefore worthy of highlighting on the chart. Alerts:
Alert conditions are set up to notify you when significant events happen on the chart, such as: When a pivot high occurs with high volume. When a pivot low occurs with high volume. When any point with high volume is detected (not necessarily a pivot). These alerts help you stay informed in real-time when key price points and volume surges happen. Usage Instructions: How to Use the Script: Set the Script on the Chart:
After copying and pasting the script into the Pine Script editor in TradingView, add the indicator to your chart. Visualizing Key Points:
Once the script is running on your chart, it will start plotting circles at the locations of detected pivot highs and pivot lows, with the size of the circle representing the volume of that bar relative to recent volume. The circles are drawn in different colors for pivot highs and lows, making it easy to distinguish between them. Lines will be drawn at the detected pivot points, extending indefinitely to the right, providing potential support or resistance levels. Adjusting Settings (If Desired):
The script allows you to adjust several input parameters to customize its behavior: Diameter Of Circles (step): Controls the size of the circles plotted around the pivots. Filter Points by Volume (filter_vol): Sets the minimum volume level for a pivot to be plotted. Length: Controls how many bars to consider on the left and right of a pivot when detecting pivot points. Show Levels (show_lvl): Toggle whether or not the levels (lines) are displayed on the chart. Adjusting these settings allows you to fine-tune how sensitive the script is to volume and how much historical data is considered in detecting pivots.
Alerts:
To set up alerts, click on the Alerts button (the alarm clock icon) in TradingView. Create a new alert and select one of the following conditions: Pivot High with High Volume: Triggers when a pivot high with high volume is detected. Pivot Low with High Volume: Triggers when a pivot low with high volume is detected. High Volume Point: Triggers when any high volume point (pivot or not) is detected. Choose the notification method (e.g., pop-up, email, webhook, etc.), and the alert will notify you when the condition is met. Example Use Case: Trend Reversal Confirmation: If you're analyzing a bullish trend, a sudden pivot high with high volume could indicate a potential trend reversal or resistance point. Similarly, a pivot low with high volume could indicate a potential support level.
Volume Surge Detection: High volume points not necessarily related to a pivot could indicate unusual market activity. By setting up alerts for high-volume points, you can be alerted when the market is showing unusual participation, which might signify important upcoming price movements.
Final Thoughts: This script is primarily designed to help traders spot significant price levels (pivots) along with the volume that validates these levels. It's a useful tool for identifying potential reversal points or important support and resistance areas. By using the alerts, you can automate the process of monitoring these levels and volume surges, ensuring you don't miss important opportunities.
סקריפט קוד פתוח
ברוח TradingView אמיתית, היוצר של הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יכולים לבדוק ולאמת את הפונקציונליות שלו. כל הכבוד למחבר! למרות שאתה יכול להשתמש בו בחינם, זכור שפרסום מחדש של הקוד כפוף לכללי הבית שלנו.
לגישה מהירה לגרף, הוסף את הסקריפט הזה למועדפים שלך - למד עוד כאן.
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.
ברוח TradingView אמיתית, היוצר של הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יכולים לבדוק ולאמת את הפונקציונליות שלו. כל הכבוד למחבר! למרות שאתה יכול להשתמש בו בחינם, זכור שפרסום מחדש של הקוד כפוף לכללי הבית שלנו.
לגישה מהירה לגרף, הוסף את הסקריפט הזה למועדפים שלך - למד עוד כאן.
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.