3 ascending tops and 3 descending bottoms

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #174339 quote
    phanzphanz
    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
    robertogozzirobertogozzi
    Moderator
    Legend

    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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 robertogozzirobertogozzi
5 years, 1 month ago.

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