Net change column in pre and post market


Hello I would like to know is it possible to create custom column on watchlist that update net change in pre and post mark

plot x = close;
x.AssignValueColor(if x > 0 then color.UPTICK else if X < 0 then color.DOWNTICK else color.CURRENT);

net change column in TOS only update in regular hours is there any way that it will update in pre and after hours too


et. made I script that change last price in pre market and post market


Marked as spam
Posted by (Questions: 6, Answers: 3)
Asked on March 8, 2019 11:55 am
Private answer

Here you go:

def newDay = GetDay() <> GetDay()[1];
def sessionEnd =SecondsTillTime(1600) <= 0;
rec dailyClose = if sessionEnd[-1] and !sessionEnd then close else dailyClose[1];
plot netChange = dailyClose - close;

Marked as spam
Posted by (Questions: 36, Answers: 1978)
Answered on April 6, 2019 7:14 am