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