% Below ATH

Optuma Forums Optuma Scripting % Below ATH

Tagged: 

This topic contains 5 replies, has 5 voices, and was last updated by Avatar Chad 3 weeks, 6 days ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #52825
    Avatar
    Steven
    • Topics: 1
    • Replies: 0
    • Posts: 1

    Does anyone know the correct script to get the “percent below all-time high” for an issue. I am using the following but noticing the data is not correct. 

    (HIGHESTHIGH(RANGE=All Time)-close(0))/close()

    #52827
    Matthew
    Matthew
    • Topics: 4
    • Replies: 137
    • Posts: 141

    Hi Steven,

    You don’t need to do the calculation manually, there is a function that does it automatically called Range from Extremes RFE()  

    An example script for % from All Time high would be:

    On a show view the result would look like this:

    Ex6

      Show View using the above script has a value of 12.07% from AAPLs all time high.

    #52829
    Avatar
    Jonathan
    • Topics: 21
    • Replies: 25
    • Posts: 46

    What about that black line at the ATH.

     

    Can’t we plot a code on the chart that says ATH – the date & then also list the % that the share has until it reaches the ATH? 

     

    This way the chart can dynamically update. Without having a show view tab below chart … ?

    #52833
    Matthew
    Matthew
    • Topics: 4
    • Replies: 137
    • Posts: 141

    You don’t need to script it, you can use the Range from Extremes tool itself to plot the ATH / ATL on the chart, and the date will appear when you hover over the line for each…

    Ex7

    You can see more information on the tool here:

    https://help.optuma.com/kb/faq.php?id=522

     

    #52857
    Darren
    Darren
    • Topics: 36
    • Replies: 211
    • Posts: 247

    Note if you want to display as % in a watchlist divide by 100 and change the column type to Percentage:

    RFE(BACKTYPE=All Time)/100

    Also you can colour-code the cells based on values by right-clicking on the column title and going to Custom Labels, so within 5% of ATH set to green:

    Capture

    #52859
    Avatar
    Chad
    • Topics: 2
    • Replies: 3
    • Posts: 5

    52 week drawdown

    Also, Darren gave me this code for 52 week drawdown.  It has worked well for me.  I do like the RFE as I was trying to find the distance above recent highs, and that may work well.  Thanks.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

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.

Close