Line for just prior close


Category:
0
0

Hi I was wondering if there was a way to have a line drawn just for the prior close.

 

For example this draw a line for each days close. I just want one for the current day and none showing for prior days.

 

plot DailyClose = close(period=”DAY”)[1];

 

Thanks!

Marked as spam
Posted by (Questions: 3, Answers: 3)
Asked on July 20, 2019 11:01 pm
126 views
0
Private answer

plot dailyClose = if GetDay() == GetLastDay() then close(period = AggregationPeriod.DAY)[1] else Double.NaN;

Details here:

http://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Date---Time/GetLastDay.html

Marked as spam
Posted by (Questions: 37, Answers: 4087)
Answered on July 21, 2019 9:51 am