Daily Exploration Filters

Hi All. I've coded up what I believe is the correct formula to run a daily exploration per the following criteria:

  • Close price is greater than $1, and less than $20;
  • The volume today is greater than 5,000,000
  • The MA Volume over the last 15 days is greater than 5,000,000
  • Close price today is the highest close price over the last 20 days.
    Universe is the Russell1000.

My attempt at the code:

Filter = C > 1 AND C < 20;
AddColumn( C, "Close" );
Filter = V > 5000000;
Filter = MA(V,15) > 5000000;
AddColumn( V, "Volume" );
HighBreak = C > HHV(C,20);
Filter = HighBreak;
AddColumn( HighBreak, "20 High Break" );

When I run each section alone, i.e:

Filter = C > 1 AND C < 20;
AddColumn( C, "Close" );

in the Analysis window it appears to work ok, although due to the current market conditions I'm not sure about the 'HighBreak' section (I tried a few different values but it returned no result).
However when I combine it and run the analysis it returns values outside the ranges / values requested?

Greatly appreciate any insight or direction on this.

Much appreciated. DazN

Filter = (C > 1 AND C < 20) AND V > 5000000 AND C > HHV(C,20);

Should be HighBreak = C == HHV(C,20); or HighBreak = C > Ref(HHV(C,20), -1);

1 Like

Thanks tosslem, much simpler coding to use.

Hi TrendSurfer, I wasn't aware of the double = code so very much appreciated.

1 Like

What's important for you to understand is that each time you re-assign a variable the previous value is discarded. So it's not just a matter of the code being simpler.

1 Like

Ok noted, thanks for the info.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.