CSV imported into AmiBroker using Import Wizard shows 375.87 at 16:00, but AmiBroker displays 375.64 on same date. No external data feed connected. What's adjusting the price? Symbol is SPY
TIA
CSV imported into AmiBroker using Import Wizard shows 375.87 at 16:00, but AmiBroker displays 375.64 on same date. No external data feed connected. What's adjusting the price? Symbol is SPY
TIA
Ok csv shows 375.87,
but what you see in Quote Editor ?
if it is
the same value, you need to look into afl formula
if it is 375,64, you need to look into importation process
Post your file and import definition. No mind reading device here.
Unfortunately your question isn't clear enough and does not provide all necessary details to give you an answer. Please follow this advice: How to ask a good question
Thank you for responding. I apologize for the vague original post. I intended no disrespect but was disrespectful. I am sorry. I should have followed the forum guidelines from the start. Here's the full picture:
Goal: Cross-validate a Python backtesting system against AmiBroker using identical data. I exported 1.77 million SPY 1-minute bars from a SQLite database to CSV, imported into AmiBroker, and ran an Exploration to compare closing prices. The prices don't match.
Version: AmiBroker 6.93.0 Professional, 64-bit
Data source: Local database only. No external data feed connected. The only data in this database is what I imported from the CSV. The data itself came from Massive (formerly Polygon.IO).
The CSV file contains 1-minute bars for SPY (2016–2026). Format: Ticker, Date (YYYY-MM-DD), Time (HH:MM:SS), Open, High, Low, Close, Volume.
Example — Feb 1, 2021 at 16:00:00 in the CSV:
SPY,2021-02-01,16:00:00,376.15,376.29,375.8,375.87,374488
Close = 375.87
(screenshot of CSV in Notepad attached)

Import definition (backtest1min.format):
# Format definition file generated automatically
# by AmiBroker's ASCII Import Wizard
$FORMAT Ticker, Date_YMD, Time, Open, High, Low, Close, Volume
$SKIPLINES 1
$SEPARATOR ,
$CONT 1
$GROUP 255
$AUTOADD 1
$DEBUG 1
(screenshot attached)
AFL Exploration code:
startDate = 1210201;
endDate = 1210205;
dn = DateNum();
tn = TimeNum();
is1600 = tn == 160000;
inRange = dn >= startDate AND dn <= endDate AND is1600;
Filter = inRange;
PrevClose1600 = ValueWhen(is1600, Close, 2);
RetPct = (Close - PrevClose1600) / PrevClose1600 * 100;
AddColumn(Close, "Close", 1.4);
AddColumn(PrevClose1600, "PrevClose", 1.4);
AddColumn(RetPct, "Return%", 1.6);
Exploration result for Feb 1, 2021 at 16:00: Close = 375.64
(screenshot attached)
The problem: CSV says 375.87, AmiBroker displays 375.64 for the same bar. This discrepancy exists across all dates I've checked — not rounding, but consistently different values. Even if I cross-reference just a few known full trading days, the issue persists. I have no other data source configured and this is a fresh database created solely for this import.
Would AmiBroker be doing anything to modify the prices during or after import? Or am I barking up the wrong tree?
I'm no coder. Claude AI is helping (or hurting) me with this. Claude is writing Python scripts for me to use in backtesting the dataset. I'm trying to use AmiBroker to check one against the other.
What is the Periodicity of this explorer ?
Do you have Pad Align set ? If afirmative, does the symbol used to pad & align has all the minutes ?
Price is imported correctly as QuoteEditor clearly shows.
The problem is not in import. The problem is in exploration. Turn OFF pad and align and re-run.
The other reason might be 4 minute timeshift applied in the settings.
Thank you, sir. You are very kind.