Drawsegment 5 bars forward

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #188901 quote
    Sprattelgubbe
    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
    PeterSt
    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
    JS
    Participant
    Senior

    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
    Sprattelgubbe
    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.

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 Sprattelgubbe
3 years, 11 months ago.

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