[FEBE] TakeProfit

0 47 Views No Comments 3 weeks ago
  • TakeProfit command for FEBE.

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

    HaasScript Code
    DefineCommand('FEBE_TakeProfit', 'Used to set take-profit settings for FEBE')
    local params = DefineParameter(ListDynamicType, 'params', 'Parameters for FEBE', true, {}, 'NewArray')
    local percent = DefineParameter(NumberType, 'percent', 'Take-profit percentage value. Default: 0.1', false, 0.1, 'Input, Number')
    local order_type = DefineParameter(EnumType, 'order_type', 'Type of the take-profit order. If using natives, such as stops, FEBE will place them beforehand. Default: LimitOrderType', false, LimitOrderType, 'InputOrderType, LimitOrderType, MarketOrderType, MakerOrCancelOrderType, StopLimitOrderType, StopMarketOrderType, TakeProfitLimitOrderType, TakeProfitMarketOrderType')
    local p = {}
    for i=1, #params do
        p[i] = params[i]
    p[#p + 1] = {
            {'percent', percent},
            {'order_type', CC_FEBE_ParseOrderType(order_type)}
    DefineOutput(ListDynamicType, p, 'Input parameters with added take-profit information', 'CC_FEBE_Execute, CC_FEBE_Orders, CC_FEBE_StopLoss, CC_FEBE_Buy, CC_FEBE_Sell')
Login or Register to Comment

Unlock your crypto trading potential

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

Join for Free