OmniTrader Professional Forum OmniTrader Professional Forum
forums calendars search
today this week
 
register logon control panel Forum Rules
You are currently browsing as a guest.
You should logon to access more features
A Self-Moderated Community - ALL MEMBERS, PLEASE READ!
Vote for Members who contribute the most to your trading, and help us moderate content within the Forums.


  Current location        Thread information  
OmniTrader Professional Forum
OmniScan
New 60-day high
Last Activity 1/16/2025 4:54 AM
2 replies, 260 viewings

Jump to page : 1
Now viewing page 1 [25 messages per page]
 
back reply
Printer friendly version

^ Top
CraigBennett

New User

Posts: 2

Joined: 7/10/2024
Location: Wentzville, Missouri

User Profile
 
Subject : New 60-day high
Posted : 7/10/2024 1:28 PM
Post #32468

I’ve been trying to figure out how to scan for stocks making new 60-day highs. Something like price is > highs of past 60 days. Doesn’t have to be 60 days, just fiddling with an idea I read about. If we can’t filter for days, two months would work.

Any ideas?

Thanks,
Craig
^ Top
Etherist

Member
25
Posts: 25

Joined: 6/9/2024
Location: South Australia

User Profile
 
Subject : RE: New 60-day high
Posted : 7/10/2024 10:02 PM
Post #32469 - In reply to #32468

Hey there Craig

From an OmniScan perspective, you could use: h > hhv(60)[1]



or use an Indicator as below:

Try out the attached code for something that might work for you.

=================================================================

1. Parameters:
- Length: Specifies the number of days to look back. Default is 60 days, adjustable from 1 to 365 days.

2. Script Explanation:
- Initialization:
- `HHigh`: Variable to store the highest high observed within the specified period.
- `Period`: Variable to hold the value of the parameter "Length" (number of days to look back).

- Finding Highest High:
- The script initializes `HHigh` to the lowest possible value (`L`).
- It loops through each day within the past `Period` days (`1` to `Period`).
- During each iteration, it compares the high price (`H`) of that day with `HHigh` and updates `HHigh` if `H` is higher.

- Comparison and Plotting:
- After determining the highest high (`HHigh`) over the past `Period` days, the script compares the current closing price (`C`) with `HHigh`.
- If the current price (`C`) is greater than `HHigh`, it plots the current price as "New 60-Day High" in green.
- Otherwise, it plots the current price as "Not a 60-Day High" in red.

3. Return Statement:
- The script returns the value of `HHigh`, which represents the highest high observed over the past `Period` days.

====================================================================

Cheers Etherist :-)




[Edited by Etherist on 7/10/2024 11:20 PM]

Attached file : 60DayHigh.txt (0KB - 62 downloads)
Attached file : 60 Day High.jpg (135KB - 151 downloads)
Attached file : 60 Day High OmniScan.jpg (50KB - 152 downloads)

^ Top
CraigBennett

New User

Posts: 2

Joined: 7/10/2024
Location: Wentzville, Missouri

User Profile
 
Subject : RE: New 60-day high
Posted : 7/10/2024 11:29 PM
Post #32470 - In reply to #32469

Wow, thanks a bunch for terrific reply! More than I asked for.

Kindest regards,
Craig
Jump to page : 1
Now viewing page 1 [25 messages per page]
back reply

Legend    Action      Notification  
Administrator
Forum Moderator
Registered User
Unregistered User
E-Mail this thread to a friend
Toggle e-mail notification


Nirvana Systems
For any problems or issues please contact our Webmaster at webmaster@nirvsys.com.