Type/to search

氷山注文(売り)のシンプル版

Study
3
Follow
1507
Followers

非常にシンプルです。学習用です。
コードが最良の注釈です。

アイスバーグ注文の売りは、注文を小口に分割して売ることで、市場へのインパクトを避けることができ、ビットコインの定量取引を学ぶ初心者にとっても優れた簡単な入門戦略です。

Source
JavaScript
function main(){
    var initAccount = _C(exchange.GetAccount)
    if (initAccount.Stocks < SELLAMOUNT){
        throw 'check your account amount to sell'
    }
    while(true){
        var account = _C(exchange.GetAccount)
        var dealAmount =  initAccount.Stocks - account.Stocks
        var ticker = _C(exchange.GetTicker)
        if(SELLAMOUNT - dealAmount > SELLSIZE){
            var id = exchange.Sell(ticker.Buy, SELLSIZE)
            Sleep(INTERVAL*1000)
Strategy parameters
Strategy parameters
amount to sell
sell orders size
order exist time(second)
Comment
All comments (1)

    新手入门的选择,程序化交易不仅是完成完整的策略,这样的类似冰山委托的小功能也可以

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