Skip to content

ALGORITHMIC TRADING

The CFB bot allows you to build simple and complex trading strategies that will execute trading orders using automated and pre-programmed trading instructions to account for different variables.

For some video examples of automatic trading bot configurations check these YouTube videos:

Video Example 1

Video Example 2

Video Example 3

Video Example 4

Step by step setup

  1. As a first step a repetitive trigger for each trade needs to be set up in TradingView. For example a long trade might want to trigger each time the 10 EMA crosses above the 55 EMA in the 12 minutes time frame.

  2. Decide if one or more confirmations are needed for added confluence. For example to only take the trade if there is bullish Momentum Divergences in the 6 minute and 1 minute Moneyflow trending up.

  3. Each algorithmic strategy can be manually backtested and refined repeating step 1 and 2 until a juicy setup is found. Another option is to conduct direct forward testing and start trading right away, which would allow to gather and analyze the results with actual real data. Once the strategy is refined, move to step 4.

  4. Inside the CFB administration panel, navigate to the "Signal" section in the top left menu. Configure the trade settings according to the strategy needs. Follow the steps outlined in the "Immediate Trades" section skipping the very last step:

    Bear in mind that this trade configuration will be used each time your TradingView alert is fired.

  5. Once the trade settings are configured, inside the "Signal" section navigate to the "Webhook Settings" subsection located in the upper part. In this section the "Webhook URL" and "Webhook Message" data is printed which will be used to set up the TradingView alert:

  6. Set up an alert in TradingView. Following the example in step 1, the alert would need to be set up on the 10 EMA cross above or below the 55 EMA.

  7. Copy the "Webhook URL" field from step 3 into the "Webhook URL" field in the TradingView alert.

  8. Copy the "Webhook Message" field from step 3 into the "Message" field in the TradingView alert.

    Save your alert.

    Once the alert is configured, each time is triggered it will ask the CFB bot to take the trade, and the CFB bot will only take the trade if the configured confirmations are met.

Configuration parameters summary:

Name Description Values Webhook Message Syntax
Bot Bot to use for the trade Bot Names registered under the "Bots" section NA
Label Reference name for the trade Desired name "label": "Desired Name"
Symbol Trading pair to trade Check the "Supported Pairs" section for the updated list of supported trading pairs "symbol": "BTCUSDT"
Side Trading side to buy or sell the asset Long

Short
"side": "buy"

 "side": "sell"
Entry order type Type of trade order Market

Limit
"entryOrderType": "market"

"entryOrderType": "limit"
Configuration options for Limit trades
Entry Order Timeout Period of time which limits the time of limit orders to get filled Desired amount of time "entryOrderTimeoutSeconds": 900
Unit What unit to use for the limit orders time out period Seconds

Minutes

Hours
NA
Ladder In Ladder in the entry across a range of prices only when selecting limit order type Switch ON

Switch OFF
NA
Number of Entries Number of entries to ladder in the trade order Number of desired entries "autoLadder":
Start Price Price level where the laddered entry will start laddering in the orders Desired price "autoLadder":
End Price Price level where the laddered entry will stop laddering in the orders Desired price "autoLadder":
Balance Per Entry Percent of the total exchange wallet balance to use for the entry order Desired percentage autoLadder":
Market Price When switched on the limit order will be placed at the current market price Switch ON

Switch OFF
NA
Entry Price Price for entry limit order (only if Market Price option is switched off) Desired price "entryPrice": Desired price
Limit Order options - END
Balance Percent of the total exchange wallet balance to use for the entry order Desired percentage "balancePercent": Desired percentage
Leverage Amount of leverage to use in the trade From 1 to 100

(exchange limitations apply for each trading pair)
"leverage": Desired leverage
Exact Price Stop Loss When switched on an exact price level for the stop loss is used for the trade instead of a percent Switch ON

Switch OFF
NA
Stop Loss Price Price level at which the trade stop loss will be placed (only if Exact Price Stop Loss is switched on) Desired price "stopLossPrice": Desired price
Stop Loss Percent Price percentage relative to the entry price at which the trade stop loss will be placed Desired percentage "marketStopLossPercent": Desired percentage
Extra Stop Loss Move Move the stop loss an additional percent past the entry or the take profit price when taking profits Desired percentage "extraStopLossMovePercent": Desired percentage
Minimum Margin Minimum margin to be used for the trade Desired amount of funds "minimumValue": Desired funds
Minimum Available Balance Minimum available balance to keep in the exchange account wallet Desired percentage "minimumAvailableBalancePercent": Desired percentage
Configuration options for Take Profits
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 } ]
Take Profit options - END
Configuration options for Confirmations
Name Confirmation name, either a system or a custom confirmation that will be checked before entering the trade System confirmation names. Check the "Confirmations" section for the list of names

AND

any custom confirmation name
"requiredIndicators": [  {  "name": "Indicator_name" }  ]
Value Confirmation value that need to be met before entering the trade Depends on each confirmation configured values. For system confirmations values check the "Confirmations" section "requiredIndicators": [  { "value": "Desired value" }  ]
Confirmation options - END
Notify Discord When switched on trade results are logged in the Discord CFB “bot-signals” channel Switch ON

Switch OFF
"notifyDiscordChannel": true

"notifyDiscordChannel": false