volume greater than 50 period VolumeAvg times 2


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
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.


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.

Marked as spam
Posted by (Questions: 39, Answers: 3734)
Answered on October 28, 2019 11:59 am