// https://www.prorealcode.com/topic/how-to-highest10volume-but-only-of-down-bars/ // Today's volume should be larger than the volume of the highest down day over the last 10 days DEFPARAM CumulateOrders = False // Cumulating positions deactivated maxDay = 40 maxDownDay = 0 maxDown = 0 FOR d = 1 TO maxDay DO r = Close[d] - Open[d] IF r < 0 and Volume[d] > maxDown THEN maxDown = Volume[d] maxDownDay = d ENDIF NEXT IF maxDownDay = 0 THEN maxDownDayVol = 0 ELSE maxDownDayVol = Volume[maxDownDay] ENDIF cVol2 = (Volume > maxDownDayVol)// sample screener code /////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// // Conditions to enter long positions indicator1 = CALL "SAR supp line"[2, 0.2, 10, 3] c1 = (close < indicator1) //or close= indicator2) IF c2 THEN SELL AT MARKET ENDIF // Stops and targets sET STOP pLOSS 50 //pTRAILING 20 // SET TARGET pPROFIT 10