Start count back

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #196789 quote
    oyinloyeaoyinloyea
    Participant
    Veteran

    I want to create an indicator on price that will  count back 100 bars and draw a  line.

    Thanks in advance

    #196812 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    It will draw the line at the close of bar 101:

    DEFPARAM DrawOnLastBarOnly = True
    N = 100
    IF BarIndex > N THEN
       DrawSegment(Barindex[100],close[N],Barindex + 2,close[N])
    ENDIF
    RETURN
    oyinloyea thanked this post
    #196914 quote
    oyinloyeaoyinloyea
    Participant
    Veteran

    is it possible to be a vertical line instead of horizontal from the begining of the loopback period? Thanks in advance

    #196915 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Replace line 4 with:

    DrawVline(Barindex[100])
    oyinloyea thanked this post
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

Start count back


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
oyinloyea @oyinloyea Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 07/05/2022
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...