OPEN-SOURCE SCRIPT
volume 5 min smiley Jayy

This script plots volume. Intraday volume forms a smiley high at both ends and low in the middle at least for the cash session which is what this script concerns itself with. I created this as a curiosity but I figure others might be interested. If you are using 5 min charts then it will also plot the average for that particular time slot going back 10, 20 or 30 days and presents the mean for that bar as a black line. It also calculates the standard deviation over that period of time. Clearly the volume data is positively skewed so the mean and standard deviation are a little misleading. That aside it does provide a interesting perspective. The script likely could be reduced in size to accomplish the same thing with less tedium but it is what it is.
I likely will add an option for 15 minutes in the future.
If you are using BATS data you will find errors in low volume stocks because BATS data sometimes misses bars. The calculation relies on 78 5 min bars in a day (9:30 to 16:00 hrs). I built a little checker in the format. If the red line does not show at the beginning of the day then smiley will not work. For example SPY works well but NUGT does not. I have not found an issue will real time data.
There are a few options for bar colouring. They will be obvious when you play with them. current close versus last close, close versus open and volume relative to last bar.
I likely will add an option for 15 minutes in the future.
If you are using BATS data you will find errors in low volume stocks because BATS data sometimes misses bars. The calculation relies on 78 5 min bars in a day (9:30 to 16:00 hrs). I built a little checker in the format. If the red line does not show at the beginning of the day then smiley will not work. For example SPY works well but NUGT does not. I have not found an issue will real time data.
There are a few options for bar colouring. They will be obvious when you play with them. current close versus last close, close versus open and volume relative to last bar.
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
Jayy
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
Jayy
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。