OmniTrader Forum - OmniScan
Weekly Scan Help

^ Top
trading4rent

Posts: 28

Joined: 9/26/2006
Location: Illinois

User Profile
 
Subject : Weekly Scan Help
Posted : 1/24/2017 11:47 AM
Post #38739

I am not sure how I can create a weekly scan in OmniTrader. Below is a typical scan that can easily be created using daily data. Anyone know what code I would need to add to the daily code below to make it a weekly code ?

V > 1000000
C > EMA(50)
C > 10
H > H[1]

How do I write the weekly bar close is greater than weekly 50 EMA ?
How do I write weekly high is greater than previous weekly high ?

Thanks in Advance,
Brian
^ Top
Jim Dean

Posts: 3022

Joined: 9/21/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Weekly Scan Help
Posted : 1/24/2017 12:00 PM
Post #38740 - In reply to #38739

This is a much discussed topic. Indepth solutions can be found here:
http://tradetight.org/forums/thread-view.asp?tid=550#m2598

Another way to handle this without approximations is to put the scan criteria into a Filter Block, with "Current+1" setting and weekly Data Periods active in addition to Daily. This is not strictly a "scan" since it is part of a strategy.

Yet another way is to write a simple OLang Indicator with the weekly rules you want in it, that returns 1 if the rules are met and 0 if they are not. Then set Data Periods so Weekly bars are adequate for your rules, and add the OL Indic as a Focus List column. Choose a List that has your entire Starting Population in it. Now, ToDo-Recalc and sort on that column. All the symbols with "1" in the column pass the test. Highlight and Ctl-C copy those symbols, and create a new custom FL with them in it ... that's equiv to what OmniScan would have produced if it could be run on weekly bars.

Yet another way is to approximate Weekly with Daily Bars. A week is approximately 5 days. So, multiply the parameters of your rules by five and SBAS (step back and squint), and use those rules for OmniScan. The problem is that a true weekly EMA(50) is not the same as a daily EMA(250) ... but its a fast and dirty solution.



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