volume greater than 50 period VolumeAvg times 2


Tags:
Category:
0
0

I want to scan stocks which current volume is greater than twice of last 50 days average.

I tried to add this line to scan, plot scan = volume is greater than 2 * VolumeAvg(“length” = 50).”Vol”;

It runs without error but the scan come back with zero fit.

Marked as spam
Posted by (Questions: 2, Answers: 0)
Asked on October 28, 2019 11:15 am
888 views
0
Private answer

I updated the question title to include the name of the study: VolumeAvg. In the screenshot below you will see how we begin to build this code using the Condition Wizard. Be sure to check the following video for details on how to use the Condition Wizard to build custom scans.

https://www.hahn-tech.com/thinkorswim-condition-wizard/

You will see in the screenshot below that the VolumeAvg study contains two plots. You chose the plot named "Vol". So you were basically checking if the current volume is greater than the current volume times 2. Which will never be true. Because current volume is always equal to current volume. To get this to work you need to select the other plot from the VolumeAvg study which is named "VolAvg".

Once we make this adjustment we can add the "times 2" to the code and we have this:

plot scan = volume is greater than VolumeAvg()."VolAvg" * 2;

This works as expected.

Attachments:
Marked as spam
Posted by (Questions: 37, Answers: 4086)
Answered on October 28, 2019 11:59 am