Reply To: Number of days above 20dma

Optuma Forums Optuma Scripting Number of days above 20dma Reply To: Number of days above 20dma

AvatarTrevor R
  • Topics: 93
  • Replies: 272
  • Posts: 365

Hi Andy,

The function you’re looking for is TIMESINCESIGNAL. Here it is in your code:

You can show the result in a SHOWVIEW or, if you only want the number of days since the last cross you can use CHART ELEMENT, both shown in the following screenshot:

20191102 Andys script




1 user thanked author for this post.

Pin It on Pinterest

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.