I have a scan that I would like to run every 5 minutes throughout the day, but I would like a quotepage to accumulate all hits throughout the day and record the time of entry into the quotepage. How can I do this?

First, I would create a quotepage...and make sure it's empty at the begin of each session. Let's say the quotepage name is "myQP". You can empty it by just opening and clicking the green trash can on quotepage toolbar (You could also probably do this with a scheduled scan in order to automate just before each session).

Now, let's assume the syntax for your scan is MA > MA_A AND MA.1 You'll just need to change the syntax to QP = "myQP" OR (MA > MA_A AND MA.1. You'll schedule this scan to occur every 5 minutes throughout the session (or however often you would like)...and you would setup the schedule to automatically save the resulting quotepage with a name of "myQP" (essentially overwriting itself).

Now, going back to schedule a scan that initialize the quotepage to empty...you could do this by creating the following scan CL < -100 (just a scan that results in no result). And then setup a schedule to run maybe at session open or 1 minute prior to session open....that runs this scan and auto-saves it's results to "myQP". That should leave you with an empty "myQP" quotepage at startup.

Now, let's say you would like to have a record of the time at which each symbol entered your quotepage. First, expand the initialization scan to CL < -100 AND SET(V#1, 0). This will initialize V#1 to 0 (we'll use V#1 later to record the time of entry).

Now, change your other scan to the following (a multi-line scan...scans can have mulitiple lines, separated by a semi-colon). IF(QP != "myQP" AND (MA > MA_A AND MA.1 MA_A AND MA.1 This should set V#1 to the TIME of the initial entry to the quotepage of each symbol. The results of any scan are always the results of the last "line" of the scan.

 

More Info Above Syntax

MA > MA_A AND MA.1This uses two different moving averages, "MA" and "MA_A". To learn more about using the same technical indicator multiple times in your syntax, see the support article In RTL how can I use the same technical indicator token multiple times within the same formula? Is there a way to use other RTL object names directly in the formula?

Anyway, the expression reads "short term MA is currently above long term MA, and the short term was below or equal to long term on previous bar". ".1" just means "1 bar back". ".2" means 2 bars back, etc.

QP = "myQP" OR (MA > MA_A AND MA.1This reads "the symbol is currently in the saved instanced of the quotepage "myQP" OR the symbol meets our MA crossover conditions we just explained above".

CL < -100This just says "closing price is less than -100"...which should always return FALSE for all symbols and therefore result in an empty quotepage...and thus initialize our quotepage to blank. which is what we were after.

IF(QP != "myQP" AND (MA > MA_A AND MA.1 MA_A AND MA.1First line sets V#1 to the current time if our symbol has not yet been placed in the quotepage (QP != "myQP") AND if the crossover conditions are now true. The second line just produces our scan results just as we described above....but now, our V#1 has been set to the time of entry.