Type/to search

Estrategia de rebalanceo de índices

Portfolio
3
Follow
1508
Followers

This bot will 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.

Estrategia de balance por índice. Permite balancear los activos según una proporción predefinida, con soporte para balanceo entre diferentes exchanges. Nota: los pares del mismo exchange deben agregarse de forma adyacente.

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.

Source
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};
Strategy parameters
Strategy parameters
")
base currency
Deviation ratio to buy
Deviation ratio to sell
check interval(second)
Comment
All comments (1)

    你好,这个能实盘运行吗

    8 years ago
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)