Progressive Volume Intraday Stock Scan


Category:
0
0

Hi Pete,  Is there a way to code a stock scanner so that at different times of day that it will adjust the amount of volume it looks for?   I trade penny stocks and want liquid but not to liquid stocks to trade.  At 9 I want at least 100k traded, then at noon at least 300k then 3 at least 500k then 3:30 at least 750k.  Is this possable?

Marked as spam
Posted by (Questions: 2, Answers: 2)
Asked on October 13, 2019 3:38 pm
126 views
0
Scans are always based on Eastern time zone. Please review the times you entered and let us know if those are the actual Eastern times you want to use. If Eastern, your first time is at 9 am and this would be during premarket trading hours. Also, if we require 300,000 shares by noon (12:00) Eastern, then do you want the scan to return true if run at one minute after 12:00? This was implied in your statements but not exactly declared. Last question. If running the scan during the last hour of the day, should each of these time based volume filters have to be true or just the last one at 3:30 pm? Bet you didn't realize there was so many different ways to slice this.
( at October 14, 2019 11:13 am)
0
Yes, EST is my time zone. The first scan can begin at 10 am. At 10 am I am looking for only stocks that have at least 100k traded for the day so far. Then as we progress through the day at 2:30 the list should then only show stocks that have traded at least 500k in volume. The scan needs to be ongoing from 10 am all the way to the close of the day updating constantly. Have I provided you with enough information?
( at October 15, 2019 9:47 am)
0
Private answer

I am a bit confused. You confirmed that your time zone is Eastern, then proceeded to provide times that were not listed in your original request. Then left out one of the three times you originally requested. So I have provided a solution with three times. Each time can be adjusted as needed. The volume threshold for each of the three times can also be adjusted as needed.

Important note: All times when running scans must be set to Eastern time zone. The scan engine in Thinkorswim uses ONLY Eastern time zone and does not adjust to individual user's time zones.

input timeOne = 1000;
input volumeOne = 100000;
input timeTwo = 1200;
input volumeTwo = 300000;
input timeThree = 1430;
input volumeThree = 500000;
def newDay = GetDay() <> GetDay()[1];
rec accumulatedVolume = if newDay then volume else accumulatedVolume[1] + volume;
def requiredVolumeForTime;
if SecondsFromTime(timeOne) >= 0 and SecondsTillTime(timeTwo) > 0 {
requiredVolumeForTime = accumulatedVolume > volumeOne;
} else {
if SecondsFromTime(timeTwo) >= 0 and SecondsTillTime(timeThree) > 0 {
requiredVolumeForTime = accumulatedVolume > volumeTwo;
} else {
if SecondsFromTime(timeThree) >= 0{
requiredVolumeForTime = accumulatedVolume > volumeThree;
} else {
requiredVolumeForTime = no;
}
}
}
plot scan = requiredVolumeForTime;

FYI, I probably should have required this to be submitted as a custom project request. I have charged clients money for less complex solutions than this one. I hope they forgive me for giving this one away.

Marked as spam
Posted by (Questions: 37, Answers: 4086)
Answered on October 15, 2019 10:18 am
0
After review, I found that my first post times were not the best. That is why I had changed it in the 2nd. Sorry for any confusion.
( at October 15, 2019 11:03 am)
0
Pete, I am more than happy to pay you for this work. As a matter of fact I want you to add something to it. Please let me know how I should pay and I will do so. Sorry for the delayed response. Both of my kids are ill with bad lung infections and that has drawn my attention away.
( at October 18, 2019 12:32 pm)
0
Hope everyone gets well soon and also that it does not spread. Take care of family first, no rush on my account, please. When you are ready you can get details about submitting custom project requests here: https://www.hahn-tech.com/about/
( at October 18, 2019 1:09 pm)