Description
Follow my cTrader Telegram group at https://t.me/cTraderCommunity; everyone can talk about cTrader indicators and algorithm without restrictions, though it is not allowed to spam commercial indicators to sell them. There's also a Discord Server now @ https://discord.gg/5GAPMtp and an Instagram page https://www.instagram.com/ctrader_community/
This is a RSI applied to a moving average, with trigger.
Signals from this indicator are much different from the classic RSI
using cAlgo.API;
using cAlgo.API.Indicators;
namespace cAlgo.Indicators
{
[Levels(0, 30, 70, 100)]
[Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, ScalePrecision = 1, AccessRights = AccessRights.None)]
public class RSIOMA : Indicator
{
[Parameter("RSI Periods", Group = "RSI", DefaultValue = 14)]
public int RSIPeriods { get; set; }
[Parameter("Trigger Period", Group = "RSI", DefaultValue = 8)]
public int TPeriods { get; set; }
[Parameter("MA Period", Group = "MA", DefaultValue = 14)]
public int MAPeriods { get; set; }
[Parameter("MA Type", Group = "MA", DefaultValue = MovingAverageType.Simple)]
public MovingAverageType MaType { get; set; }
[Parameter("MA Source", Group = "MA")]
public DataSeries Source { get; set; }
[Output("Rsi", LineColor = "Blue")]
public IndicatorDataSeries Rsi { get; set; }
[Output("Trigger", LineColor = "B500FFB3")]
public IndicatorDataSeries Trigger { get; set; }
private RelativeStrengthIndex _rsi;
private MovingAverage _ma;
private ExponentialMovingAverage _ema;
protected override void Initialize()
{
_ma = Indicators.MovingAverage(Source, MAPeriods, MaType);
_rsi = Indicators.RelativeStrengthIndex(_ma.Result, RSIPeriods);
_ema = Indicators.ExponentialMovingAverage(_rsi.Result, TPeriods);
}
public override void Calculate(int index)
{
Rsi[index] = _rsi.Result[index];
Trigger[index] = _ema.Result[index];
}
}
}
CY
cysecsbin.01
Joined on 10.11.2018 Blocked
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: RSIOMA.algo
- Rating: 0
- Installs: 2026
- Modified: 13/10/2021 09:54
Note that publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section, please use the Copyright Infringement Notification form to submit a claim.
Comments
Log in to add a comment.
Where is there a better explanation of forex codes? I am very interested in this issue. Thanks!
five nights at freddy's 2