Convert Plot text where volume forecast is reached to Scan


Category:
0
0

Pete,

I saw this study, https://www.hahn-tech.com/ans/plot-text-where-volume-forecast-is-reached/, you provided an answer to and wanted to see if it can be converted to a scan so that when the VF50% is reached I can see those stocks.

Thanks,

Carlos

Marked as spam
Posted by (Questions: 6, Answers: 17)
Asked on December 30, 2019 5:04 pm
62 views
0
Hi Pete, I added the plot statement below to convert the study to scan but I did not get any results throughout the day. However, when I looked at a few symbols like FCEL and PULM that the chart bubble was visible in 3 Min, 5 Min,15 Min time frames. Do I need to update this line in the code? def totaldayvolume = volume(period = “DAY”); #def totaldayvolume = volume(period = “3 Min”); from Day to 3Min so the scan picks up the symbols? Also, in the screenshots I captured the bubble was added before Market open so do we also need to adjust the time in the code? Lastly, is it possible to include something like within the last 3 bars? I was not sure how to attach my screenshots in this follow up comment. Thanks, Carlos
( at January 2, 2020 3:33 pm)
0
Private answer

Edit: Sorry but I didn't recognize that source code you reference uses secondary aggregation period. Scans do not allow the use of secondary aggregation periods. Furthermore, that code cannot be replicated for a scan. This is because the volume reported on the daily time frame is not the same as the volume reported on the intraday time frame. (we have a post here in the forum that explains the differences). https://www.hahn-tech.com/ans/how-to-calculate-volume-from-the-open/

Included below is the text of my original answer. I'm leaving this here in case at some point in the future Thinkorswim permits secondary aggregation periods in scans.

To convert that solution to a scan you simply remove the AddLabel() statements and the plot statements from the code. Then convert the def signal statement into a plot statement:

plot signal = totaldayvolume > vf50percent and premarketVol> 500000;

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on December 31, 2019 2:07 pm
0
Hi Pete, I added the plot statement below to convert the study to scan but I did not get any results throughout the day. However, when I looked at a few symbols like FCEL and PULM that the chart bubble was visible in 3 Min, 5 Min,15 Min time frames. Do I need to update this line in the code? def totaldayvolume = volume(period = “DAY”); #def totaldayvolume = volume(period = “3 Min”); from Day to 3Min so the scan picks up the symbols? Also, in the screenshots I captured the bubble was added before Market open so do we also need to adjust the time in the code? Lastly, is it possible to include something like within the last 3 bars? I was not sure how to attach my screenshots in this follow up comment. Thanks, Carlos
( at January 2, 2020 5:22 pm)
0
I have updated my answer to include an explanation.
( at January 3, 2020 8:53 am)