Calculate Highest ATR ever for an instrument

Optuma Forums Optuma Scripting Calculate Highest ATR ever for an instrument

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #66497
    Stan
    • Topics: 1
    • Replies: 1
    • Posts: 2

    I am working on a script that produces a value of the highest ATR(15) ever in the history of a particular instrument.  I am working through the scripting courses for the 2nd time, so I am less than proficient.  I think nesting it within the HIGHESTHIGH function will get me there, but I have no way to verify if the value the script produces is correct.  I can place the history data in Excel and calculate the ATR(15) for everyday then look for the highest value ever but that would be a nightmare for a watchlist of any length.  I suppose I could do that to get the highest ever, then just script that value in and compare to all future bars but again very consuming.

    I was working with
    HIGHESTHIGH(ATR(BARS=15),RANGE=All Time, INCBAR=True)
    Highesthigh gives the highest price in a defined history, is there a HIGHESTHIGH function that will use a variable?  Highest high average; highesthigh volume, etc?

    #66519
    Matthew
    • Topics: 5
    • Replies: 487
    • Posts: 492

    Hi,

    The HighestHigh() function can be wrapped around other variables, not just price.

    Here’s the example script for a ATR15 highest value:

    Here’s how it looks on a chart…

    Ex1

    #66755
    Stan
    • Topics: 1
    • Replies: 1
    • Posts: 2

    Is there a list where I can see how Optuma calculates the ATR?  Or any of the parameter scripting values?  Thanks

    #66756
    Matthew
    • Topics: 5
    • Replies: 487
    • Posts: 492

    Hi,

    The scripts are generally based off of tool functions, so you can reference the tools KB article for information on how they are calculated:

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest