Optuma Forums › Optuma Scripting › Days since last 5% swing low › Reply To: Days since last 5% swing low
- Topics: 70
- Replies: 829
- Posts: 899
Hi Thomas,
SwingEnd() gives the value of the swing, not the date.
The difficulty with swings is that you have to wait X days until the swing turn has been confirmed (ie until price has moved at least 5%) so using something like TIMESINCESIGNAL(Var1 TurnsUp) won’t work as that counts from when the swing was confirmed, not from the low bar.
The only way I can think of is to count since the low price was equal to the swing end: TIMESINCESIGNAL(LOW()==Var2)
Note that this doesn’t take in to account the current swing direction, so if using a watchlist add SWINGUP(Var1)==1 to a column and sort.
Out of the Dow 30, it’s been 66 days since MSFT had a swing low, followed by 8 others on 40 days. At 9 days ago INTC had the most recent swing low.