Open source Java Charting??

Discussion in 'Trading Software' started by Bladen, Feb 9, 2005.

  1. Bladen


    I want to build charting program in Java so it do exactly what I want. I dont need to reinvent the wheel, is such available? Perhaps I can use some, or part of code or will be useful as a guide.
  2. Baron

    Baron ET Founder

  3. qtip


    Do any of you know if you can also program your strategy so it gives signals (i.e. Tradestation)?

    Thanks in advance!
  4. Yes, I think jfreechart is probably the pick of the bunch. It is capable of producing some very nice looking charts and there are many, many options.

    However, it is not suitable in it's standard form for real time charts. It's author freely admits this and it is not a design goal of the project. There is no inbuilt mechanism for repainting the last bar. The whole chart is redrawn on data changed events.

    I've managed to work around this without changing the jfreechart source code to produce real time charts with decent performance eg 30++ charts on a modest Linux box. It's not perfect, but pretty good. PM me if you want some tips on how to go about this.

    Attached is a sample 10 min chart. The right edge is a bit odd because of a small issue with the way the timeline is setup.
  5. the chart
    • vrts.png
      File size:
      52.1 KB
  6. can you post an example of using jfreechart in this?
  7. I thought IB used jfreechart for their real-time charting? I could be making it up though.

    You might want to look at the source for Eclipse Trader on sourceforge for the charting code. Not sure if it is in an SWT component or not.

    Good luck.

    [EDIT: I see this is a very old thread that was revived by InamicPH]

  8. Yes, TWS uses JFreeChart, but they could do better with it - both in terms of appearance and performance.

    Here is a sample from my own charting application using JFreeChart. The second from top subchart is a MarketDelta type plot. The horizontal lines are various MP levels and pivots.

    This plot uses a custom renderer and dataset that I wrote.

    I took me quite a bit of effort to get good rendering performance - there are several issues, and it is probably also platform dependent (eg X11 or Windows). The most important thing is to be able to redraw the last bar evey tick. JFreeChart does not provide that ability so you need to do it yourself.

    However, performance now is fine. I can run any reasonable number of charts (20 -40) and have digital TV running on another screen as well as TWS - on an old Socket A Athlon 2800+, and the thing is still 40% idle. So much for Java being slow.

    Overall, I think JFreeChart is pretty good and highly configurable - you can make just about any chart in just about any style with a bit of effort. But out of the box, it is not designed for real time charting, though it can be adapted to it.
  9. Blogtrader is different, or ?
    Pure java, whatever that means.
    #10     Sep 1, 2006