Drawsegment 5 bars forward

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #188901 quote
    SprattelgubbeSprattelgubbe
    Participant
    Junior

    Hi,

    I would like to draw a segment at the 5 min bar 12:00 – 12:05 at the high +2 and at the low -2

    and I would like it to be 5 bars forward in time and a horisontell line

    #188903 quote
    PeterStPeterSt
    Participant
    Master

    I would say that this is drawing at BarIndex+5.
    But you then also would need to set the right margin of the chart to 5 bars (this is by default set at 2).

    If you need more help, just ask (others will be able to help too).

    Sprattelgubbe thanked this post
    #188930 quote
    JSJS
    Participant
    Master

    Hi @Sprattelgubbe,

    DefParam DrawOnLastBarOnly = True
    DrawSegment(BarIndex,High+2,BarIndex+5,High+2)Coloured(0,255,0)
    Drawsegment(BarIndex,Low-2,BarIndex+5,Low-2)Coloured(255,0,0)
    Return
    
    Sprattelgubbe thanked this post
    Schermafbeelding-2022-02-27-om-08.20.31.png Schermafbeelding-2022-02-27-om-08.20.31.png
    #188951 quote
    SprattelgubbeSprattelgubbe
    Participant
    Junior

    Thank you both for your answers, now it works as I wanted it to do.

    I was pretty close in the code I had done, but you nailed it.

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

Drawsegment 5 bars forward


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by SprattelgubbeSprattelgubbe
4 years, 6 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 02/26/2022
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...