Search
GBP
Trading Software
    Menu Close

    SuperTrend cBot


    Limited Support

    This basic starter kit for algo developers uses an open-source cTrader SuperTrend indicator, this is a popular technical analysis tool used by traders and investors to identify the direction of a trend and also the potential entry & exit points for your trades in the financial markets.

    *This product is for educational purposes only *
    (OS) Type: Windows & Mac OS Compatible
    Current version: 1.0
    Updated: Friday, 28 July 2023
    Author: ClickAlgo Team

    Need a cTrader broker?  Open a demo account

    Educational content: Read our disclaimer

    £0.00 Incl. VAT.
    cTrader Software



    The cTrader SuperTrend indicator was developed by Olivier Seban and was introduced in his book "Tout le monde peut trader". It works for futures, forex, and equities and is used on the 15-minute, hourly, weekly, and daily charts. The Average True Range is represented by the number of days, while the multiplier is the value by which the range is multiplied.

    The SuperTrend line appears above the price bars during an uptrend and below the candles during a downtrend, most traders commonly use it as a dynamic support & resistance level and as an entry & exit signal. When the price crosses above the SuperTrend line, it may indicate a potential entry signal, while a cross below the SuperTrend line may signal a potential exit or shorting opportunity.

     

    Here's how the SuperTrend indicator is calculated:

    • Calculate the Average True Range (ATR) over the specified period.
    • ATR = (Sum of True Range over the period) / (Number of periods)
    • Calculate the Basic Upper Band (UB) and Basic Lower Band (LB):

      • UB = (High + Low) / 2 + (ATR * Multiplier)
      • LB = (High + Low) / 2 - (ATR * Multiplier)
    • Calculate the SuperTrend (ST) for each period:

      • For an uptrend: ST = UB of the previous period if the previous close is less than or equal to the previous UB, else it's the previous LB.
      • For a downtrend: ST = LB of the previous period if the previous close is greater than or equal to the previous LB, else it's the previous UB.

    Once you open a new cTrader chart with your required timeframe, add the Supertrend indicator and keep the setting as 14 and 3, your settings can be changed at any time using the cBot parameters window.

     

    Word of Warning

    Like any technical indicator, the SuperTrend is not perfect and may produce false signals, especially in choppy or sideways markets. Therefore, it's often used together with other indicators and analysis methods to confirm trading decisions.

     

    How Does the cBot Open & Close Trades?

    This strategy will open a buy trade when the SuperTrend UpTrend value is less than the candle's lowest price and when the SuperTrend DownTrend's previous value is greater than the Candle's last Highest price. The opposite signals will open a Sell trade. Trades will also close when there is an opposite signal, so when there is a buy signal an open sell trade will close and a sell signal will close a buy trade.

     

    Stop Loss & Take Profit Calculation

    A standard stop loss and take profit as well as position size can be set from the cBots parameter settings. 

    You can add additional risk management and other trade rules yourself or by contacting our development team.

     

    SuperTrend cBot is provided with full source code by Spotware.com

    cTrader Supertrend cBot

     

    How To View The Source Code

    To view the source code for this cBot, you will first need to make sure you have downloaded and installed cTrader Desktop, you can also scroll to the bottom of this page for instructions on how to install the cBot. Once installed you will have the cTrader application open, next you need to navigate to the Automate application and click on the name of the cBot, the source should show in the right-hand window.

    If you need more help watch a video tutorial on how to use cTrader Automate.

     

    How to Attach Indicator to Chart

    You do not need to attach the Supertrend indicator to your chart when you run the cBot, but it is a good idea to visually see the indicator to check your trade rules for opening and closing trades and any risk management.

     

    Learn Algorithmic Trading

    In this instructional guide, we aim to assist you in acquiring the necessary skills to engage in market trading through automated trading strategies (cBots) using the cTrader Desktop trading platform. By the conclusion of this tutorial, you will gain the confidence to employ a cTrader cBot alongside the Algo application of cTrader, enabling you to automatically execute and handle your market orders. This course is designed to familiarize novice traders with the fundamental principles of algorithmic trading utilizing the cTrader platform.

     

    Learn Microsoft C# for Algo Trading

    If you are new to coding your cTrader cBot for automated trading the following Microsoft C# course will help you modify the starter kit cBot in this download to add new features for your own personal trading strategy.

     

    Algorithmic Trading Facts

    A significant number of traders venture into algorithmic trading with the misconception that they have discovered a foolproof strategy that guarantees effortless wealth. However, this notion is far from reality. It is crucial to read this article, as it can save you valuable time and money. 

     

    How To Install & Remove

    First, make sure you have the cTrader trading platform installed and then simply unzip the file and double-click on it to automatically install it onto the platform.

    cBot Starter Kit Training

    Any Questions?

    If you have any questions, please first search our coding help forum for the answer, if you cannot find it, post a new question.

     

    Need Coding Help?

    We can help you modify this cBot for your own personal trading strategy, contact our team for a quote.

     

    Need a Broker

    If you are still looking for a broker you can trust, take a look at our best cTrader broker site.