Help! AmiBroker Hybrid Mode Import Corrupted Historical Data

Problem Description:
I have successfully imported over 1,900 Taiwan stock 1-minute OHLCV data into AmiBroker, and all price and volume information displays normally.


Now I want to import Taiwan stock-specific information — Disposition Stock markers, where 1 indicates the stock is under disposition, and 0 otherwise.


I attempted the import using Import Wizard and added the following commands in the "Additional commands" field:

$FORMAT Name, Date_YMD, Aux1, Aux2
$HYBRID 1
$ALLOWNEG 1

Issue: After import, my original historical data was corrupted with the following symptoms:
Aux1 displays successfully
Open and High show normal values
Low and Close display -1e+10 (invalid values)
Candlestick charts completely disappear


Related Questions:
Why did this happen? How can I fix it? Is there a better import method?
My historical data contains 1,901 stocks, but the Aux data contains 1,961 stocks. Will the different number of stocks cause problems during data merging?

in AB\formats folder,

  1. create a file Debug1.format

  2. Edit file and paste

$FORMAT Ticker,Date_YMD,Aux1,Skip,Skip,Skip,Skip
$SEPARATOR ,
$HYBRID 1
$ALLOWNEG 1
$DEBUG 1
$SKIPLINES 1
$BREAKONERR 1
  1. there is a file import.types
    edit that and put this at the end
    Debug1 (*.*)|*.*|Debug1.format

  2. use File > Import ASCII
    then use Debug1 in dropdown

  3. check import.log in AB folder
    The logging is elaborate.

Also, delete the tickers and import fresh. just use a small sample for your second Aux1 import.

View or share your debug output.

You need to read the manual prior to using non standard options like hybrid. It does not corrupt anything but it operates the way it is described. It combines existing data with new data so volume gets added, not replaced like without hybrid mode. Hybrid as name says creates a HYBRID of old and new data.

You must have EXISTING data already in the database that would be combined with new data using hybrid mode. Trying to use hybrid without existing data is incredibly BAD IDEA.
You can only use hybrid if you already have valid OHLC records in the database for ALL bars that you want to create hybrid with.

1 Like

Sorry, still learning this software. I recorded the whole process (video has subtitles) - can anyone spot what I did wrong? Thanks in advance!
Video
|
v

it is working at my end, ensuring OHLCV data is already present.

this is sample data

ticker,date,time,aux1
3363,20251029,152900,1
3363,20251029,152700,1
3363,20251029,152500,1
3363,20251029,152300,1

this is the SAME format file

$FORMAT Ticker,Date_YMD,Time,Aux1,Skip,Skip,Skip
$SEPARATOR ,
$HYBRID 1
$ALLOWNEG 1
$DEBUG 1
$SKIPLINES 1
$BREAKONERR 1

chart is fine

@Albert3919345 I think your time component is the issue, because in data you have it but not in aux1 file. if you want last bar, use the last bar time of the day

For HYBRID to work, that exact DATETIME should be found as mentioned by Tomasz