[FEBE] Sell

0 74 Views No Comments 3 weeks ago
  • Sell command for FEBE.

    More information about FEBE: https://www.haasscripts.com/blog/guides/first-ever-bot-engine-febe-for-haasscript/

    HaasScript Code
    DefineCommand('FEBE_Sell', 'Used to set sell settings for FEBE')
    
    local params = DefineParameter(ListDynamicType, 'params', 'Parameters for FEBE', true, {}, 'NewArray')
    local order_timeout = DefineParameter(NumberType, 'order_timeout', 'Order timeout in seconds. Default: 600 (10 minutes)', false, 600, 'Input, Number')
    local order_refill = DefineParameter(BooleanType, 'order_refill', 'Whether or not the filled/cancelled orders should be refilled. Default: false', false, false, 'True, False')
    local order_type = DefineParameter(EnumType, 'order_type', 'Order type used for the sell orders. If MarketOrderType is used, the sell order(s) will execute immediately and will re-trigger after order_timeout if order_refill is set to TRUE. Default: LimitOrderType', false, LimitOrderType, 'LimitOrderType, MarketOrderType, MakerOrCancelOrderType')
    
    local p = {}
    for i=1, #params do
        p[i] = params[i]
    end
    
    p[#p + 1] = {
        's_sell',
        {
            {'order_timeout', order_timeout},
            {'order_refill', order_refill},
            {'order_type', CC_FEBE_ParseOrderType(order_type)}
        }
    }
    
    DefineOutput(ListDynamicType, p, 'Input parameters with added sell information', 'CC_FEBE_Execute')
Login or Register to Comment

Unlock your crypto trading potential

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

Join for Free