What indicator/code to use to filter charts with many osc

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #227723 quote
    RTR
    Participant
    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.

    Filtering-certain-charts-with-ProScreener.jpg Filtering-certain-charts-with-ProScreener.jpg
    #227764 quote
    robertogozzi
    Moderator
    Master

    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]
    RTR thanked this post
    x-4.jpg x-4.jpg
    #227806 quote
    RTR
    Participant
    New

    I will try them, thank you Roberto.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

What indicator/code to use to filter charts with many osc


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
RTR @rtr Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by RTR
2 years, 1 month ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 02/09/2024
Status: Active
Attachments: 2 files
Logo Logo
Loading...