|
lvtrader
 Member
Posts: 17
Joined: 4/3/2016
User Profile |
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.
|
|
Barry Cohen
 Sage
      Posts: 6338
Joined: 1/19/2004
User Profile |
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?
|
|
lvtrader
 Member
Posts: 17
Joined: 4/3/2016
User Profile |
I believe that would work fine. How would I accomplish this. Thanks.
|
|
Barry Cohen
 Sage
      Posts: 6338
Joined: 1/19/2004
User Profile |
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
|
|
lvtrader
 Member
Posts: 17
Joined: 4/3/2016
User Profile |
Thanks - much appreciated
|