Type/to search

Dynamic Balance Strategy (2018-12-14 09:33:03)

Balance
0
Follow
0
Followers
Source
JavaScript
var InitAccount = null;

function onTick(){
    var acc = _C(exchange.GetAccount);
    var ticker = _C(exchange.GetTicker);
    var spread = ticker.Sell - ticker.Buy;
    var diffAsset = (acc.Balance - (acc.Stocks * ticker.Sell))/2;
    var ratio = diffAsset / acc.Balance;
    LogStatus('ratio:', ratio, _D());
    if(Math.abs(ratio) < threshold){
        return false;    
    }
Strategy parameters
Strategy parameters
threshold
Price Precision
Amount Precision
minimum buying amount
error retry interval
Polling Interval
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)