Type/to search

간단한 고정 가격 손절매 로봇

Study
3
Follow
1503
Followers

간단한 고정 가격의 스톱 로봇으로 스톱 로프를 할 수 있습니다. 또한 디지털 화폐의 양적 거래를 시작하는 좋은 전략입니다.

변수:

StopPrice:Fixed price to stop loss

Intervel: Intervel(second) of checking coin price

Source
JavaScript
function CancelPendingOrders() {
    var orders = _C(exchange.GetOrders);
    for (var j = 0; j < orders.length; j++) {
        exchange.CancelOrder(orders[j].Id, orders[j]);
    }
}
function StopLoss(){
    var done = false
    while(!done){
        var ticker = _C(exchange.GetTicker)
        account = _C(exchange.GetAccount)
        var price = ticker.Buy
Strategy parameters
Strategy parameters
Fixed price to stop loss
Intervel(second) of checking coin price
Comment
All comments (3)

    是不是把自己的单子挂出去,有可能你的挂单卖家已经大于实时价格了,那么你这个单子就不会成交,所以立即取消掉,重新检测最新卖价,重新用最新卖家挂单

    5 years ago

    有的疑问,为什么卖出后,立即要再去取消这个卖出单那?是为了防止什么情况:
    var id = exchange.Sell(price, amount);
    if(id){
    exchange.CancelOrder(id)
    }

    6 years ago

    是不是把自己的单子挂出去,有可能你的挂单卖家已经大于实时价格了,那么你这个单子就不会成交,所以立即取消掉,重新检测最新卖价,重新用最新卖家挂单

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