doth4581

Tick based chart [DotH]

Version 1.0 - 2nd January 2023

Hi All,

This is my first published indicator, although I have written several hundreds for private use.

Description

Tick based chart

I got intrigued while reading about tick based charts on this page (please note this link/website owner is not affiliated with me), so I decided to see if it would be possible to recreate this type of chart in TradingView, and here's the results.

This is an implementation for displaying a tick based chart in Trading View. There are benefits to using ticks based candles, as each candle represents the same number of "price moves" rather than an unknown number of moves.

Tick based charts are charts with candles that are rendered in the same way as traditional candles. However, instead of rendering a new candle at a specific time period,tick based candles are rendered after a set number of ticks have occured. For example, in a 50 tick chart, each candle that you see represents exactly 50 ticks, i.e. 50 price changes/moves. Having a view of what happens on the tick level, may help some traders evaluate what is happening within very large candles, or even detect a change in trend, volatility or some other metric which otherwise may not be visible using a standard chart.

Please note that this indicator DOES NOT match/synchronize timewise with the main chart in TradingView. You must view it independently. If you need to see what times are represented in the tick chart, you can look at the custom time labels and X-Axis grid lines in it to get an idea what parts of the tick based chart correspond to the main chart.

Limitations/known issues:
  • Currently the indicator has been restricted to 100 candles. This is for limiting the line and box usage to a max of 300 objects.
  • On timeframes above 1 minute, the seconds values will always be 0. In order to be able to see seconds values in the chart scale you need to be on a second level chart, which requires a premium TradingView subscription.
  • Changing the parameters in the settings will cause the chart to empty and start redrawing from its first candle again. This is because the tick chart is being drawn from realtime data, unlike the standard TradingView charts.

TODOs & Bugs:
  • Add some moving average indicators (SMA, EMA as a minimum)
  • Add a corresponding tick based volume chart
  • Create RSI, MACD, BB variations of this indicator
If you have any ideas/suggestions or bug reports, please feel free to let me know, however keep in mind that I do not have too much spare time to add things, so updates are going to be sporadic.

ABOUT CODE REUSE:
The code is free to use/change. However, if you plan to use this code to make a derivative indicator or strategy, it would be nice to know, so let me know if you feel like it!

开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?