I am looking to find largest volume on a down day in lookback period to use in filter condition. Below is the code i have written, please help.
// Calculating highest down volume day.
LookBack = Param( "LookBack", 10, 9, 15, 1 ); // Look back periods
DownVolume = 0;
for( i = 0; i <= LookBack; i++ )
if( Open[i] > Close[i])
DownVolume[i] = Volume[i];
// Filter for trend conditions
FC1 = C > MA( C, 10 ) AND Close > OPEN;
FC2 = MA( V, 10 ) > 100000;
FC3 = Volume > HHV(DownVolume, LookBack);
Filter = FC1 AND FC2 AND FC3;
AddColumn( Close, "Close", 1.2 );
@erukumk something like this
Thank you @portfoliobuilder, will try this.
Worked like a charm, Thank You!!
This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.