Loading ...

Demo吕神波动率策略

Author: 中本姜, Date: 2020-04-29 17:13:45
Tags:




/*backtest
start: 2020-03-01 00:00:00
end: 2020-04-25 00:00:00
period: 15m
basePeriod: 1m
exchanges: [{"eid":"Futures_BitMEX","currency":"XBT_USD"}]
args: [["Amount",1000,201812],["NewKMin",15,201812]]
*/


function EasyReadTime(millseconds) {
    if (typeof millseconds == 'undefined' ||
        !millseconds) {
        millseconds = new Date().getTime();
    }
    var newDate = new Date();
    newDate.setTime(millseconds);
    return newDate.toLocaleString();
}

function main() {
    exchange.SetContractType('XBTUSD')
    var vix_alg = $.VixAlg($.ChartObj, "VIX图表");
    while (true) {
        records = _C(exchange.GetRecords);
        $.DemoOnTick(vix_alg, records);
        Sleep(60 * 1000);
    }
}

More