15 second data

Hello Amibroker Community. AmiBroker receives real OHLC data from Interactive Brokers in real time and displays it correctly on my display chart. However the BRK5 binary format that stores historical data uses a record structure where Interactive Brokers 15-second feed writes only the last trade price (close) into all four OHLC fields. The chart renders correctly from the live feed. The stored file loses the intrabar range and I need that OHLC range data for a trading system that requires actual OHLC data . Question: Is there any way that I can configure Amibroker to store 15 second OHLC data as shown in my data window display?

Amibroker stores OHLC automatically. You don’t need to do anything. If only data actually have OHLC records ( see Symbol -> Quote Editor ) exactly same data is stored in the database.

What you might be confused is your assumption that IB plug-in delivers 15 second data. It doesn’t. It only supports 1 minute and tick (with limitations as IB is not tick-by-tick feed)

Second bars are available from IQFeed however. And they just work out of the box. Don’t need to do anything.

Hello Tomasz, are you saying that I should only use 1 minute data and that the BRK5 binary format will store actual OHLC data in the file, if its 1-minute data is coming out of Interactive Brokers?

I don’t know if by saying “BRK5” you mean AmiBroker own data files. Amibroker data format is proprietary, and it is not intended to be read by any software other than AmiBroker. It is also subject to change and you should not rely on any specific layout of binary file.

But having said that, as I explained earlier, AmiBroker saves OHLC data automatically. No action from user is required.

Hello Tomasz, I am running AFL code that I have developed that compares OHLC bars against intraday volatility indexes to determine oversold and over bought conditions. Some of my buy and sell signals looked wrong (reversed) and it seemed like the AmiBroker data files were not storing the data as actual OHLC data., per the data window display. Obviously, I was wrong and I will have to review my buy sell logic and debug it. Thank you so much for confirming! As always, I greatly appreciate your help and support!