Hi All ! Mobius posted this Anchored Line at Time indicator in the Lounge in the past ; but it shows the current day only. Is it possible to have this Line at Time show on eash of the previous 5 days or whatever number selected. I appreciate any help. Thanks. # Ruby: # Time Anchored Plot To Current Close with Slope
# Mobius
# V02.01.07.2016
# Simplified Code form V01.2011 version
input BeginTime = 1030;
input X_value = close;
input Display_Label = yes;
def Active = if SecondsTillTime(BeginTime) == 0 and
SecondsFromTime(BeginTime) == 0 and
GetDay() == GetLastDay()
then 1
else 0;
def X = if Active
then X_value
else X[1];
plot Line = if Active
then X
else if IsNaN(close[-1])
then close
else Double.NaN;
Line.EnableApproximation();
Line.SetStyle(Curve.FIRM);
Line.SetDefaultColor(Color.CYAN);
def z = if Active
then X
else if IsNaN(close[-1])
then HighestAll(X)
else Double.NaN;
def FirstBar = if Active
then BarNumber()
else Double.NaN;
plot zero = if BarNumber() == HighestAll(FirstBar)
then X
else if BarNumber() > HighestAll(FirstBar)
then X
else Double.NaN;
zero.SetDefaultColor(Color.CYAN);
# End Code Anchored Line
# Mobius
# V02.01.07.2016
# Simplified Code form V01.2011 version
input BeginTime = 1030;
input X_value = close;
input Display_Label = yes;
def Active = if SecondsTillTime(BeginTime) == 0 and
SecondsFromTime(BeginTime) == 0 and
GetDay() == GetLastDay()
then 1
else 0;
def X = if Active
then X_value
else X[1];
plot Line = if Active
then X
else if IsNaN(close[-1])
then close
else Double.NaN;
Line.EnableApproximation();
Line.SetStyle(Curve.FIRM);
Line.SetDefaultColor(Color.CYAN);
def z = if Active
then X
else if IsNaN(close[-1])
then HighestAll(X)
else Double.NaN;
def FirstBar = if Active
then BarNumber()
else Double.NaN;
plot zero = if BarNumber() == HighestAll(FirstBar)
then X
else if BarNumber() > HighestAll(FirstBar)
then X
else Double.NaN;
zero.SetDefaultColor(Color.CYAN);
# End Code Anchored Line