স্পট আইসবার্গ এনট্রাস্ট সেল প্লাগইন

Study Trade-aided Iceberg
সৃষ্টির তারিখ: 2020-03-20 16:38:52 অবশেষে সংশোধন করুন: 2020-03-24 10:50:43
অনুলিপি: 31 ক্লিকের সংখ্যা: 2692
3
ফোকাস
1444
অনুসারী

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

আইসবার্গ অর্ডার বিক্রয়, অর্ডারকে ছোট টুকরো টুকরো করে বিক্রি করা, বাজারকে ধাক্কা না দেওয়া, বিটকয়েন কোয়ান্টাম ট্রেডিংয়ের জন্য একটি ভাল এবং সহজ শিক্ষণ কৌশল এই প্লাগইনটি ট্রেডিং টার্মিনালে একক ক্লিকের মাধ্যমে চালু করা যায়, কোন ফি নেওয়া হয় না, ম্যানুয়াল ট্রেডিংয়ের সুবিধা প্রদান করে। বিস্তারিতঃ https://www.fmz.com/digest-topic/5051

কৌশল সোর্স কোড
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)
            if(id){
                exchange.CancelOrder(id) // May cause error log when the order is completed, which is all right.
            }else{
                throw 'sell error'
            }
        }else{
            account = _C(exchange.GetAccount)
            var avgCost = (account.Balance - initAccount.Balance)/(initAccount.Stocks - account.Stocks)
            return 'Iceberg order to sell is done, avg price is ' + avgCost
            
        }
    }
}