OmniTrader Professional Forum - OmniScan
scan for 75% up bars

^ Top
johnnicholson

Posts: 2

Joined: 8/24/2015
Location: Arizona

User Profile
 
Subject : scan for 75% up bars
Posted : 8/26/2015 7:36 PM
Post #23619

I would like to create a scan that shows stocks that in the past 20 days, 75% (15 days), were up bar days (close > open).

Could anyone help to show me how this is accomplished?

- John

^ Top
Jim Dean

Posts: 3433

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

User Profile
 
Subject : RE: scan for 75% up bars
Posted : 8/26/2015 7:48 PM
Post #23620 - In reply to #23619

Sure. This uses a nifty "trick" ... you sum up the tests for each day and compare them to the minimum total requirement. Each test that is true becomes a -1, while false is 0 ....

15 < -Sum( (C > O), 20)

Minus sign and paren's are important.
^ Top
hafnium

Posts: 44

Joined: 6/3/2006
Location: Vienna, VA 22182

User Profile
 
Subject : RE: scan for 75% up bars
Posted : 8/28/2015 3:00 PM
Post #23621 - In reply to #23620

Jim

Shouldn't this be either of the below statements

15 <= -Sum( (C > O), 20)

14 < -Sum( (C > O), 20)
^ Top
Jim Dean

Posts: 3433

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

User Profile
 
Subject : RE: scan for 75% up bars
Posted : 8/28/2015 3:02 PM
Post #23622 - In reply to #23621

Yup ... good catch.

What a difference a day makes :~)
^ Top
johnnicholson

Posts: 2

Joined: 8/24/2015
Location: Arizona

User Profile
 
Subject : RE: scan for 75% up bars
Posted : 8/29/2015 10:10 AM
Post #23623 - In reply to #23619

Thanks! Works like a charm.
- John


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