16 Replies Latest reply: May 26, 2015 3:16 AM by Joaqu�n L�zaro

Hi,

I need to create a graph with candlestick, I try using example but dont work.

For example I have the following data:

DateInvoice NumberAverage Price
14/01/201411.70
14/01/201421,55
28/01/201432.50
05/02/201442.25
18/02/201483.10
15/04/2015202.85
18/04/2015223.00
05/05/2015322,78
07/05/2015722,83

I need to have i the diagram one candle every MonthYear and the candle have:

- the higher candle's shadow limit is the higer Average Price of the MonthYear (for example jan 2014 = 2,50);

- the higher limit of the body of candle is the last Average Price, if the last Average Price is higher of the first Average Price of the

MonthYear, or the first Average Price, if  if the last Average is lower of the first Average Price of the MonthYear;

- the lower limit of the body of candle is the first Average Price, if the first Average Price is lower of the last Average Price of the

MonthYear, or the last Average Price, if the first Average Price is higher of the last Average Price of the MonthYear;

- the lower candle's shadow limit is the lower Average Price of the MonthYear (for example jan 2014 = 1,55);

- the candle's color is green when if the last Average Price is higer of the First average price, red if the last average price is lower of the

first average price.

Pleaee anyone have any idea?

Thank you very much.

Best regards.

• ###### Re: Question about candlestick.

or look for BoxPlot charts in the community

Hope it helps you,

Joaquín

• ###### Re: Question about candlestick.

or look for BoxPlot charts in the community

Hope it helps you,

Joaquín

• ###### Re: Question about candlestick.

Hi,

thank you very much JoaquinLR but my problem was find the data (max, min, etc.).

Anyway I do this Yesterday.

Best regards.

• ###### Re: Question about candlestick.

Hi,

I try but this dont work for my request.

I dont need day number but the trend MonthYear with the candle.

• ###### Re: Question about candlestick.

Can you post a qvw showing what you've done already? It might be easier to work on what you've done rather than start from scratch.

-Rob

• ###### Re: Question about candlestick.

Hi,

I post the example, I think that what I do i all wrong, I dont see nothing.

Tahnk you again.

• ###### Re: Question about candlestick.

I need to have this (with the example, I do this chart with MS Excel):

Maybe this is non possible with QlikView?

• ###### Re: Question about candlestick.

Only a thing, for me is good if candlestick have not the shadow.

Thank you.

• ###### Re: Question about candlestick.

Here's a modification to your sample to get you started. It needs a few tweaks to match all your rules, but at least it's displaying now. I corrected a few problems in the sample you uploaded.

1.The script DecimalSep was set to ',' (comma) but your sample data used fullstop. So the Average price was not being read as a number,

2.The calculated dimension to create MM/YYYY was incorrect. II made the value in the script instead.

3. Your chart expressions had errors. I recommend you always look at each expression in the expression editor to see the message "Error(s) in expression" or "Expression OK".

4. I used the FirstSortedValue() function in my solution with DISTINCT. Unfortunately, the syntax check flags DISTINCT as an error, even though it's not. You won't be the first user frustrated by the errors in the syntax checker.

-Rob

• ###### Re: Question about candlestick.

Thank you very much.

Sorry if the example was not perfect, I do this in a few minutes.

Now I have another problem, I dont have Average price so I can calculate this in the script but I have average price = 0 also...

Okay, now I fix this.

Thank you again!

• ###### Re: Question about candlestick.

Sorry but I'm here again.

I must to use the first value with FirstSortedValue(DISTINCT [Average Price], Date) but I need this is higher zero...

Thank you very much.

• ###### Re: Question about candlestick.

I have solved!

With a SET analysis!

min({<[Average Price]= {">0"}>}DISTINCT [Average Price])

Thank you!

• ###### Re: Question about candlestick.

Excellent. Congratulations!

-Rob

• ###### Re: Question about candlestick.

Thank you very much!

I attach your file file that I have change with color and fix the problem of Average Price = 0.

I dont know if I can change colours to Middle line and whiskers but this is good, I think!

Thank you again!

• ###### Re: Question about candlestick.

Hi Giuseppe:

I wrote this message yestarday but it was under moderation !!!!

I'm glad you have solved it.

See you

Joaquín