OmniTrader Forum - OmniTrader Technical Support
Omniscan Issue

^ Top
lvtrader

Posts: 17

Joined: 4/3/2016

User Profile
 
Subject : Omniscan Issue
Posted : 2/17/2023 10:00 AM
Post #48800

I'm trying to run a scan where I identify the first occurrence of an event. I can do this in the focus list by creating a system column where I set a "state" param to 1 when criteria is first met and then interrogate next bars against that state value. Obviously using If statements to perform the interrogation logic. Seems that Omniscan doesn't allow use of IF logic in scans. Anyone have any ideas about how I can accomplish this. Thanks.
^ Top
Barry Cohen

Posts: 6338

Joined: 1/19/2004

User Profile
 
Subject : RE: Omniscan Issue
Posted : 2/17/2023 11:09 AM
Post #48801 - In reply to #48800

There's a way to access systems in scans to pass a stock if there's a current long or short signal, would that work for you?
^ Top
lvtrader

Posts: 17

Joined: 4/3/2016

User Profile
 
Subject : RE: Omniscan Issue
Posted : 2/17/2023 11:33 AM
Post #48802 - In reply to #48800

I believe that would work fine. How would I accomplish this. Thanks.
^ Top
Barry Cohen

Posts: 6338

Joined: 1/19/2004

User Profile
 
Subject : RE: Omniscan Issue
Posted : 2/20/2023 4:22 PM
Post #48804 - In reply to #48800

This is the syntax you would use. This example uses the RSI-P system with its parameters 13, 30, 70, but you can use any other system instead.

This passes long signals only:
SysInd("RSI-P", 13, 30, 70) = 1

This passes short signals only:
SysInd("RSI-P", 13, 30, 70) = -1

This passes both long & short signals:
SysInd("RSI-P", 13, 30, 70) <> 0

^ Top
lvtrader

Posts: 17

Joined: 4/3/2016

User Profile
 
Subject : RE: Omniscan Issue
Posted : 2/20/2023 4:40 PM
Post #48805 - In reply to #48800

Thanks - much appreciated


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