Drawing a segment on BARINDEX

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #122532 quote
    Peter KisellPeter Kisell
    Participant
    Junior
    Hi, I have set DEFPARAM CalculateOnLastBars = 10 in my code. As an example I would like to do DRAWSEGMENT(BARINDEX – 20, 100, BARINDEX, 100) This does not render because of the CalculateOnLastBars. Is there any way to draw something on a bar that is further away than what I have set CalculateOnLastBars? /Peter
    #122537 quote
    NicolasNicolas
    Keymaster
    Legend

    >> Please update your country flag in your profile. Thank you šŸ™‚ <<

    Hi Peter, that’s not possible. With a CalculateOnLastBars = 10, the last 10 bars only are loaded into history and therefore you can’t use the other ones displayed on your price chart.
    Peter Kisell thanked this post
    #122539 quote
    Peter KisellPeter Kisell
    Participant
    Junior
    Thank you so much for swift reply. Is there any way to draw something of a line extending to left from BARINDEX. If I choose DRAWLINE it covers everything even right side of BARINDEX.   /Peter
    #122600 quote
    NicolasNicolas
    Keymaster
    Legend
    That’s only possible in version 11 with a third X coordinate:
    defparam calculateonlastbars=20
    
    DRAWSEGMENT(barindex[0], close[0], barindex[5], close[5],barindex[10]) 
    
    return
    Peter Kisell thanked this post
    #122620 quote
    Peter KisellPeter Kisell
    Participant
    Junior
    Thank you!
Viewing 5 posts - 1 through 5 (of 5 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

Drawing a segment on BARINDEX


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by Peter KisellPeter Kisell
6 years, 6 months ago.

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