Is it possible to edit the formula of Candle Stick Chart?

#1

i have a question of the customise the Candle Stick.

Since different country has different style to show the Candle Stick Chart.

In China, they will compare Each Candle Stick’s Open, High, Low,Close with Previous Candle Stick for decide the Candle Stick is “Filled” or “Transparent”

Please take a look the following image which is a equation formula of the chart i am talking about.

I really hope that it can apply to ShinobiCharts, because ShinobiCharts’s performance is really good.

Thank you very much.

#2

You can certainly style your candlesticks in the way you describe

Our SChartCandlestickStyle class inherits from SChartOHLCStyle class, on which there are four colours - risingColor, fallingColor, and a gradient colour for each.

In this case, you would set risingColor and risingColorGradient to clear, and fallingColor and fallingColorGradient to whatever fill colour you desire for the filled candlesticks.

I hope this helps!

Best,

Simon

P.S. I’ve replied to your email about this too

#3

thx for your reply.

But there still have a question.

Even i can set different style for the Candle Stick by changing the risingColor, fallingColor.

Can i change the compare Value formula?

Because i have to compare a record’s close value and Open value to define it is HOLLOW or FILL.

Define the color of  risingColor , fallingColor and the Gradientgma is not enough to help show the following image

so is that possible to edit the formula for my case?

Thank you very much.

#4

At the moment, the formula for deciding if a candlestick is rising or falling is fixed:

Close >= Open = Rising

Close < Open = Falling

We don’t compare candlesticks to those either side, and the formula is not accessible for alteration. However, I’m not sure why you are unable to create your chart using this formula, since it matches the one you posted above?

Simon

#5

Thank you for your reply

WHy we need to compare Previous’s record?

Answer:** Because  the Close’s value from Yesterday  is not equal to  Current Day’s Open Value.**

So we CAN"T  only compare one day’s record to define rising or falling.

Some company will have different non-trading hour,

For example:   CompanyA stop trading at 4:00 am, then open again at 7:00am.

In this case, **  the Close’s value from Yesterday  is not equal to  Current Day’s Open Value.**

It is important to define the candle stick is  HOLLOW or FILL  by comparing the current candle stick with previous candle stick.

Candle Stick Chart is not only showing Rising or Falling , it also need to show Hollow and fill by compare their value.

OKay,  Here is the step for compare the value

STEP 1 :

//if there has no previous data to compare

//then the first candle stick will compare with itself

IF(  CLOSE_VALUE_FROM_CURRENT> OPEN_VALUE_FROM_CURRENT)

{

//show RISING COLOR

}

ELSE IF(  CLOSE_VALUE_FROM_CURRENT<=OPEN_VALUE_FROM_CURRENT)

{

//show FALLING COLOR

}

//If there has previous data to compare

//then we need to compare with yesterday’s data

IF(  CLOSE_VALUE_FROM_CURRENT> CLOSE_VALUE_FROM_YESTERDAY)

{

//show RISING COLOR

}

ELSE IF(  CLOSE_VALUE_FROM_CURRENT< CLOSE_VALUE_FROM_YESTERDAY)

{

//show FALLING  COLOR

}

ELSE IF(  CLOSE_VALUE_FROM_CURRENT== CLOSE_VALUE_FROM_YESTERDAY)

{

//show YESTERDAY CANDLE STICK COLOR

}

STEP 2 :

//  !!!

// IMPORTANT PART

//  !!!

//DEFINE   the candle stick is Hollow or FILL

IF(  CLOSE_VALUE_FROM_CURRENT>= OPEN_VALUE_FROM_CURRENT)

{

//Candle stick is   HOLLOW

}

ELSE IF(  CLOSE_VALUE_FROM_CURRENT < OPEN_VALUE_FROM_CURRENT)

{

//Candle stick is   FILL

}

then it is completely showing a candle stick

I hope you understand the problem i am facing

thank you

#6

or is there has any way to overwrite the existing method which is defining the chart is rising or falling?