Bar timer for tick charts


0
0

I use 400 tick charts to trade intraday. It would be useful to have a study which tells many seconds each bar takes to complete.  Anyone know how to do this? I have looked on TOS but could not find anything helpful. Thanks Lindsay

RESOLVED
Marked as spam
Posted by (Questions: 7, Answers: 11)
Asked on May 13, 2018 10:46 am
798 views
0

So, you want to plot something on the chart that shows the number of seconds that has elapsed from one bar to the other? That seems to be your request. But the question title indicates you want a countdown timer to display the number ticks remaining for the current bar to complete. These are two entirely different things.

( at May 13, 2018 11:50 am)
0

Yes sorry about the poor question. The purpose is to show how long each bar took to form in seconds. This is like a speedometer for bar charts.

Example bar 1 took 50 seconds to form (400 ticks)
bar 2 took 10 seconds to form.
the “speed” of the market increased from bar 1 to bar 2. The “speed” is what I am trying to get the study to show. Does that make sense?
Thanks for taking the time with this. Lindsay

( at May 17, 2018 2:28 pm)
0
Private answer

After getting clarifications, we have a solution. And let me just say that this is something I have never run across before. This concept is way off the beaten path. I love it. So many implications and applications.

Here is your code:

declare lower;
def barTime = GetTime() / 1000; # converts time to seconds
plot seconds = barTime - barTime[1]; # number of seconds between bars

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on May 17, 2018 4:16 pm
0

You are great! Quite frankly I don’t know exactly how I would use this yet but it seems like it would be helpful to know whether the market is “slowing down” (consolidating?!) or , moving rapidly with fast strokes high ie is it grinding or moving impulsively. I will apply it today and post a screen shot if that is OK. Thanks again! Lindsay

( at May 18, 2018 4:05 am)
0
Exactly what I need, you are amazing
( at August 14, 2019 3:30 pm)