Total number of Ticks or total number of bars in each minute box

ssmike123

Member
When using Tick Charts, each minute is marked within the grid and at the bottom of the chart. Is there a way to print Total number of Ticks or total number of bars in each minute box?
Here I have used a line chart purposely.

Has anyone done this? or can you help please. Here is an image & description of what I am looking for

using an intraday 200 tick chart of/ES with the background grid on, the rectangles of grid are not of equal size, since each rectangle is formed after one minute. the more trades have taken place in that one minute, the longer the horizontal length of rectangle. if each bar is 200 ticks, some rectangles may have 10 bars and others may have 30. this is not a fixed number. is there a way to print the number of bars in each rectangle?
IMGUR link, ( ) once you see image, right click & open image in new tab to enlarge. Thanks
 
Last edited by a moderator:
Solution
I know your question is old, but perhaps this will work for you:
Code:
declare upper;

def trade_time_s = SecondsFromTime(0000);
def delta_t_s = trade_time_s - trade_time_s[1];
def delta_t_m = delta_t_s / 60;
input minutes = 5;

def trades = tick_count();
def trades_per_minute = trades / delta_t_m;
def min_blocks = trade_time_s % (60 * minutes);
def time_boundary = if min_blocks[1] > min_blocks then 1 else 0;

def cumulative_block_bars = if time_boundary == 1 then 1 else cumulative_block_bars[1] + 1;

AddChartBubble(time_boundary[-1] == 1, text = cumulative_block_bars, "price location" = HIGH, color = Color.WHITE);

I like tick charts and try to solve problems people have using them.

-mashume
I know your question is old, but perhaps this will work for you:
Code:
declare upper;

def trade_time_s = SecondsFromTime(0000);
def delta_t_s = trade_time_s - trade_time_s[1];
def delta_t_m = delta_t_s / 60;
input minutes = 5;

def trades = tick_count();
def trades_per_minute = trades / delta_t_m;
def min_blocks = trade_time_s % (60 * minutes);
def time_boundary = if min_blocks[1] > min_blocks then 1 else 0;

def cumulative_block_bars = if time_boundary == 1 then 1 else cumulative_block_bars[1] + 1;

AddChartBubble(time_boundary[-1] == 1, text = cumulative_block_bars, "price location" = HIGH, color = Color.WHITE);

I like tick charts and try to solve problems people have using them.

-mashume
 
Solution
Can some please help with changing this indicator to add a label instead of adding a bubble on the chart.


declare upper;

def trade_time_s = SecondsFromTime(0000);
def delta_t_s = trade_time_s - trade_time_s[1];
def delta_t_m = delta_t_s / 60;
input minutes = 5;

def trades = tick_count();
def trades_per_minute = trades / delta_t_m;
def min_blocks = trade_time_s % (60 * minutes);
def time_boundary = if min_blocks[1] > min_blocks then 1 else 0;

def cumulative_block_bars = if time_boundary == 1 then 1 else cumulative_block_bars[1] + 1;

AddChartBubble(time_boundary[-1] == 1, text = cumulative_block_bars, "price location" = HIGH, color = Color.WHITE);
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
323 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top