Optuma Forums › Optuma Scripting › TimeSinceSignal formulas › Reply To: TimeSinceSignal formulas
March 19, 2019 at 9:29 pm
#51863
- Topics: 70
- Replies: 804
- Posts: 874
To calculate the time since the current closing price was that high (in trading days):
1 2 3 4 |
D1=LAST(CLOSE()); TIMESINCESIGNAL(CLOSE()>D1) |
To calculate the time since the current closing price was that low (in calendar days):
1 2 3 4 |
D1=LAST(CLOSE()); TIMESINCESIGNAL(CLOSE()<D1, UNIT=Days) |
To show the date use the following BARDATE() function, and set the watchlist Column Type to Date:
1 2 3 4 5 |
//Display as Date in Watchlist; D1=LAST(CLOSE()); BARDATE(CLOSE()<D1) |