资源加载中... loading...

数字货币期货切换全仓逐仓插件

Author: 发明者量化-小小梦, Date: 2022-03-18 18:54:09
Tags:


function main() {
    var posType = [false, true][type]
    var name = exchange.GetName()
    if (name == "Futures_Binance") {
        exchange.IO("cross", posType)
    } else if (name == "Futures_HuobiDM") {
        exchange.IO("cross", posType)    
    } else if (name == "Futures_Bibox") {
        exchange.IO("cross", posType)        
    } else if (name == "Futures_Bitget") {
        exchange.IO("cross", posType)        
    } else if (name == "Futures_AOFEX") {
        exchange.IO("cross", posType)      
    } else if (name == "Futures_Pionex") {
        exchange.IO("cross", posType)      
    } else {
        throw "not support!"
    }
    return name + "切换 cross :" + posType
}
template: strategy.tpl:40:21: executing "strategy.tpl" at <.api.GetStrategyListByName>: wrong number of args for GetStrategyListByName: want 7 got 6