Optuma Forums › Optuma Scripting › Show Bar Help › Reply To: Show Bar Help
November 15, 2021 at 12:15 pm
#66615
- Topics: 33
- Replies: 55
- Posts: 88
Thank you Mathew. This works perfectly. In a watchlist I want to count the number of bars since this signal occurred. Here is the script I have, but the watchlist does not show any values at all? Please see the screenshot.
1 2 3 4 5 6 7 8 9 |
//Define Signals S1 = SCRIPT(SCRIPTNAME=StochClose 125 5) CrossesAbove 60 ; S2 = SCRIPT(SCRIPTNAME=StochClose 125 5) CrossesBelow 40 ; //Find The Last Signal V1 = SignalAfter(S2,S1) ; //Calculate # Of Bars Since Signal TIMESINCESIGNAL(V1) |