고정된 간격 대량 연결 플러그인

저자:초목, 날짜: 2020-03-12 16:34:05
태그:

고정된 간격으로 상환을 배치하여 선물 개설 및 평상시에 사용할 수 있습니다. 플러그인은 거래 터미널에서 한 번의 클릭으로 시작할 수 있으며 수수료가 없으며 수동 거래를 편리하게합니다.https://www.fmz.com/digest-topic/5051



function main() {
    var ticker = exchange.GetTicker()
    if(!ticker){
        return  'Unable to get price'
    }
    for(var i=0;i<N;i++){
        if(Type == 0){
            if(exchange.GetName().startsWith('Futures')){
                exchange.SetDirection('buy')
            }
            exchange.Buy(Start_Price-i*Spread,Amount+i*Amount_Step)
        }else if(Type == 1){
            if(exchange.GetName().startsWith('Futures')){
                exchange.SetDirection('sell')
            }
            exchange.Sell(Start_Price+i*Spread,Amount+i*Amount_Step)
        }else if(Type == 2){
            exchange.SetDirection('closesell')
            exchange.Buy(Start_Price-i*Spread,Amount+i*Amount_Step)
        }
        else if(Type == 3){
            exchange.SetDirection('closebuy')
            
            exchange.Sell(Start_Price+i*Spread,Amount+i*Amount_Step)
        }
        Sleep(500)
    }
    return 'order complete'
}

더 많은