Hi,
I want to calculate the net change since YTD.
My script is the following:
// Getting the Last Trading Day of the Previous Year
Line1 = BARDATE()==STRDATE(DATE=2023-12-29) ;
// Getting the Value of the Last Trading Day of the Previous Year
Line2 = VALUEWHEN(Line1) ;
// Calculating the Absolute Change since the Last Trading Day of the Previous Year
Line3 = CLOSE() - Line2 ;
Line3
The script works as it should.
BUT is it possible to change Line1 in a way that the last trading day of each year is automatically selected without manually selecting the date using the STRDATE() function?
Many thanks in advance.
Thomas
ADDENDUM
How can I make it possible that the code lines are in color?