Dynamic Balance Strategy (2018-12-14 09:33:03)
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
Related strategies
Comment
All comments (0)
No data
- 1