single line for daily highs and lows

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #157154 quote
    Grantx
    Participant
    Average

    See attached image. My code draws highs for prior days however I only want a single line drawn for each day, at the moment it draws a new line every time a new high is acheived. I dont know how to get it t0 draw a single highest high line for each day.

    //defparam drawonlastbaronly=true
    //test = Yesterday/100
    //defparam drawonlastbaronly=true
    test = DHigh(0)
    
    starttime = 110300 // 08h00
    endtime = 160300   // 09h00
    
    if day<>day[1] then
    startbar=barindex
    endif
    
    if time = starttime then
    startbar = barindex
    endif
    if time = endtime then
    endbar = barindex
    endif
    
    voffset = pipsize*1.2
    
    //DRAWTEXT(test, barindex, high+Voffset, Dialog,Standard, 20) COLOURED(255,255,255)
    drawsegment(startbar,DHigh(0),barindex,DHigh(0))coloured(128,128,128)
    
    RETURN //test as "prior day high"
    
    SPTRD-5-minutes.png SPTRD-5-minutes.png
    #157160 quote
    robertogozzi
    Moderator
    Master

    Uncomment line 1.

    Line 4 can be commented out as TEST is not used.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

single line for daily highs and lows


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Grantx @grantx Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
5 years, 1 month ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 01/10/2021
Status: Active
Attachments: 1 files
Logo Logo
Loading...