Volume Analysis - Heatmap and Volume Profile

ที่อัปเดต:
Hello All!

I have a new toy for you! Volume Analysis - Heatmap and Volume Profile. Honestly I started to work to develop Volume Heatmap then I decided to improve it and add more features such Volume profile, volume, difference in Buy/Sell volumes etc. I tried to put my abilities into this script and tried to use some new Pine Language™ features (method, force_overlay, enum etc features). I hope the usage of these new features would be an example for Pine Programmers.

Lets talk about how it works:
- It gets number of Rows/Columns from the user for each candle to create heatmap
- It calculates the number of the candles to analyze. Number of the candles may change by number of Rows/columns or if any volume / difference in volumes / volume profile is enabled
- It gets Closing/Opening price, Volume and Time info from lower time frame for each candle (it can be up to 100K for each candle)
- After getting the data it calculates lower time frame to analyze
- Then it calculates how closing price moves, how much volume on each move and create boxes by the volume/move in each box
- The colors for each box calculated by volume info and closing price movements in the lower time frame
- It shows the boxes on Absolute places or Zero Line optionally
- it shows Volume, Cumulative volume, Difference between Buy/Sell volume for each column
- it changes empty box color by Chart background color, also you can change transparency
- At this time it creates Volume Profile with up to 25 rows
- As a new Pine Language™ feature, it can show Volume Profile in the indicator window or in Main chart, shows Value Area, Value Area High (VAH), Value Area Low (VAL), and draw it and POC (Point Of Control) in the indicator window and/or in the main chart
- Honestly the feature I like is that: For the markets that are not open 24/7, it combines the data from the lower time period without any gaps. For example, if you work for a market that is closed on Saturdays and Sundays, it ensures data integrity by omitting weekends and holidays. so for example if the data is like "ABC---DEF-X---YL-Z" then it makes this data like "ABCDEFXYLZ". In this way, there will be no data breaks in the displayed boxes, there will be no empty colons, and it will appear as if data is coming in at any time.
- Finally it shows Info Panel to give info, its background color automatically changes by the Chart background color
- Important! You should set your "Plan" accordingly, your plan is "Premium or Higher" or "Lower tier". so the script can understand the minimum time frame it can get data!!

I tried to share many screenshots below to explain it much better

How it looks?
สแนปชอต

it shows Highest Buy/Sell volumes brighter, move volume -> brighter
สแนปชอต

Volume Profile (up to 25 rows) (number of contained candles should be more than 1)
สแนปชอต

Volume Profile can be shown in the main chart optionally
สแนปชอต

How the main chart looks:
สแนปชอต

Closing price shown and you can enable it, change colors & line width
สแนปชอต

Can include many candles according to Row&Column number you set
สแนปชอต

Optionally it can show cumulative volume for each candle
สแนปชอต

Closing prices from lower time frame
สแนปชอต

Shows Candle Body by changing background colors
สแนปชอต

It can shows all included candles on Zero line
สแนปชอต

You can change the colors of many things
สแนปชอต

You can set Empty box and border transparency
สแนปชอต

Table, Empty box Colors adjustment done automatically by chart background color
สแนปชอต
สแนปชอต

Sometimes we can not get data from some historical candles if time frame is high such 2days, 1 week etc, and it looks like:
สแนปชอต

It also checks if Chart time frame and Chart type is suitable
สแนปชอต
สแนปชอต

Enjoy!
เอกสารเผยแพร่
Unnecessary part removed
เอกสารเผยแพร่
A few optimization, more explanation.
boxescumulativevolumeeducationalheatmaplonesomethebluelowertimeframelowertimeframeanalysisPOCtablevolumeanalysisVolume ProfileVolume

สคริปต์โอเพนซอร์ซ

ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถเข้าใจและตรวจสอบได้ ต้องขอบคุณผู้เขียน! ที่ให้คุณใช้ได้ฟรี แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?

คำจำกัดสิทธิ์ความรับผิดชอบ