输入/搜索内容

指数平衡策略

多品种
复制: 60
点击次数: 3765
3
关注
1508
关注者

This bot wuill maintain a specific proportion of each asset value as you set.
If you set ETH value to 25%(0.25) of portfolio, deviation to 0.1, bot will buy to 0.25 when the value ratio is below 0.90.25 and sell when it is above 1.10.25, thus, the ETH value is kept to a certain ratio.
Balancing more than one asset, you have to add trading pair separately, and ratios is input like "0.25|0.2|0.3".
Remember, the total ratio added up must lower than 1 and has a extra room to buy.

指数平衡策略。可以将资产按预设比例进行平衡,支持跨交易所平衡。注意同意个交易所要相邻添加。

The Flash Crash Bot sets pre-orders above and below a specified base price. Buy orders are placed at predefined price points that fall below the set base price. Conversely, sell orders are placed above this base price. This bot is most effective in a volatile market.

策略源码
JavaScript
var account = _C(exchanges[0].GetAccount);
var coinValue = {};
var totalValue = 0;
function updateValue(){
    var logString = 'Time: '+ _D() + '\n';
    totalValue = 0;
    coinValue[BaseAsset] = 0;
    logString += BaseAsset + ': ' + _N(coinValue[BaseAsset].value,5) + '\n';
    for(var i=0;i<exchanges.length;i++){
        var account = _C(exchanges[i].GetAccount);
        if(i > 0 && exchanges[i].GetLabel != exchanges[i-1].GetLabel){
            coinValue[BaseAsset] += {amount:account.Balance + account.FrozenBalance, value:account.Balance + account.FrozenBalance};
策略参数
策略参数
assets ratio(separate by "
base currency
Deviation ratio to buy
Deviation ratio to sell
check interval(second)
评论
全部评论 (1)

    你好,这个能实盘运行吗

    8 年前
  • 1
社区
回测系统
APP 下载
iPhone 下载
© 2015 - ∞ INVENTOR PTE LTD (SG)