tkarolak

Previous Day and Week Ranges

tkarolak מעודכן   
I've designed the "Previous Day and Week Ranges" indicator to enhance your trading strategy by clearly displaying daily and weekly price levels. This tool shows Open-Close and High-Low ranges for both daily and weekly timeframes directly on your trading chart.

Key Features:

  • Potential Support and Resistance: The indicator highlights previous day and week ranges that may serve as key support or resistance levels in subsequent trading sessions.
  • Customizable Display Options: Offers the flexibility to show or hide daily and weekly ranges based on your trading needs.
  • Color Customization: Adjust the color settings to differentiate between upward and downward movements, enhancing visual clarity and chart readability.

This indicator is ideal for traders aiming to understand market dynamics better, offering insights into potential pivot points and zones of price stability or volatility.
הערות שחרור:
Minor bug fix
הערות שחרור:
Changelog
  1. Significant code refactor for faster execution.
  2. Visualizes open-close and high-low values as labels with tooltips for the previous day and week.
  3. Plots lines and labels for the Point of Control (POC) of the previous day and week.
הערות שחרור:
New functions and type:
  • Introduced RangeColors type for improved color management.
  • renderLine function for easier creation and updating of lines.
  • copyAndClear method to handle data copy and clearing between BarArrays.
הערות שחרור:
nothing important
הערות שחרור:
Added max_bars_back that sets the maximum number of bars that is available for historical reference to prevent cache issue
הערות שחרור:
Fixed issue with lines not being redrawn correctly by using persistent variables for line objects.
הערות שחרור:
max_bars_back fixed
הערות שחרור:
Change log:
  • Updated color scheme
  • Added transparency to fill color
  • getPoc() function changed
הערות שחרור:
Change log:
  • getPoc() function uses math.floor now
הערות שחרור:
Chart update
הערות שחרור:
Added new Method to
Initializes the arrays within the `BarArrays` instance to empty arrays.
הערות שחרור:
Rolling back to the previous version, the method for BarArrays object init has been removed
הערות שחרור:
Changes to getPoc() Function:
  1. Proportion Logic Implementation: Added detailed volume allocation logic for full, partial, and complete slot overlaps.
  2. Data Validation: Included checks to handle empty data sets.
  3. Enhanced Index Bounds Validation: Improved index bounds validation for consistent calculations.
הערות שחרור:
added Value Area High (VAH), and Value Area Low (VAL) calculation and plots
הערות שחרור:
  1. Added previous Month OHLC levels
  2. Added a runtime error to verify timeframe validity and the presence of volume data
הערות שחרור:
Added new Custom Type for set of Lines
הערות שחרור:
Added line descriptions with the option to display Text Label, Value, or both
הערות שחרור:
Refactored and optimized the `getPocVahVal()` function for improved computational efficiency.
הערות שחרור:
Made minor adjustments and optimized the code to improve volume profile calculation speed.
הערות שחרור:
Added:
  • label offset
  • current vwap
הערות שחרור:
Added another Addon:
- session volume profile PoCs (historical Pocs)
- naked / untapped Pocs
הערות שחרור:
Had to revert the nPoc rendering. It will be included in the next update after resolving the issue.
הערות שחרור:
New Addon: Added Session Volume Profile (SVP) and rendering of the Nearest Naked (untapped) Point of Control.
הערות שחרור:
Displays Session Volume Profiles (SVP) with the nearest naked Points of Control (PoC) above and below the current price.
הערות שחרור:
Enhancements:

  • markVisitedPocs(): Improved logic to mark Point of Control (PoC) lines as visited. The function now iterates through PoC levels more efficiently, updating the line color and marking the PoC as not naked when it falls within the current bar’s high and low range.
  • selectNakedPOCs(): Enhanced functionality to select the last two naked PoC levels, one above and one below the current close. The function now handles edge cases and ensures accurate selection of PoC levels, improving overall reliability and performance.
הערות שחרור:
Fixed an issue where the Previous Day POC was naked and resulted in two lines being plotted. Now, only a single line is displayed without overlaps.
הערות שחרור:
Resolved overlapping of daily, weekly, and monthly lines.
הערות שחרור:
Improved lines and labels rendering
הערות שחרור:
renderLine function optimized

סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יכולים להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אך שימוש חוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.

רוצה להשתמש בסקריפ זה בגרף?