newday=day()!=ref(day(),-1);
pdc=valuewhen(newday,ref(close,-1));
valat918=valuewhen(timenum()==091800,close);
chnage=((valat9-pdc)/pdc)*100;
Not sure if you are still looking for this code.
Typed on the fly on this editor, please reach back if you find any syntax errors