Is there any way or script to show the remaining time for the current bar like Tradingview?

T

thedrtrader

New member
I am looking for a script or indicator which shows the remaining time for the current bar. As of now, wrote the following script

Code:
input OpenTime = 0930;

def currAgg = GetAggregationPeriod();
def minAgg = AggregationPeriod.MIN;
plot remainingSecs = SecondsFromTime(openTime)%60;
remainingSecs.SetDefaultColor(Color.BLUE);
plot toShowIn = if IsNaN(close[-1]) then close[1] else 0;
AddChartBubble(yes, toShowIn, remainingSecs, Color.BLUE, 0);
I am planning to display the remaining secs for each bar in real-time, at its previous bar close.

Can anyone please review the code or point me the right direction to resolve this?
 
L

Len20

Member
As far as I know, it's not possible in TOS. I tried similar recently and it only displayed seconds in multiples of 60, so I think it will only update once per minute at most.

I would personally be interested in an alternative app or website.
Edit: Found this thread.
 
Last edited:

Similar threads

Top