How do I extend end of day price lines all the way to the right edge of the chart?
Script:
#PreviousClose
#Draws previous Close when aggregation period is less than Day
input aggregationPeriod = AggregationPeriod.DAY;
input length = 1;
input displace = -1;
input showOnlyLastPeriod = no;
plot PrevDayClose;
if showOnlyLastPeriod and !IsNaN(close(period = aggregationPeriod)[-1])
{ PrevDayClose = Double.NaN;
}
else
{ PrevDayClose = Highest(close(period = aggregationPeriod)[-displace], length);
}
PrevDayClose.SetDefaultColor(GetColor(1));
PrevDayClose.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
PrevDayClose.SetHiding(GetAggregationPeriod() >= AggregationPeriod.DAY);
End of Script
Current Chart:
https://drive.google.com
Thanks!
Script:
#PreviousClose
#Draws previous Close when aggregation period is less than Day
input aggregationPeriod = AggregationPeriod.DAY;
input length = 1;
input displace = -1;
input showOnlyLastPeriod = no;
plot PrevDayClose;
if showOnlyLastPeriod and !IsNaN(close(period = aggregationPeriod)[-1])
{ PrevDayClose = Double.NaN;
}
else
{ PrevDayClose = Highest(close(period = aggregationPeriod)[-displace], length);
}
PrevDayClose.SetDefaultColor(GetColor(1));
PrevDayClose.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
PrevDayClose.SetHiding(GetAggregationPeriod() >= AggregationPeriod.DAY);
End of Script
Current Chart:
https://drive.google.com
Thanks!