Announcement

Collapse
No announcement yet.

Reason for lack of yMin, yMax in setBarFgColor?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Reason for lack of yMin, yMax in setBarFgColor?

    Hi,

    Attempting to create a candlestick chart in non price sub chart. I've got it working with drawLineRelative but it's a less than optimal solution because a) drawLineRelative doesn't take into account the line thickness when drawing the on the Y axis resulting in the candles extending beyond the plotted top and the bottom values, b) the drawn lines don't scale along the x axis (thickness) with the price chart bars when you dynamically change the scaling with a mouse drag...

    I've re-implmenented the candlesticks using setBarBgColor, but this also is sub optimal as the candles are in the background of any studies you plotted before returning the values... eg I really want the candles in the foreground and not hidden behind any plots... I figure out that I could work around this limitation by breaking the study into two separate studies and ordering them to get the correct Z layering... but this is a sub optimal solution that I'd like to avoid if possible...

    I'm looking at setBarFgColor and wondering why it doesn't have the same parameters as setBarBgColor... the former has only color, index, whereas the latter has color, index, yMin, yMax... if setBarFgColor had those missing two parameters, I'd be golden...

    Anyone have any other ideas on how to plot candles on a non price chart in the foreground, give that we don't have a PLOTTYPE.CANDLE available and don't involve two separate studies?

    - Dan
Working...
X