Lines hidden under candles

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #81760 quote
    VonasiVonasi
    Moderator
    Master

    I am playing with an indicator idea that draws its own candles. I also want some lines shown on the indicator but they are hidden under the candles. Is there any way to have the lines on top of the candles?

    [attachment file=81761]

    Screenshot_3.png Screenshot_3.png
    #81765 quote
    NicolasNicolas
    Keymaster
    Legend

    Try to draw segments between each value of your curve and place this code just after the DRAWCANDLE instructions.

    Or use low alpha value to make your adapt the transparency of your custom candlesticks.

    #81773 quote
    VonasiVonasi
    Moderator
    Master

    Thanks Nicolas. I had already tried the transparency thing but did not like the results. The SEGMENT is the best solution. I knew there was a simple solution!

    Also a tip for others – keep the values in your RETURN line as well as drawing a segment and then you still get the labels on the chart.

    mp = ((hh - ll) / 2) + ll
    wa = weightedaverage[x]
    
    DRAWCANDLE(op,hh,ll,close) COLOURED(R,G,0) BORDERCOLOR(0,0,0)
    DRAWSEGMENT(barindex-1,wa[1],barindex,wa)coloured(0,0,255)
    DRAWSEGMENT(barindex-1,mp[1],barindex,mp)coloured(0,0,0)
    
    return mp COLOURED(0,0,0) style(line, 1) as "Median Price", wa COLOURED(0,0,255) style(line, 1) as "Weighted Average"

     

    [attachment file=81774]

    Screenshot_4.png Screenshot_4.png
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

Lines hidden under candles


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Vonasi @vonasi Moderator
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by VonasiVonasi
8 years ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 10/02/2018
Status: Active
Attachments: 2 files
ProRealCode ProRealCode
Loading...