Lines hidden under candles

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #81760 quote
    Vonasi
    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]

    #81765 quote
    Nicolas
    Keymaster
    Master

    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
    Vonasi
    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]

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

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 Vonasi
7 years, 4 months ago.

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