RTRParticipant
New
Good morning,
What indicator/code to use to filter charts with many oscillations on price? I attach a picture with the type of chart I would like to filter out in the results I get with the Proscreener. I want to filter out those charts with too many oscillations (too many strong peak and valleys like on chart 2 on my picture) in favor of charts with smoother movements (like on chart 1 on my picture).
I mean, when we use the Proscreener with certain indicators and filters we can get like 80 results (80 stocks) and then you have to go one by one looking at the charts just to filter out 40-50 results that have too many sharp movements (in the daily or hourly timeframes). Because in the end I know that I am not going to trade these kind of charts it would be good to know a way to filter them out.
What would you do or what indicators or code would you use on Proscreener to filter out these kind of charts? Because I guess most people would like to avoid these kind of charts because they are more stressful (too many daily or hourly oscillations).
Thank you in advance,
Best Regards.
This indicator will try to spot PEAKS and VALLEYS:
Once PeakTally = 0
Once ValleyTally = 0
Body = abs(close - open)
BodyAVG = average[10,0](Body)
Peak = (high[1] > high[2]) AND (high < high[1])
Valley = (low[1] < low[2]) AND (low > low[1])
IF Peak THEN
PeakTally = PeakTally + 1
ENDIF
IF Valley THEN
ValleyTally = ValleyTally + 1
ENDIF
IF Body[1] > BodyAVG[1] THEN
IF Peak THEN
DrawText("#PeakTally#",BarIndex,high[1] + range[1])
ELSIF Valley THEN
DrawText("#ValleyTally#",BarIndex,low[1] - range[1])
ENDIF
ENDIF
RETURN
and this is the screener to filter those results with more than 1 PEAK and 1 VALLEY in the last 20 bars:
Once PeakTally = 0
Once ValleyTally = 0
Body = abs(close - open)
BodyAVG = average[10,0](Body)
Peak = (high[1] > high[2]) AND (high < high[1]) AND (Body[1] > BodyAVG[1]) AND (close <> open)
Valley = (low[1] < low[2]) AND (low > low[1]) AND (Body[1] > BodyAVG[1]) AND (close <> open)
IF Peak THEN
PeakTally = PeakTally + 1
ENDIF
IF Valley THEN
ValleyTally = ValleyTally + 1
ENDIF
Cond = (summation[20](Peak) < 2) AND (summation[20](Valley) < 2)
SCREENER[Cond]
RTRParticipant
New
I will try them, thank you Roberto.