Heiken Ashi free

Description

The Heikin-Ashi technique is extremely useful for making candlestick charts more readable--trends can be located more easily, and buying opportunities can be spotted at a glance. The charts are constructed in the same manner as a normal candlestick chart, with the exception of the modified bar formulas. When properly used, this technique can help you spot trends and trend changes from which you can profit!

How to install:

1) Double click on downloaded file and follow instructions

2) Add indicator from Custom menu:

3) Switch main chart to line mode:

4) Choose Black for Bear Outline color option:

Result:

25060 downloads
How to install
Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.
Formula / Source Code
Language: C#
Trading Platform: cAlgocTrader
using System;
using cAlgo.API;
using cAlgo.API.Indicators;

namespace cAlgo.Indicators
{
    [Indicator(IsOverlay = true, AccessRights = AccessRights.None)]
    public class HeikenAshiSmoothed : Indicator
    {
        private IndicatorDataSeries _haOpen;
        private IndicatorDataSeries _haClose;

        [Parameter("Candle width", DefaultValue = 5)]
        public int CandleWidth { get; set; }

        [Parameter("Up color", DefaultValue = "Blue")]
        public string UpColor { get; set; }

        [Parameter("Down color", DefaultValue = "Red")]
        public string DownColor { get; set; }

        private Colors _upColor;
        private Colors _downColor;
        private bool _incorrectColors;
        private Random _random = new Random();

        protected override void Initialize()
        {
            _haOpen = CreateDataSeries();
            _haClose = CreateDataSeries();

            if (!Enum.TryParse<Colors>(UpColor, out _upColor) || !Enum.TryParse<Colors>(DownColor, out _downColor))
                _incorrectColors = true;
        }

        public override void Calculate(int index)
        {
            if (_incorrectColors)
            {
                var errorColor = _random.Next(2) == 0 ? Colors.Red : Colors.White;
                ChartObjects.DrawText("Error", "Incorrect colors", StaticPosition.Center, errorColor);
                return;
            }

            var open = MarketSeries.Open[index];
            var high = MarketSeries.High[index];
            var low = MarketSeries.Low[index];
            var close = MarketSeries.Close[index];

            var haClose = (open + high + low + close) / 4;
            double haOpen;
            if (index > 0)
                haOpen = (_haOpen[index - 1] + _haClose[index - 1]) / 2;
            else
                haOpen = (open + close) / 2;

            var haHigh = Math.Max(Math.Max(high, haOpen), haClose);
            var haLow = Math.Min(Math.Min(low, haOpen), haClose);

            var color = haOpen > haClose ? _downColor : _upColor;
            ChartObjects.DrawLine("candle" + index, index, haOpen, index, haClose, color, CandleWidth, LineStyle.Solid);
            ChartObjects.DrawLine("line" + index, index, haHigh, index, haLow, color, 1, LineStyle.Solid);

            _haOpen[index] = haOpen;
            _haClose[index] = haClose;
        }
    }
}
Comments

DimitriK - August 09, 2013 @ 14:33

Hi, could you also convert the free MT4 indicator HAMA for use with cTrader?

It stands for Heiken Ashi Moving Average.

You can see it here

It is even more powerful than Heiken Ashi, I use it exclusively with price action to trade.

If you cannot get the file contact me and I will give it to you.

Sincerely