Connect 3 lows

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

    Hi guy’s !

    I’m able to connect with a segment 2 lows between them by zigzag. Here’s the code :

    zz = zigzag[2](low)
    creux = zz[0]>zz[1]and zz[1]<zz[2]
    b=zz[1]
    
    if creux then
    oldbar=barindex-1
    Price = low[1]
    DRAWARROWUP(oldbar, b-0.1)
    DRAWSEGMENT(oldbar, Price[0], oldbar[1], Price[1])
    endif
    return
    

     

    But now I search to connect 3 lows together with a segment (by zigzag). So if the segment between the lows 1 and 2 and the segment between the lows 2 and 3 have pretty much the same angle then we draw a line connecting the 3 lows.

    How can I do this check ? :/

    Graph.jpg Graph.jpg
    #101573 quote
    NicolasNicolas
    Keymaster
    Legend

    Without data arrays, a rough idea is to measure the rate of change (slope) between 2 lows (divide the price distance by the bars quantity between them). If the next slope is in the same range of value (to be defined), then the 2 extreme lows should be aligned.

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

Connect 3 lows


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
MerryArter @merryarter Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 06/27/2019
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...