OPEN-SOURCE SCRIPT

Previous Day and Week Ranges

Cập nhật
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.
Phát hành các Ghi chú
Minor bug fix
Phát hành các Ghi chú
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.
Phát hành các Ghi chú
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.
Phát hành các Ghi chú
nothing important
Phát hành các Ghi chú
Added max_bars_back that sets the maximum number of bars that is available for historical reference to prevent cache issue
Phát hành các Ghi chú
Fixed issue with lines not being redrawn correctly by using persistent variables for line objects.
Phát hành các Ghi chú
max_bars_back fixed
Phát hành các Ghi chú
Change log:
  • Updated color scheme
  • Added transparency to fill color
  • getPoc() function changed
Phát hành các Ghi chú
Change log:
  • getPoc() function uses math.floor now
Phát hành các Ghi chú
Chart update
Phát hành các Ghi chú
Added new Method to
Initializes the arrays within the `BarArrays` instance to empty arrays.
Phát hành các Ghi chú
Rolling back to the previous version, the method for BarArrays object init has been removed
Phát hành các Ghi chú
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.
Phát hành các Ghi chú
added Value Area High (VAH), and Value Area Low (VAL) calculation and plots
Phát hành các Ghi chú

  1. Added previous Month OHLC levels
  2. Added a runtime error to verify timeframe validity and the presence of volume data
Phát hành các Ghi chú
Added new Custom Type for set of Lines
Phát hành các Ghi chú
Added line descriptions with the option to display Text Label, Value, or both
Phát hành các Ghi chú
Refactored and optimized the `getPocVahVal()` function for improved computational efficiency.
Phát hành các Ghi chú
Made minor adjustments and optimized the code to improve volume profile calculation speed.
Phát hành các Ghi chú
Added:
  • label offset
  • current vwap

Phát hành các Ghi chú
Added another Addon:
- session volume profile PoCs (historical Pocs)
- naked / untapped Pocs
Phát hành các Ghi chú
Had to revert the nPoc rendering. It will be included in the next update after resolving the issue.
Phát hành các Ghi chú
New Addon: Added Session Volume Profile (SVP) and rendering of the Nearest Naked (untapped) Point of Control.
Phát hành các Ghi chú
Displays Session Volume Profiles (SVP) with the nearest naked Points of Control (PoC) above and below the current price.
Phát hành các Ghi chú
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.
Phát hành các Ghi chú
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.
Phát hành các Ghi chú
Resolved overlapping of daily, weekly, and monthly lines.
Phát hành các Ghi chú
Improved lines and labels rendering
Phát hành các Ghi chú
renderLine function optimized
dailyanalysisDAYnakedpocPOCrangesresistencestatisticssupportVolume Profileweekweeklyanalysis

Mã nguồn mở

Theo tinh thần TradingView thực sự, tác giả của tập lệnh này đã xuất bản dưới dạng nguồn mở để các nhà giao dịch có thể hiểu và xác minh. Chúc mừng tác giả! Bạn có thể sử dụng miễn phí. Tuy nhiên, bạn cần sử dụng lại mã này theo Quy tắc nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?


Ngoài ra, trên:

Thông báo miễn trừ trách nhiệm