Select Page

# Within % of All Time High

Optuma Forums Optuma Scripting Within % of All Time High

• This topic has 4 replies, 3 voices, and was last updated 1 year ago by Joe.
Viewing 5 posts - 1 through 5 (of 5 total)
• Author
Posts
• #48655
Luke
• Topics: 3
• Replies: 3
• Posts: 6

Hi, I’m having trouble getting a scan to return stocks within a % of all time high. Thanks

#48667
Darren
• Topics: 62
• Replies: 503
• Posts: 565

Hi Luke,

Use the HIGHESTHIGH() function set to All Time, and then multiply by the required value, such as this for within 15%:

CLOSE() > (HIGHESTHIGH(RANGE=All Time) * 0.85)

For more examples of using the HIGHESTHIGH and LOWESTLOW functions see this forum post:

New 52 week highs and lows

###### 1 user thanked author for this post.
#55329
Joe
• Topics: 0
• Replies: 2
• Posts: 2

Hi Darren

If I wanted to scan for those that have closed within a range of the high, ie say between 30% and 60% of a recent high, how would I adjust that? Cant seem to get this to work.

#55335
Darren
• Topics: 62
• Replies: 503
• Posts: 565

Hi Joe,

To calculate the % from eg a 26 week high you can use the following in a watchlist column, which will give you a value:

For a scan you would need to set the parameters for the ratio, so the last line would be R1 > 0.3 and R1 < 0.6 for your 30%/60% example, giving the true/false column here:

#55365
Joe
• Topics: 0
• Replies: 2
• Posts: 2

That is perfect, thanks Darren!

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