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.


Only Forum Moderators, Administrators, and the owner of this message may delete it.

 
Jim Dean

Sage
2000100010010010010025
Posts: 3433

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

User Profile
 
Subject : RE: Help with scan
Posted : 4/8/2014 11:32 AM
Post #22839 - In reply to #22788

PLEASE NOTE: I made a mistake (gasp!) in the fancy OScan formula provided earlier in this thread. I had noted that it seemed to perform incorrectly under some circumstances ... but since then, I've discovered that it performs JUST FINE, IF my dumb mistake is corrected. The formula is:

( EMA(20) - C >= 2*ATR(10) ) +
( OBV() > HHV(OBV(),130)[1] ) +
( Sum((H > HHV(260)[1]),20) < 0 ) <= -2

The part I corrected is changing the last-line's ">0" to the correct "<0" shown above.

This is btw a set of conditions that don't occur very often, even when applied to All US stocks. If you want to "play" with this formula a bit, then you might loosen it up to give you more hits:

( EMA(20) - C >= ATR(10) ) +
( OBV() > HHV(OBV(),30)[1] ) +
( Sum((H > HHV(60)[1]),10) < 0 ) <= -2

The formula in that form says to show stocks for which ANY TWO OF THE THREE RULES are true. Change the final -2 to -3 to force all three rules to be true (like using "AND's" instead of plus signs), and change it to -1 to allow a pass if any one rule is true (like using "OR's" instead of plus signs)

As I said earlier, this is a VALUABLE example to study, for anyone who wants to be a "power user" for OmniScript. The "boolean math" is being used not only in the combination of the three distinct rules, but also it's being using in the "Sum()" statement ... adding up ten successive instances of boolean tests.

If you want some further information about this kind of cool boolean math, click here

[Edited by Jim Dean on 4/8/2014 12:04 PM]

Deleting message 22839 : RE: Help with scan


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