OmniTrader Forum - OmniScan
creating a scan as of a date in the past
Location: Brandon, FL
I'm trying to figure out how to use omnitrader/omniscan to use a scan but also test it as if it were running from a date in the past. The problem I have is that the "days in the past" subscript part of the formula only works from the current market day and I cannot seem to figure out how to run that same formula (and whole scan) as if it were running at a date in the past without having to alter all of the "days in the past" subscripts accordingly. I'd ultimately like to test any of my scans in different time periods to see how they would have performed in the past. Also, any of the metrics shown in the focus list also only reflect the current market date once they are filtered by the scan. It's like I just want to have Omnitrader/Omniscan think it is running only from a date in the past. Any ideas how to accomplish this? thanks!
Location: L'ville, GA
Can be done but a bit tricky.
Build scan formula as usual, then "and" it (in paren's) with:
Baryear()=yyyy and barmonth()=mm and bardayofmonth()=dd
THEN, to get OScan to apply that rule to all the loaded bars,
Insert entire formula into this: Sum((formula),250) < 0
The inserted formula, wrapped in parens, returns its true/false result as -1 or 0. The Sum function adds up the returned values for the past 250 bars. So, when the formula "hits" the day you specified, it will return -1 only if your other scan criteria are valid for that day. All the other days will return 0 since the date specs don't match. Voila!
However - note that OScan natively only loads in the most recent 250 daily bars, so if you want to go back further, you need to change the config file - and Barry dis-recommends doing that (not sure why).
If you are using MarketScan intraday timeframes, you can also include barhour() &/or barminute() in the specifier.
Location: Brandon, FL
Which config file do I edit to change the number of bars in the past that Omnitrader will use for formula subscripts in the past? Also, which parameter in that file do I alter to increase the number of days greater than 250? Thanks!