OmniTrader Professional Forum - OmniTrader Pro Technical Support
Finding #bars avail from OmniScan

^ Top
Jim Dean

Posts: 3433

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

User Profile
 
Subject : Finding #bars avail from OmniScan
Posted : 4/21/2009 7:22 AM
Post #11958

I posted about this issue several months ago, and Matthew helped me find a way of doing it that worked.

However, somewhere along the way, the method has stopped working. It's a pretty basic need - to know how "old" a stock is as a part of scanning criteria - so I hope an alternative (and more permanent) solution can be found.

The criteria formula I'm using is:

Min(V,250) >= 1000
and
LLV(250) >= 0.10
and
SymbolData.Numrec > 250

The problem comes in the final condition. This rule USED to filter out any stocks that had not been around for at least a year ... now, it filters out ALL stocks. Un-useful :~(

Please provide an alternative means for doing this.

Thanks!

P.S. Here's another interesting note - unrelated to the main question:
if I use use "Min(V,250) >= 100", many more stocks pass the filter than if I use "Min(V,250) > 100" ... I'd rest easier if someone could give an authoritative explanation for it.
^ Top
THOMAS HELGET

Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/8/2021 4:47 PM
Post #31412 - In reply to #11958

Jim:

I wonder if there has been any resolution to this dilemma.

I would like to insure that all the symbols returned by my OmniScan have at least 250 bars to perform the calculations my System requires.

It's been al long time since the post - has any other solution presented itself? I tried all the things you mentions here and a few others to no avail.

Thanks,

Tom Helget
^ Top
Jim Dean

Posts: 3433

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

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/8/2021 4:53 PM
Post #31413 - In reply to #31412

Numrec tells you in theory what's there, but for thinly traded symbols, sometimes there are "holes". N is supposed to catch and strip those ... and as of ~2016 everything was clean ... I know since I created a routine to find ALL the historical "holes", and Cose used it to remove them. But I've no idea what's been done since then.

Maybe you could try this scan:
Sum( -(V >= 1000 and L >= 0.1), 250 ) = 250

... or if you're willing to have say two "holes", you could check if it's >= 248
... don't forget to include the minus sign ... it's important
... you could use this method with some other V or price critera
^ Top
THOMAS HELGET

Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/8/2021 5:09 PM
Post #31414 - In reply to #31413

Jim:

Wow, my finger just barely got off the Enter Key.

I appreciate your super quick response!

And I'll give your suggestion a shot.

Thanks and Stay Safe,

Tom Helget
^ Top
SteveL

Posts: 133

Joined: 2/15/2007
Location: Boulder, CO

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 10:00 AM
Post #31415 - In reply to #31414

Tom and Jim,
Symbol.Numrec > 250 (and it's inverse: Symbol.Numrec < 250) works just fine for me:




Attached file : 2021-03-09_8-52-26.png (10KB - 575 downloads)
Attached file : 2021-03-09_8-56-19.png (10KB - 569 downloads)

^ Top
Jim Dean

Posts: 3433

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

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 10:27 AM
Post #31416 - In reply to #31415

Hi Steve

Now try those same two starting pops with just one tech formula: 1=1

Almost always for the big lists, some symbols are not really avail.

Not at my PC but my guess is that Symboldata.Numrec >= 250 doesn’t return the same count as 1=1. Presuming that you haven’t changed the Scan loading Params of course.

The thing that I was referring to earlier has to do with “holes” in the data. That is, sometimes for thinly traded stocks, or for stock that had trading halted a while, the bars for all dates in the 250 range “load” (so are a part of Numrec), but have zero volume &/or no price. The Sum() formula I suggested should eliminate those cases.
^ Top
THOMAS HELGET

Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 10:48 AM
Post #31417 - In reply to #31416

Jim:

Unfortunately your "Sum" formula doesn't do the trick for me.

Tom
^ Top
Jim Dean

Posts: 3433

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

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 11:45 AM
Post #31418 - In reply to #31417

Why not?

You can also remove the = 250 and put the formula into Sort
^ Top
THOMAS HELGET

Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 12:04 PM
Post #31419 - In reply to #31418

Jim:

OK, I'll give that a try.

The first instance, = 250, returns only 1 symbol.

The second instance -250 in the Sort (Ascending or Descending) returns the original number of symbols unmodified.

Tom Helget
^ Top
SteveL

Posts: 133

Joined: 2/15/2007
Location: Boulder, CO

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 12:07 PM
Post #31420 - In reply to #31416

Jim and Tom,
I guess I missed the point of your prior comments.

Jim,
Your point of using 1=1 is to see the total starting population. And then here are the consequences of each subsequent filter. The "Sum(...)" filter eliminates 74 symbols from the list.


Attached file : 2021-03-09_11-02-13.png (9KB - 569 downloads)

^ Top
Jim Dean

Posts: 3433

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

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 12:38 PM
Post #31421 - In reply to #31420

Tom - I’m confused what you did to just get one symbol.

Steve - the Numrec count is the number of bars in the data array. The Sum formula returns the number of bars that have meaningful volume and price info. The 1=1 check is a teick I learned to reject symbols that have been delisted or for some other reason aren’t legit.
^ Top
THOMAS HELGET

Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 12:49 PM
Post #31422 - In reply to #31421

Jim:

Here you go:



My goal here was to obtain just those weeklies with at least a year's data to analyze further.

Tom
Attached file : One Symbol Returned.jpg (41KB - 554 downloads)

^ Top
Jim Dean

Posts: 3433

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

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 2:17 PM
Post #31423 - In reply to #31422

If you plot some of the symbols that were blocked, is their volume or price outside those ranges for all days? If so, I don’t understand.

Try removing the rule and instead put it in Sort, without the =250, to see # days that pass for the 144 that made it thru the prior test.
^ Top
THOMAS HELGET

Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 2:38 PM
Post #31424 - In reply to #31423

Jim:

MRNA was the only symbol to make it through on the above = 250 scan.

Symbols that were blocked were APPL, AMD, CAT - well, I hope you get the picture.

Putting it in the Sort Value and sorting Ascending or Descending I get:



Now yeah, I know you noted that all these got through because I set the Select Top Value to greater than my Starting Population, but the whole idea here was to pare down the symbols returned as ten of them (e.g. XPEV, PLTR, DKNG, etc.) did not trade at least 250 days. I really didn't much care if a day or two were skipped - I just wanted enough data to calculate a one-year Linear Regression line.

Tom Helget

Attached file : Sort Value.jpg (76KB - 558 downloads)

^ Top
Jim Dean

Posts: 3433

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

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 2:43 PM
Post #31425 - In reply to #31424

Ahhhh. Ok. Your final paragraph is entirely different than what the original post was referencing (the old scan from 2009).

I can’t see a snap of what got through or the values.

I’ve got to do some other stuff now but the Sum() formula should work if you just adjust how many days you require hits from (rhs of =), and the recentness required ( the ,250 )
^ Top
THOMAS HELGET

Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 2:49 PM
Post #31426 - In reply to #31425

Jim:

Actually I would have thought that your original would have fit the bill with what I wanted to accomplish from what you just said unless I don't understand your meaning:

"Maybe you could try this scan:
Sum( -(V >= 1000 and L >= 0.1), 250 ) = 250"

Tom Helget


^ Top
Jim Dean

Posts: 3433

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

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 3:39 PM
Post #31427 - In reply to #31426

Please spell out precisely what you want to do. I can't hit a moving target. Thanks.
^ Top
THOMAS HELGET

Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 3:54 PM
Post #31428 - In reply to #31427

Jim:

I want to narrow down those Stocks and ETFs with weekly options that have a close above $10 and average put and call volume over the last 21 days greater than 10000 contracts each and have traded every day in the last trading year (call it 250 bars). I want to exclude a stock or ETF if it has traded less than 250 bars because I won't have enough data to calculate a "one-year" Linear Regression Slope and Channel from it.

I hope that is clear and I am sorry if it seemed to be off-topic of the thread but I thought I was close enough in my approach to continue on in it.

Thanks,

Tom Helget
^ Top
Jim Dean

Posts: 3433

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

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 4:15 PM
Post #31429 - In reply to #31428

"Traded every day" means V > 0 for 250 successive bars.

LLV(V,250) > 0 should do it, tho crude
Sum(-(V > 0),250) =250 also should do it.

The logic of those two is correct. Symbols that have ANY day in the past 250 that has a volume of zero will NOT pass, since no volume means no trading.
^ Top
SteveL

Posts: 133

Joined: 2/15/2007
Location: Boulder, CO

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 4:40 PM
Post #31430 - In reply to #31421

Jim wrote: "The 1=1 check is a trick I learned to reject symbols that have been delisted or for some other reason aren’t legit."

Interesting:

Attached file : 2021-03-09_15-38-14.png (4KB - 487 downloads)

^ Top
THOMAS HELGET

Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 4:45 PM
Post #31431 - In reply to #31429

Jim:

I love the impeccable logic of SUM(-(V > 0), 250) = 250 and before I even came here I tried things similar. BUT:



Oh, and although I didn't take a screen shot of it LLV(V,250) > 0 returns all 147 Symbols.

Tom Helget
Attached file : Impeccable Logic.jpg (38KB - 506 downloads)

^ Top
Jim Dean

Posts: 3433

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

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 4:48 PM
Post #31432 - In reply to #31431

Steve: Yup. Interesting, ain't it? Alternative to "1=1" formula is "True"

Tom: I see. Yes it's weird. Did you try LLV(V,250) > 0?
^ Top
THOMAS HELGET

Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 4:50 PM
Post #31433 - In reply to #31432

Jim:

Sure did - added it to the above.

Tom
^ Top
Jim Dean

Posts: 3433

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

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 4:54 PM
Post #31434 - In reply to #31433

re your post 31424, can you please attach a snap of the resulting symbols on the left, including the sort value column

and ... not sure what "added it to the above" means. did the LLV approach also yield just one symbol?

Maybe test just 240 days, or maybe 50 days, to see if that changes things.

Maybe try: Sum( -(C/C = 1), 200) = 200
^ Top
SteveL

Posts: 133

Joined: 2/15/2007
Location: Boulder, CO

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 4:58 PM
Post #31435 - In reply to #31433

Tom,
I think I've done the same thing that you tried:

Attached file : 2021-03-09_15-56-28.png (9KB - 202 downloads)
Attached file : 2021-03-09_16-08-26.png (8KB - 493 downloads)

^ Top
Jim Dean

Posts: 3433

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

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 5:06 PM
Post #31436 - In reply to #31435

THAT makes a lot more sense, Steve.

No idea why Tom's is different.

Tom maybe you need a dreaded OmniScan data reload from scratch. I just had to do one of those.
^ Top
THOMAS HELGET

Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 5:46 PM
Post #31437 - In reply to #31435

Jim:

You have!

So, why in the heck does yours work and mine doesn't? (And you eliminated the 10 or so that I wanted to get rid of - so this would appear to be correct).

Tom Helget
^ Top
THOMAS HELGET

Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 5:51 PM
Post #31438 - In reply to #31436

Jim:

Maybe I do.

Do you recall if you removed OmniData/OmniScan completely first and then reinstalled it or did you just do a Repair?

Tom Helget
^ Top
Jim Dean

Posts: 3433

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

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 5:57 PM
Post #31439 - In reply to #31438

Kill destroy zap and vaporize.
Then install from scratch.
^ Top
THOMAS HELGET

Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 6:04 PM
Post #31440 - In reply to #31439

Jim:

I just did that on another computer and it does take a while to ultimately get up and running again since just getting OmniData/OmniScan installed is only half of the process. You have to get all the data from where it left off and currently that is, I believe, December. It might have to wait until the weekend.

But thanks for showing me it is possible to achieve my goal!

Tom Helget
^ Top
Jim Dean

Posts: 3433

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

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/9/2021 6:17 PM
Post #31441 - In reply to #31440

Yup ... takes a while fer sure.

I think my prior full install was 2016 ... was getting sort of long in the tooth.

I hope that solves the problem ... you should have several methods to work with now!
^ Top
THOMAS HELGET

Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/10/2021 6:43 PM
Post #31442 - In reply to #31441

Jim:

What a difference several hours of updating my OmniData/OmniScan makes (sounds like a great song title):



Thanks so much for having the patience to guide me through the morass.

Tom Helget
Attached file : YEA.jpg (75KB - 346 downloads)

^ Top
Jim Dean

Posts: 3433

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

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/10/2021 7:31 PM
Post #31443 - In reply to #31442

Hurrah!
Glad to help.
^ Top
Barry Cohen

Posts: 2305

Joined: 1/1/1900

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/16/2021 12:27 PM
Post #31450 - In reply to #31443

FYI, we update the OmniData/Scan install every 2-3 months. It's just been updated as well. I also keep this thread updated when we do.

https://www.omnitrader.com/currentclients/otforum/thread-view.asp?threadid=1082&posts=1

(Install Last Updated: 3-9-21)
(Index Lists Last Updated: 3-8-21)

^ Top
THOMAS HELGET

Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/16/2021 12:35 PM
Post #31451 - In reply to #31450

Barry:

Knowing that an OmniData/OmniScan update is posted every two to three months do you recommend that one update OD/OS at that frequency?

Thanks,

Tom Helget
^ Top
Barry Cohen

Posts: 2305

Joined: 1/1/1900

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/16/2021 4:19 PM
Post #31452 - In reply to #31451

You shouldn't ever need to reinstall it, but issues do happen sometimes. I only recommend it if you suspect there's some sort of problem, like you had earlier in this thread.
^ Top
Jim Dean

Posts: 3433

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

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/16/2021 5:03 PM
Post #31453 - In reply to #31452

Tom it’s been my experience that it’s good for about three years before it begins showing signs of age.
^ Top
THOMAS HELGET

Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Finding #bars avail from OmniScan
Posted : 3/16/2021 5:42 PM
Post #31454 - In reply to #31453

Barry and Jim:

Thanks for you advice!

In the past I have only deleted and reinstalled OD/OS if there has been a major problem. I never even thought about a periodic reinstallation assuming that this was all taken care of with a new yearly OT or sometimes after a new Pre-Release is installed and I am asked if I want to update my database.

But the funny thing in relation to the problem discussed in this thread is that I can remember reinstalling OD/OS recently. Hence my query about periodic updates.

Thanks,

Tom Helget


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