- Topics: 5
- Replies: 616
- Posts: 621
The script looks ok, i’ve tested it here and it works ok. One thing to note, when posting scripts please do not post a screen shot, rather copy and paste the script directly into the post, it makes it easier for us to test the code.
D1 = BARDATE() == STRDATE(DATE=2019-12-31) ;
D2 = BARDATE() == STRDATE(DATE=2020-12-31) ;
(VALUEWHEN(D2) / VALUEWHEN(D1)) - 1
First thing to check is when you open a chart you have historical data going back that far. If you do not, run through Option 3 here.
If the data is going back far enough for the script to work, try adjusting the Date Range property in the Watchlist to Everything.