thought better of two tables, this makes simulation way easier

This commit is contained in:
Kevin Darby committed 2019-12-04 23:33:48 -05:00
1 parent b7ad777de4
commit 69612eaee7
7 files changed
+77 -152

No files matched your search

+5 -16
View File
@@ -50,18 +50,7 @@ namespace bts.history
m.UnmapMember(x => x.SendingTime);
m.UnmapMember(x => x.TransactTime);
m.SetIgnoreExtraElements(true);
});
BsonClassMap.RegisterClassMap<HistoryOrderRow>(m =>
{
m.AutoMap();
m.MapMember(x => x.trade_date).SetSerializer(new DateTimeSerializer(DateTimeKind.Utc, MongoDB.Bson.BsonType.Document));
m.MapMember(x => x.sending_time).SetSerializer(new DateTimeSerializer(DateTimeKind.Utc, MongoDB.Bson.BsonType.Document));
m.MapMember(x => x.transact_time).SetSerializer(new DateTimeSerializer(DateTimeKind.Utc, MongoDB.Bson.BsonType.Document));
m.UnmapMember(x => x.TradeDate);
m.UnmapMember(x => x.SendingTime);
m.UnmapMember(x => x.TransactTime);
m.SetIgnoreExtraElements(true);
});
});
//BsonSerializer.RegisterSerializationProvider(new SerializationProvider());
}
@@ -94,13 +83,13 @@ namespace bts.history
return res;
}
public IEnumerable<OrderOrFill> run_algo(AlgoBase algo, IFillModel fill_model, uint latency,
IEnumerable<IMBP> bookstream, IEnumerable<IMBO> orderstream)
public IEnumerable<OrderOrFill> run_algo(IAlgo algo, IFillModel fill_model, uint latency,
IEnumerable<HistoryRow> datastream)
{
return null;
}
}
public interface IFillModel {}
public static class QueryExtensions
{
static public IMongoQueryable<T> where<T>(this IMongoQueryable<T> q, string where)