OPEN-SOURCE SCRIPT

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!

Candlestick analysischartmultitimeframerealtimeTICKticks

סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יוכלו להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אבל השימוש החוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.

רוצה להשתמש בסקריפ זה בגרף?

כתב ויתור