}
file.deleteOnExit();
}
private void computeMidPriceBP(Table table) {
Row row = table.createRow();
Column bidPrice = table.acquireColumn("bidPrice");
Column askPrice = table.acquireColumn("askPrice");
Column midBP = table.acquireColumn("midBP");
long lastMp = (row.get(bidPrice) + row.get(askPrice)) / 2;
while (row.nextRecord()) {
long mp = (row.get(bidPrice) + row.get(askPrice)) / 2;
long mpbp = 10000 * (mp - lastMp) / lastMp;
row.set(midBP, mpbp);
}
}