Capture OHLC and Plot Chart in Real-Time

Discussion in 'Automated Trading' started by arisdavid, Aug 13, 2011.

  1. arisdavid


    Hi All,

    I found an excel tool that accesses the Interactive Broker API via Active X from this website

    I have also attached the tool below.

    I was wondering if anyone can help or give guidance on how I can capture the Open, High, Low, Close data at regular intervals (e.g. every 5 minutes) and plot the OHLC in real time.


  2. You just need a period object to represent your time period and make this a key of a list, like a hashtable or arraylist then as the 5sec bars come in you check your key if it exists in your list you are still in the same time period else you start a new bar. Then you check your current bars HLCO and adjust accordingly.

    Very simple logic in any language.
  3. rosy2