Certain length of time for scanner to return results?

lucius

New member
Please correct me if I am wrong but from my understanding, scanners are updated every 4 ~ 7 minutes. I use a strategy based on the 1 minute time frame. I back-test my code by adding my scan as an indicator onto my chart. During the market hours, my scanner is not returning the results even though I see the condition being met on my chart. So my question is, what is the minimum requirement in terms of length of time should my condition remain true in order for my scanner to populate with results? I am suspecting 1 ~ 2 minute true condition lengths may not be enough for the scanner to consider it a result. Perhaps the reasoning for this is to reduce the noise that may populate the scanner. Would appending within n bars resolve this so that the condition is met for a longer period of time? Is there any way to decrease the update latency?
 

rad14733

Well-known member
VIP
@luicius It would help if we knew what you are attempting to scan for in order to give a proper reply... Could you please post the scan code you are using... Of course looking back several bars could help in some instances, but may actually be counter-productive in others...
 

lucius

New member
@rad14733, I feel what I am inquiring about could be for any code scripted for true conditions that occur in lower time frames; anything lower than 5 minutes. Take this simple code for example. Here I have a script looking for stocks that are above the VWAP by at least 1% in the 1 minute time frame.

Code:
declare lower;

input difference = 1.01;

def theVWAP = reference VWAP()."VWAP";
def lowAboveVWAP = low > (theVWAP * difference);

plot scan = lowAboveVWAP;

Below is the indicator placed on the chart. The yellow line is the VWAP.
MRNA may not populate my scanner because perhaps the condition is not held true long enough.
RcgFvbU.jpg
 

Slippage

Well-known member
In my experience TOS scans running in watchlists are too delayed and too unreliable for 1m time periods. Even 5m is pushing the limits.

First, yes, the fastest it will update is once every 3m. At least that's my understanding. In reality, it can take longer depending on the workload of their servers. Your scan gets added to a queue and it'll get processed whenever it gets processed. Just like when you are on hold for customer service and it keeps telling you how long your expected wait time is and the time goes down a lot slower than real time.

Second, my scans in watchlists work most of the time but often a watchlist will just stop updating. Usually re-saving the scan can trigger an update. Sometimes not. Then the only way to get it to update is to close and reopen TOS or close that watchlist and not open it for however long it takes for TOS to flush it from memory so it has to completely reload it when you open it again. I haven't tried triggering garbage collection while the watchlist is closed or has another scan selected. That may work. If you just close and open, nothing changes. Switch to other watchlist and back, nothing changes. The only thing I've found reliable is setting an alert on the scan and having it send email or push notifications but this is still subject to the delays in the scan queue workload.

If emails and/or push notifications aren't something you want and or if you really need results every minute then your best bet is to push the scan button yourself every minute. You can detach the scan window and put it near your charts. You can put a symbol linking column in the scan results which you can click to load the symbol on your charts. I made that my first column on the left. Unfortunately, you can't cursor key up and down through results like in the watchlist.
 

XeoNoX

Well-known member
VIP
you can try what slippage said, that will work, however the best you can do without user intervention is also have it alert if the condition was met atleast once within the last 5 minutes or last 10 minutes, if you want real time results that fast you would have to sign up for a service like tradeideas or similar.
 

lucius

New member
Thank you both for the responses. I did reach out to TD Ameritrade about this very issue. They said my approach for having the condition remain true a bit longer for lower timeframe scanners should help and also reduce the noise (the frequency of the alerts). The also mentioned adding an option within the vmoptions to enable multi-threading for scanners. This is some functionality that is currently in beta supposedly.
 
Top