yang-wei / rd3

react + d3
https://yang-wei.github.io/rd3/
MIT License
319 stars 83 forks source link

Anyway I can overlay lines on a candlestick? #18

Closed andrerpena closed 8 years ago

andrerpena commented 8 years ago

First off, thanks for the good work. Candlesticks are often displayed with overlaying straight lines, to express "stop loss" and "confirmation level". Can I do that with RD3? Thank you!

yang-wei commented 8 years ago

@andrerpena I would love to help you can you show me a picture or example ?

andrerpena commented 8 years ago

Absolutely. Thanks for your support.

When people look at candlesticks, they're looking for patterns. This is one of the most popular "optimistic" patterns, the Bullish Harami: http://www.candlesticker.com/Pattern.aspx?lang=en&Pattern=2102

Every pattern has 2 "levels". One to confirm that the pattern was right, and another to confirm that it was wrong. These levels are almost always represented as straight horizontal lines with a price label. Example:

image

I strongly believe that people interested in candlesticks are also interested in these levels. I appreciate again that you are willing to help. If you have any question please let me know.

Thanks.

yang-wei commented 8 years ago

Do you mean something like the example showing in http://techanjs.org/ ?

From what I understand, you need the 2 horizontal lines which can be dragged and showing the price label simultaneously ?

We currently do not support this kind of API but I can make it if it is useful =)

andrerpena commented 8 years ago

Well.. Draggable lines would be quite useful but I wouldn't do this at first because of complexity. Every home broker allows you to dynamically overlay lines, including lines at a certain angle. They are normally draggable, and the angle can be modified by the user. Besides, the user lines "snap" to prices. That's awesome but complex.

For a read-only candlestick, I'd say that the capacity of displaying horizontal lines with price labels are the MVP. Exactly like in the image above.

If that's not THAT COMPLEX, I can try to help, but I can't guarantee it, because my schedule is quite busy lately.

Thank you very much @yang-wei .

yang-wei commented 8 years ago

Forgive my knowledge about candlestick chart, will study it and let you know my opinion =)

yang-wei commented 8 years ago

I read through this and think that this will probably be a very good addition to candle stick chart.

However my current priority for this library is polish up documentation and cleaning up code.

If you are willing to take over then I will be happy to guide =)

yang-wei commented 8 years ago

feel free to reopen if you would like to take over =)