Type/to search

아이스버그 주문 구매 간단 버전

3
Follow
1503
Followers

Very simple, just for learn.
Code is best annotation.

빙산 위탁 구매, 작은 M 구매로 주문을 분할하여 시장을 충격에서 피하는 것은 비트코인의 양적 거래에 대한 간단한 학습 전략입니다.

Source
JavaScript
function main(){
    var initAccount = _C(exchange.GetAccount)
    while(true){
        var account = _C(exchange.GetAccount)
        var dealAmount = account.Stocks - initAccount.Stocks
        var ticker = _C(exchange.GetTicker)
        if(BUYAMOUNT - dealAmount > BUYSIZE){
            var id = exchange.Buy(ticker.Sell, BUYSIZE)
            Sleep(INTERVAL*1000)
            if(id){
                exchange.CancelOrder(id) // May cause error log when the order is completed, which is all right.
Strategy parameters
Strategy parameters
amount to buy
iceberg order size
orders exist time(second)
Comment
All comments (1)

    仅为教学目的,最简单的冰山策略。

    7 years ago
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)