Help creating breakout screener

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #252624 quote
    TheMik
    Participant
    New

    Hello, I’m new to ProRealTime and already see how powerful it is. I’d like help creating a breakout screener to find symbols that may be ready to break out. Maybe such an indicator already exists or something close that I can build on.

    Goal: detect setups where price forms equal swing highs or lows (potential breakout zones).

    This would be used for stocks.

    Requirements:

    • Scan on 1-minute timeframe
    • Use only today’s session, starting from premarket
    • Define a swing point (“peak”):
      • High peak: highest high vs 3 bars left and right
      • Low peak: lowest low vs 3 bars left and right
      • Confirm after 3 bars to the right (detection delay)
    • Equal high/low detection:
      • Round prices to 2 decimals (e.g. 216.351 → 216.35)
      • Group peaks by rounded price
      • Plot horizontal lines where 2 or more equal peaks occur
    • Detect only unbroken grouped peaks (price hasn’t crossed the line yet)

    There could be 3 or even more equal swings, which I would want to screen for, but for now just start with 2

    My goal is to automatically identify symbols on the chart that have unbroken equal highs or lows, which could signal potential future breakouts if the setup is valid — without manually checking too many symbols on a such small timeframe.

    This is how pattern look like visually what screener must find ( attached screenshots)

    <!– notionvc: 8e3e600f-ab89-42bb-a3a8-d5fb13ddb9b6 –>

    #252645 quote
    robertogozzi
    Moderator
    Master

    This is the indicator that plots GEEN and RED arrows:

    N          = 0.02 * Pipsize
    Peak1      = (high[3] > high[4]) AND (high[4] > high[5]) AND (high[5] > high[6])
    Peak2      = (high < high[1]) AND (high[1] < high[2]) AND (high[2] < high[3])
    Peak       = Peak1 AND Peak2
    PeakSignal = 0
    IF Peak THEN
       PeakHigh = high[3]
       PeakhBar = BarIndex[3*2]
       IF round(abs(PeakHigh - PeakHigh[1]),2) <= N THEN
          PeakSignal = max(PeakHigh,PeakHigh[1])
       ENDIF
    ENDIF
    Trough1      = (low[3] < low[4]) AND (low[4] < low[5]) AND (low[5] < low[6])
    Trough2      = (low > low[1]) AND (low[1] > low[2]) AND (low[2] > low[3])
    Trough       = Trough1 AND Trough2
    TroughSignal = 0
    IF Trough THEN
       TroughLow = low[3]
       TroughBar = BarIndex[3*2]
       IF round(abs(TroughLow - TroughLow[1]),2) <= N THEN
          TroughSignal = min(TroughLow,TroughLow[1])
       ENDIF
    ENDIF
    IF PeakSignal THEN
       DrawArrowDOWN(BarIndex[3],PeakSignal + Range[2])     coloured("Red")
       DrawSegment(BarIndex,PeakSignal,PeakhBar,PeakSignal) style(line,2) coloured("Red")
    ELSIF TroughSignal THEN
       DrawArrowUP(BarIndex[3],TroughSignal - Range[2]) coloured("Green")
       DrawSegment(BarIndex,TroughSignal,TroughBar,TroughSignal) style(line,2) coloured("Green")
    ENDIF
    RETURN

    please check whether the arrows are plotted correctly.

    This is the screener:

    N          = 0.02 * Pipsize
    Peak1      = (high[3] > high[4]) AND (high[4] > high[5]) AND (high[5] > high[6])
    Peak2      = (high < high[1]) AND (high[1] < high[2]) AND (high[2] < high[3])
    Peak       = Peak1 AND Peak2
    Signal     = 0
    IF Peak THEN
       PeakHigh = high[3]
       IF round(abs(PeakHigh - PeakHigh[1]),2) <= N THEN
          Signal = 2
       ENDIF
    ENDIF
    Trough1      = (low[3] < low[4]) AND (low[4] < low[5]) AND (low[5] < low[6])
    Trough2      = (low > low[1]) AND (low[1] > low[2]) AND (low[2] > low[3])
    Trough       = Trough1 AND Trough2
    IF Trough THEN
       TroughLow = low[3]
       IF round(abs(TroughLow - TroughLow[1]),2) <= N THEN
          Signal = 1
       ENDIF
    ENDIF
    SCREENER[Signal AND (high <> low)](Signal AS "1=Up,2=Down")
    Iván González thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Help creating breakout screener


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
TheMik @themik Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
3 months, 3 weeks ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 10/15/2025
Status: Active
Attachments: 4 files
Logo Logo
Loading...