30선 도박 전략 (공백)

저자:작은 꿈2018-08-29 14:10:46
태그:연구마틴게일


var hold = {price : 0, amount : 0}
var _Gear = 0
function main(){
    var initAccount = _C(exchange.GetAccount)
    Log(initAccount, "#FF0000")
    while(1){
        var ticker = _C(exchange.GetTicker)
        if(hold.amount == 0){
            var firstInfo = $.Sell(_FirstAmount)
            hold.amount = firstInfo.amount
            hold.price = firstInfo.price
        } else {
            if(ticker.Buy < hold.price - _StopWin){
                var coverStopWinInfo = $.Buy(hold.amount)
                hold.price = 0
                hold.amount = 0
                _Gear = 0
            } else if(ticker.Buy > hold.price + _StopLoss && _Gear < _MaxGear){
                $.Buy(hold.amount)
                var amount = hold.amount * 2
                var addInfo = $.Sell(amount)
                hold.price = addInfo.price
                hold.amount = addInfo.amount
                _Gear++
            }
        }
        LogStatus(_D(), "加倍下注次数:", _Gear, "\n", "当前持仓:", hold)
        Sleep(500)
    }
}

관련

더 많은

웅제뉴프이 문서는 제가 이 문제에 대해 어떻게 설명할 수 있는지에 대해 설명합니다.

작은 꿈이 전략에 대한 자세한 내용은 다음 강의에서 업데이트하겠습니다.