tradeforopp

Volume Profile [TFO]

tradeforopp Cập nhật   
This indicator generates Volume Profiles from which to display insights about recent Volume Points of Control and High Volume Nodes. Volume Profile is a way to view trading volume by the price where trades have occurred, rather than the time when they occur (as seen by traditional Volume indicators).


By selecting a Resolution Timeframe (1m in this example), we can aggregate the volume at different prices to build a Volume Profile for a specified Profile Timeframe (1D in this example). In this indicator, we make the simple assumption that a given candle's volume is distributed evenly across all points. Realistically, this is seldom the case, but it gives us a starting point to easily estimate the volume at a given price, in turn helping us to build our profiles in a trivial way.


If we do this for all Resolution Timeframe candles within a Profile Timeframe (all 1m candles in a single 1D candle, in this example), then we can successfully aggregate this data and build a full Volume Profile. And thankfully, Pine Script's new polyline feature ultimately allow us to keep more Volume Profiles on our charts. Before polylines, we would have to consider using lines or boxes to represent the individual levels within a given profile, and each script currently has a cap of 500 lines and boxes, respectively. However, one single polyline can be used to draw the complex shape of an entire profile, and we may show up to 100 polylines in a given script. This helps us keep a lot more data on our charts!


Compared to TradingView's Session Volume Profile indicator (blue/yellow), we can see that our indicator (grey) is nearly identical, which verifies that our assumption of a uniform volume distribution is enough to roughly estimate a given Volume Profile. Note in this example the Row Size was set to 200, meaning that 200 levels are used to approximate profiles from each session's high to its low.


Show VPOC will show the volume point of control of each profile, which represents the price level where the largest amount of volume was traded for a given profile. This is shown with the red lines in the following chart.


Extend Last N VPOCs will look for the most recent, user-defined number of VPOCs (not including the current session's VPOC that's still developing) and extend them to the right of the chart as points of reference. The Show Labels Above option will annotate each VPOC with its respective date above a specified timeframe. This way, if one was using Volume Profiles on intraday timeframes, there wouldn't need to be several date strings all showing the same day.


Show Previous HVNs will show high volume nodes from the previous session. The HVN Strength setting is similar to a "pivot strength" that I use in a lot of my scripts - essentially, HVNs are validated by treating them as local highs. With a HVN Strength of 10 for example, if a given level contains more volume than the 10 levels above and below it, then it is validated as a HVN.


For a cleaner look and feel, HVNs can instead be shown as levels (lines) instead of areas (boxes). With levels enabled, solid lines denote the previous session's VPOC, and dotted lines represent all other HVNs. With areas enabled instead, the tops and bottoms will extend above/below the HVN level until a point with greater volume is discovered (marking the "end" of the node).


This indicator can be computationally intensive and may crash from taking too long to execute. In these cases, it's best to disable unused features, decrease the number of Rows, and/or simply reload the chart until it populates.
Phát hành các Ghi chú:
Forgot to mention: HVNs are colored according to the previous session's close. HVNs above the previous session's close will be red by default (denoting potential resistance), and HVNs below will be green by default (denoting potential support).

Mã nguồn mở

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

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

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

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