[FEBE] Sell

stable
By pshai in Other Published October 2020 👁 1,522 views 💬 0 comments

Description

Sell command for FEBE. More information about FEBE: https://www.haasscripts.com/blog/guides/first-ever-bot-engine-febe-for-haasscript/
HaasScript
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')

0 Comments

Sign in to leave a comment.

No comments yet. Be the first!