Help creating a drawline indicator

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #163032 quote
    RobinJKRobinJK
    Participant
    Junior

    How would i go about creating a drawline that draws a line from the 20 period moving average 20 periods ago to the current moving average 20 periods. and have it update (re-draw the line) every new period. Without causing infite lines drawn issue?

    willi thanked this post
    #163039 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    There you go (not tested):

    Defparam DrawOnLastBarOnly = True
    MA20 = average[20,0](close)
    Drawsegment(Barindex[19],MA20[19],BarIndex,MA20)
    Return
    willi thanked this post
    #163052 quote
    RobinJKRobinJK
    Participant
    Junior

    Thank you, very helpfull.
    haha i really complicated things.

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

Help creating a drawline indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
RobinJK @robinjk Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by RobinJKRobinJK
5 years, 6 months ago.

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