Description
The Aroon indicator - Aroon means "Morning dawn" in Sanskrit - was published by Tushar Chande in 1995. It is a very well designed indicator that indicates the amount of time that has passed since the period's high or low has occurred. Tushar Chande is a well known scientist, market analyst, and author of several trading books including "Beyond Technical Analysis". He has developed a variety of intelligent indicators. The Aroon Indicator consists of AroonUp and AroonDown. How both are calculated can be found on numerous web sites. It is less relevant in the framework of this divergence strategy. It is suffices to say that when AroonDown is high the low market price has happened recently and when AroonUp is low the high market price has happened a while ago.
Also thansk to see me now the Aroon in a different way, Muchas Gracias to Hong Kong :-)
XAUUSD in m15 Aroon MTF in h1
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
namespace cAlgo
{
[Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class AroonMTF : Indicator
{
[Parameter("TimeFrame")]
public TimeFrame SelectedTimeFrame { get; set; }
[Parameter("Period", Group = "Aroon", DefaultValue = 25, MinValue = 2)]
public int AroonPeriod { get; set; }
[Output("Up", LineColor = "Turquoise")]
public IndicatorDataSeries Up { get; set; }
[Output("Down", LineColor = "Red")]
public IndicatorDataSeries Down { get; set; }
private bool _isCurrentTimeFrame;
private MarketSeries _marketSeries;
private Aroon _aroon;
protected override void Initialize()
{
_isCurrentTimeFrame = SelectedTimeFrame == TimeFrame;
_marketSeries = _isCurrentTimeFrame ? MarketSeries : MarketData.GetSeries(SelectedTimeFrame);
_aroon = Indicators.Aroon(_marketSeries, AroonPeriod);
}
public override void Calculate(int index)
{
if (!_isCurrentTimeFrame)
{
index = _marketSeries.OpenTime.GetIndexByTime(IsLastBar ? Time : MarketSeries.OpenTime[index]);
if (index < 0)
return;
}
var aroonUp = _aroon.Up[index];
var aroonDown = _aroon.Down[index];
if (!_isCurrentTimeFrame)
{
index = MarketSeries.OpenTime.GetIndexByTime(_marketSeries.OpenTime[index]);
if (index < 0)
return;
}
Up[index] = aroonUp;
Down[index] = aroonDown;
}
}
}
IandelMar
Joined on 15.07.2018
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: Aroon MTF.algo
- Rating: 0
- Installs: 1607
- Modified: 13/10/2021 09:54