Support/resistance rectangle that extend on last bar

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #26002 quote
    RudyRudy
    Participant
    New

    Hi I was wondering if anyone could help me… I’m trying to write an indicator that will find a rectangle on the chart and extend it out to the current bar.  I want to draw supply and demand zones myself using the rectangle, but I want it to automatically extend (and stay updated) to current bar.

    Any ideas?

    #26131 quote
    NicolasNicolas
    Keymaster
    Legend

    Hi Rudy, I moved your query to a new specific thread.

    To draw a rectangle that will always be drawn to the last bar, you must use the BARINDEX instruction as the second X-axis coordinate, like this:

    Example of a support zone:

    x1 = barindex-50
    y1 = lowest[50](low)[1]
    
    DRAWRECTANGLE(x1,y1,barindex,y1) COLOURED(255,0,0,100)
    
    RETURN
    #26215 quote
    RudyRudy
    Participant
    New

    Thank you Nicolas!  Do you know how I would get the indicator to only apply this extension to a manually drawn rectangle?  I don’t want it to draw a rectangle on its own, only extend the ones I draw.

    #26225 quote
    NicolasNicolas
    Keymaster
    Legend

    It cannot be done by code I’m sorry. I did not read well your request of your first post sorry..

Viewing 4 posts - 1 through 4 (of 4 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

Support/resistance rectangle that extend on last bar


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Rudy @rudy Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 02/22/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...