Type/to search

Plugin de orden iceberg de compra en spot

Study
3
Follow
1508
Followers

Muy simple, solo para aprender. El código es la mejor anotación.

Compra por iceberg, que divide la orden en pequeñas compras M para evitar impactar el mercado, es una excelente estrategia de aprendizaje simple para la negociación cuantitativa de Bitcoin.
El plugin se puede iniciar con un solo clic en la terminal de trading, sin costo, y es conveniente para el comercio manual.
Detalles: https://www.fmz.com/digest-topic/5051

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 (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)