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!

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 đồ?