Shinobi chart can't draw candlestick (Blocker)


#1

Hi guys,

Currently i have a problem with Shinobi chart. The chart can not drawing a line or any candlestick if we have: open = high = low = close.
Ex: open = high = low = close = 387.15 -> The chart can’t draw it and will show empty in the chart at this date.

I want if i have a candle with open = high = low = close, we will draw ( - ) line.

So how i can draw a line ( - ) replace for white space? If i have a case above.
Thanks!


#2

Tasumi - may I please ask are you using our iOS or Android charts library?

Thanks,

Kai


#3

Thank you for your reply.

I’m use iOS charts library and drawing candlesticks serie.


#4

This is something our API addresses, you’ll be glad to hear - set candlestickSeries.showFlatCandlesticks = YES when you create it and that should solve your problem :slight_smile:


#5

@rippling: Thank you very much. So i have an other problem.

If i have a candlestick with: open = high = close = low = 375.55 (Flat candlestick).
How to custom color for normal candlestick and Flat candlestick.
Currently i set color with my solution but it doesn’t correct. So how to customize candlestick color?

float open = [[point sChartYValueForKey: SChartCandlestickKeyOpen] floatValue];
    float close = [[point sChartYValueForKey: SChartCandlestickKeyClose] floatValue];
    float priorOpen = [[prevPoint sChartYValueForKey: SChartCandlestickKeyOpen] floatValue];
    float priorClose = [[prevPoint sChartYValueForKey: SChartCandlestickKeyClose] floatValue];

    UIColor *color;
    if (close > open) {
        color = [UIColor greenColor];
    }
    else if (close == open) {
        color = (priorClose >= priorOpen) ? [UIColor greenColor] : [UIColor redColor];
    }
    else {
        color = [UIColor redColor];
    }
    newStyle.outlineColor = color;
    newStyle.stickColor = color;

#6

Resolved


#7

Hello @tasumi and Shinobi Control support,

I’m having the same question as Tasumi previously had. However, after setting set candlestickSeries.showFlatCandlesticks = YES I still can’t see it showing any difference. I’m wondering if I’ll need to customize flat candlestick color? If yes, how can I do that? After checking the API doc what I can find are only rising and falling colors.

Thanks in advance.


#8

Resolved.