Help on candles count - Strategy

#1
Strategy is to filter stocks fallen 40% (in Weekly view) for a rise of 10% atleast.

For this, I try to filter scrips
(i) 6 candles count of 40% fall and
(ii) -ve candles count of 5 to 6 from fallen candles ONLY.

Issue is -ve candles not getting counted from fallen 6 candles (but goes out of the targeted 6 candles and counts; expecting to count from 40% fallen candles ALONE):

Sample reference:


HTML:
last_6_Days_High = HHV(C, 6);
last_6_Days_Low  = LLV(C, 6);

negativeCandles= Sum(C<O,6); //Count the -ve candles from 6 days period; THESE 6 CANDLES HAVE TO BE FROM 40% IDENTIFIED CANDLES ALONE
negativeCandles_OK = (negativeCandles[BarCount -1]>4);   //Atleast 5 (max 6) -ve candles expected

Filter = 
last_6_Days_High > 1.40 * last_6_Days_Low  //HIGH vs LOW difference needs to be >40% (from 6 candles); -VE CANDLES NEED TO BE FROM 40% IDENTIFIED CANDLES ALONE..
AND negativeCandles_OK;
Can somebody kindly help for mingling -ve candles count and % change code (shown in the 'Filter' code part).
 
Last edited:

Similar threads