Support Resistence Test

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

    Hi there,

    So, i’m trying to make this ProScreener code to identify when the Resistence and the Support have not been broken

    To try and archive this, I tried taking this code here and adapted it into a ProScreener Code (code below)

    Problem is, this only identifies patterns that have -already- happened in past candles, so with their support and/or resistence already surpassed.

    How can I edit this so that it shows me those instances where neither the support nor the resistence have been broken yet?

    period = 20
    boxheight = 20
    hh = highest[period](high)
    ll = lowest[period](low)
    
    if hh-ll <= boxheight*pointsize then
    for i = 0 to period do
    if high[i]=hh then
    x2 = barindex[i]
    endif
    if low[i]=ll then
    x1 = barindex[i]
    endif
    next
    screener [ABS(x2-x1) >= period]
    endif
    #187490 quote
    robertogozzi
    Moderator
    Master

    Try this indicator to plot the lines:

    DEFPARAM DrawOnLastBarOnly = true
    Periods = 20
    hh      = highest[Periods](high[1])
    ll      = lowest[Periods](low[1])
    DrawSegment(BarIndex[Periods],hh,BarIndex+1,hh) coloured(0,0,255,255) style (Line,3)
    DrawSegment(BarIndex[Periods],ll,BarIndex+1,ll) coloured(255,0,0,255) style (Line,3)
    RETURN //hh AS "Resistance",ll AS "Support"

    and this screener:

    Periods = 20
    hh      = highest[Periods](high[1])
    ll      = lowest[Periods](low[1])
    SCREENER[(close <= hh) AND (close >= ll)]
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Support Resistence Test


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
Hatsune39 @hatsune39 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
4 years, 1 month ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 02/03/2022
Status: Active
Attachments: No files
Logo Logo
Loading...