Category Trend  Published on 05/06/2023

KAMA Trend Following

Description

KAMA Trend Following System

The Strategy is a long-term trend-following trading algorithm that uses the Kaufman Adaptive Moving Average (KAMA) to indicate the direction of the market. It is a strategy primarily designed for the daily timeframe and has yielded the best results on EURUSD, BTCUSD, and GBPUSD markets.

Kaufman Adaptive Moving Average (KAMA)

KAMA is a unique kind of moving average developed by Perry Kaufman, and introduced in his book "Smarter Trading". It adapts to market noise or volatility. When markets are trending, and the price is making big moves, KAMA becomes sensitive and follows the price closely. Conversely, in a ranging or consolidative market state where the price is noisy, KAMA desensitizes itself and remains smoother.

The advantage of KAMA is its improved sensitivity to price changes compared to other moving averages, without the accompanying noise that usually comes with sensitivity.

 

As you see, in ranging periods the KAMA moves sideways, and in trending markets it changes direction rapidly.

The Strategy

The Strategy is based on the crossover of two KAMAs with different period parameters: a fast one (default period of 20) and a slow one (default period of 200).
If the fast KAMA crosses above the slow KAMA, it indicates an upward trend, and the robot opens a buy trade.
If the fast KAMA crosses below the slow KAMA, it indicates a downward trend, and the robot opens a sell trade.
The robot is always in the market, meaning when a new trade opens, the previous trade of the opposite direction gets closed.

 

 

In addition to the KAMA indicators, the Average True Range (ATR) indicator is also used for defining the stop loss level of the trades. The ATR indicator measures market volatility, and the stop loss is set to be a multiple (default is 10) of the ATR. This adaptive stop loss level adjusts itself with changing market volatility.

The strategy was live tested on GBPUSD and EURUSD with a fast period of 20 and a long period of 200 producing good results, and on BTCUSD with a fast period of 20 and a slow period of 50 with very good results. All on Daily Timeframe.

 

You can download the robot from the link below, if you have any questions please don't hesitate to ask.

Download for free from sinalgolab.com

 

 


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;

namespace cAlgo.Robots
{
    [Robot(AccessRights = AccessRights.None)]
    public class NewcBot2 : Robot
    {
        [Parameter(DefaultValue = "Hello world!")]
        public string Message { get; set; }

        protected override void OnStart()
        {
            // To learn more about cTrader Automate visit our Help Center:
            // https://help.ctrader.com/ctrader-automate

            Print("Download the Bot for free from sinalgolab.com");
        }

        protected override void OnTick()
        {
            Print(Symbol.Spread/Symbol.PipSize);
        }

        protected override void OnStop()
        {
            // Handle cBot stop here
        }
    }
}

SI
singalgolab

Joined on 07.05.2023

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: New cBot (2).algo
  • Rating: 0
  • Installs: 882
  • Modified: 05/06/2023 20:36
Comments
Log in to add a comment.
No comments found.