OmniTrader Professional Forum - OmniScan
Capture specific requirement over x period

^ Top
Duxx

Posts: 881

Joined: 2/18/2009

User Profile
 
Subject : Capture specific requirement over x period
Posted : 12/20/2021 5:43 AM
Post #31747

Hi, trying to build a scan that able to capture specific data points in the past
For example… bring any stock with price > $5 in the last 250 days. So the stock must be above 5 in the last 250 days. Or i want volume to be > 1000000 shares daily over the past 50 days, it it gives me the stocks trading above 1000000 daily for the past 50 days

Thanks
^ Top
aztrix

Posts: 23

Joined: 8/28/2021
Location: Sydney, NSW, Australia

User Profile
 
Subject : RE: Capture specific requirement over x period
Posted : 12/20/2021 6:19 AM
Post #31748 - In reply to #31747

Hi Duxx

OLang/Oscript should be able to help you e.g.

HHV(H,250) > 5 OR LLV(V,50) > 1000000


I'm sure there are better ways but hopefully this will get you started …

Cheers
Aztrix

^ Top
roberthalljr

Posts: 13

Joined: 3/4/2007

User Profile
 
Subject : RE: Capture specific requirement over x period
Posted : 12/21/2021 1:05 AM
Post #31753 - In reply to #31747

Here are two formulas that seem to work if I understand your criteria:

For stock price: SUM(-(C > 5),250) = 250

For Volume: SUM(-(V > 1000000),50) = 50

Not unexpectedly, both formulas return quite a large number of stocks so you might want to pare them down in the "Sort Value" section. Hope this helps.

^ Top
Duxx

Posts: 881

Joined: 2/18/2009

User Profile
 
Subject : RE: Capture specific requirement over x period
Posted : 12/21/2021 5:42 AM
Post #31754 - In reply to #31753

Thank you Robert this one works.
Happy Holidays!

Aztrix thank you for responding too!

Happy holidays!


^ Top
Jim Dean

Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Capture specific requirement over x period
Posted : 12/21/2021 8:29 AM
Post #31755 - In reply to #31753

Another way to skin the cat, slightly more efficient (tho the Sum method also works) is to just check to make sure the min price or vol in that period is above the threshold.

LLV(C,250) > 5
LLV(V,50) > 1000000

In theory, this runs a bit faster.
^ Top
aztrix

Posts: 23

Joined: 8/28/2021
Location: Sydney, NSW, Australia

User Profile
 
Subject : RE: Capture specific requirement over x period
Posted : 12/21/2021 10:06 PM
Post #31756 - In reply to #31755

Hi Robert & Jim

As per Duxx' specification,
any stock with price > $5
IMHO High price not Close is correct YMMV

Cheers
Aztrix



https://www.omnitrader.com/currentclients/proforum/thread-view.asp?threadid=7988&posts=6