33
Follow
63
Followers
回測ビットコイン取引戦略,botvsが保存しているデータベースを発見,時折データ欠落があり,k線が空白を形成する.例えばokexの3月27日~28日に,長達十数時間のk線欠落が存在する. 回測時に,空白の前にポジションを開けた場合,k線欠落時に,またポジションを平らげることができず,回測の正確性に影響する.この空白をどのように処理するか.
var last_ticker_time = new Date().getTime(); // チケットを最後に取得した時刻を記録する
function onTick() {
var this_ticker_time = new Date().getTime();
if (this_ticker_time - last_ticker_time >= 15 * 60 * 1000) { // 2つのtickerの間隔は15分,つまり空飛ぶ
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

