OmniTrader Forum OmniTrader 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.


  Current location        Thread information  
OmniTrader 2017 Upgrade Forums
OmniScan
End Date Filter
Last Activity 12/9/2018 12:15 PM
2 replies, 501 viewings

Jump to page : 1
Now viewing page 1 [25 messages per page]
 
back reply
Printer friendly version

^ Top
dlortie

New User

Posts: 1

Joined: 12/15/2004
Location: Ottawa

User Profile
 
Subject : End Date Filter
Posted : 10/11/2016 7:37 PM
Post #37383

Hi,

I am trying to filter out symbols that have not traded in the previous "x" trading days.

Is there a function to get the current system date and eliminate any records that have not traded in the previous "y" days.

I found some functions called BarYear() and BarMonth(), but nothing about current date, and nothing about how to put these together to filter out records.

I wrote the following, but older records are still not being filtered and in any case it would fail on Jan 1, 2017.

BarYear() >= 2016 AND BarMonth() >= 10

Thank You,
Daniel

^ Top
Jim Dean

Idol
2000500100100100252525
Posts: 2891

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

User Profile
 
Subject : RE: End Date Filter
Posted : 10/11/2016 8:39 PM
Post #37385 - In reply to #37383

This is messy due to how OT handles days where the exchange disallowed trading, vs trading was allowed but no trades were exercised. Which are you referring to?

If the latter, do you want to treat days with a very few trades (i.e. Tiny nonzero volume) are effectively "no trade" or not?

Another important question is whether you want this for omniscan which only looks at the most recent bar, or for a filter block that must work for all historic bars.

Can be done regardless, but it's a nontrivial, messy exercise depending on how those questions are answered.

Note that legit trading holidays also increase the complexity.

[Edited by Jim Dean on 10/11/2016 8:41 PM]

^ Top
Jim Dean

Idol
2000500100100100252525
Posts: 2891

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

User Profile
 
Subject : RE: End Date Filter
Posted : 10/11/2016 8:43 PM
Post #37386 - In reply to #37385

Current "system" date and time info, unrelated to bars, is obtained via (some of the) standard VB keywords, such as now.year, now.month, etc.

Some of that works in OLang and some doesn't. You have to experiment.
Jump to page : 1
Now viewing page 1 [25 messages per page]
back reply

Legend    Action      Notification  
Administrator
Forum Moderator
Registered User
Unregistered User
E-Mail this thread to a friend
Toggle e-mail notification


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