[pshaiBot] Gandalf The White

1 260 Views 4 Comments 7 months ago
  • “YOU SHALL NOT PASS!”

    Using this bot, you can make sure the price doesn’t go lower than the set price… It simply wont let them pass!!

    HaasScript Code
    minPrice = Input('Minimum price', 6500)
    asks = GetOrderbookAsk()
    ​
    ​
    function getAmount()
        if asks[1][1] >= minPrice then return 0 end
    ​
        local i, p, amt = 1, 0, 0
        while p < minPrice do
            p = asks[i][1]
            amt = amt + asks[i][2]
    ​
            i = i + 1
            if i > #asks then break end
        end
    ​
        return amt
    end
    ​
    local oid = Load('oid', '')
    local amt = getAmount()
    ​
    if oid == '' then
        if amt > 0 then
            oid = PlaceBuyOrder(0, amt, {type=MarketOrderType})
        end
    else
        if IsOrderOpen(oid) then
            CancelOrder(oid)
        else
            oid = ''
        end
    end
    ​
    Save('oid', oid)
    • #650

      Not clear what exactly this bot is doing? Could you expand a bit please? Is it designed to place limit buy orders so that low liquidity coins don’t fall below a price level?

    • #692
      Up
      2
      Down
      Stephan
      Admin

      This is a market semi-manipulation bot. You can give this bot a price and each time the price goes below the given price then this bot will be buying in coins. It buys as many coins as it needed to reach the given minimum price again.

      So, if you introduce a new coin and you want to ensure it has a specific minimum price then this is the bot to use for it.

    • #691
      Up
      1
      Down
      pshai
      Moderator

      It will keep buying (with market orders) as long as price falls below a certain level. The top ask is the price that is used to detect this and all ask orders are bought if they are below the set limit.

    • #760
      Up
      0
      Down
      kobalt
      Basic

      Gandalf, detection / tracker..mmm that would be fun…

Login or Register to Comment

Unlock your crypto trading potential

Create a free account and enjoy everything we have to offer.

Join for Free