Skip to content

TAKE PROFITS

Take Profits configuration parameters summary and webhook message syntax:

Name Description Values Webhook Message Syntax
Exact Price When switched on an exact price level for the take profit is used instead of a percent Switch ON

Switch OFF
NA
Price (Under Exact Price) Price level for the take profit order (only when Exact Price is switched on) Desired price "takeProfits": [ { "price": Desired price} ]
Price Price level percentage relative to the entry price for the take profit order Desired percentage "takeProfits": [ { "percentAboveOrBelowMarketPrice": } ]
Position Percent of your position to sell for the take profit order Desired percentage "takeProfits": [ { "percentToSell": } ]
Move Stop Loss When switched on the stop loss is moved to entry or to next take profit price level when the take profit fills Switch ON

Switch OFF
"takeProfits": [ { "skipStopLossMove": false } ] 

"takeProfits": [ { "skipStopLossMove": true } ]

The CFB bot allows to set up dynamic take profit configuration on all types of setups including immediate, future and algorithmic trades.

There are two different ways for take profits configuration:

  1. Standard Take Profit: Include up to 5 take profits that can be configured following the steps outlined in the "Immediate trades" section. More take profits can be manually added directly in the “webhook message” code.

    With this option the CFB bot is instructed with a single command when to enter and exit your position.

    In the following example of a “Webhook message”, the Take Profits configuration code is highlighted:

    {
    "symbol": "BTCUSDT",
    "side": "buy",
    "entryOrderType": "market",
    "leverage": 20,
    "takeProfits": [
        {
        "percentToSell": 40,
        "skipStopLossMove": true,
        "percentAboveOrBelowMarketPrice": 0.5
        },
        {
        "skipStopLossMove": false,
        "percentAboveOrBelowMarketPrice": 1.2,
        "percentToSell": 30
        }
    ],
    "notifyDiscordChannel": true,
    "minimumValue": 0,
    "minimumAvailableBalancePercent": 0,
    "extraStopLossMovePercent": 0,
    "label": "Long POC + GP",
    "marketStopLossPercent": 1,
    "balancePercent": 1
    }
    
  2. Conditional Take Profit: Send a signal to the CFB bot to exit your position using a TradingView alert. The position can be closed partially or totally.

    This take profits option is useful when it is desirable to wait for the market to meet certain conditions before exiting a trade. For example, for a long trade a TradingView alert can be configured to exit part of the position if a red dot is printed in Market Cipher B.

    To exclusively use this type of take profits, when sending a signal to open a position the take profits code section can be skipped. Just remove the "takeProfits" section in the webhook message.

    For more than one take profit execution, It can be configured in multiple alerts or even in the same alert which can be fired more than once, and it will only place a take profit order if there is any remaining position open.

    Step by step configuration:

  3. Decide what condition will act as the trigger for the take profit and add an alert to it on Trading view.

  4. Set your webhook url to this: https://cryptofusionbot.com/api/close?auth=

    Change "your-bot-auth-token" to the appropiate one. You can find the auth-token it in the "Bots" section located in the upper left menu:

  5. Set your webhook message to:

    {
    "label": "TEST",
    "symbol": "BTCUSDT",
    "closeOrderType": "market",
    "positionPercent": 100,
    "side": "buy"
    }
    

    Change the different variables to your requirements:

    • closeOrderType - market or limit order
    • positionPercent - Percentage of the position that you want to exit
    • side - The side of the current position to close where buy is for longs and sell is for shorts.