33
Follow
63
Followers
回测比特币交易策略,发现botvs存储的数据库,偶尔有数据缺失,形成k线的跳空,例如okex的3月27日到28日存在一个长达十几个小时的k线缺失。在回测时,如果跳空前开仓了,在k线缺失的时候,又无法平仓,影响了回测的准确性,怎么处理这种跳空比较好呢? 
var last_ticker_time = new Date().getTime(); //记录上一次获取ticker时间
function onTick() {
var this_ticker_time = new Date().getTime();
if (this_ticker_time - last_ticker_time >= 15 * 60 * 1000) { //两个ticker间隔15min,就是跳空
Log(exchange.GetTicker())
}
last_ticker_time = new Date().getTime();
}
function main() {
while (true) {
onTick()
Sleep(60000)
}
}
Related Recommendations
Advanced Tutorial for FMZ Quant platform Strategy WritingElementary Tutorial for FMZ Quant platform Strategy WritingGet Started with FMZ Quant PlatformSECURITY BUGI keep getting error: Exchange_GetAccount: Invalid ContractTypeWe have an incredibly profitable market making algorithm for sideways markets on Bitmex - but need expert to help eliminate wait times during downward volatility in the marketError with deribitLimitations of the backtesting engineHow to install ta-lib on linux docker?5.5 Trading strategy optimization
Comment
All comments (5)
- 1

