3 ascending tops and 3 descending bottoms

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #174339 quote
    phanz
    Participant
    Average

    Hi all,

    Is there a code in PRT to detect

    -Triple ascending tops A,B,C, where C>B>A ;

    and also

    -Triple descending bottoms A,B,C, where C<B<A;

    within a specified look back interval?

     

    Any advice or guidance for the codes will be appreciated.  Thank you in advance.

     

    Cheers

    #174461 quote
    robertogozzi
    Moderator
    Master

    There you go:

    p   = 20   //change to widen or narrow results
    //
    T1  = highest[p](high)
    T2  = highest[p](high[p])
    T3  = highest[p](high[p*2])
    Top = T1 > T2 AND T2 > T3
    //
    B1  = lowest[p](low)
    B2  = lowest[p](low[p])
    B3  = lowest[p](low[p*2])
    Bot = B1 < B2 AND B2 < B3
    //
    x   = 0
    IF Top THEN
       x = 1
    ELSIF Bot THEN
       x = 2
    ENDIF
    SCREENER[x](x AS "1=↑, 2=↓")
    phanz thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

3 ascending tops and 3 descending bottoms


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
phanz @phanz Participant
Summary

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

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 07/29/2021
Status: Active
Attachments: No files
Logo Logo
Loading...