this one is not simple: https://clickalgo.com/dynamic-rsi-indicator
if you just need a simple email alert in the standard cTrader RSI indicator then try modifying the code below.
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
namespace cAlgo
{
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class RSIAmir : Indicator
{
private RelativeStrengthIndex rsi;
[Parameter("Sound ON", DefaultValue = 0, MaxValue = 1, MinValue = 0)]
public bool PlaySound { get; set; }
[Parameter("Media File", DefaultValue = "C:\\Best.mp3")]
public string MediaFile { get; set; }
[Parameter("Source", Group = "RSI")]
public DataSeries Source { get; set; }
protected override void Initialize()
{
rsi = Indicators.RelativeStrengthIndex(Source, 14);
}
public override void Calculate(int index)
{
{
if (rsi.Result.LastValue < 30)
Notifications.PlaySound(MediaFile);
else if (rsi.Result.LastValue > 50)
Notifications.PlaySound(MediaFile);
else if (rsi.Result.LastValue < 50)
Notifications.PlaySound(MediaFile);
else if (rsi.Result.LastValue > 70)
Notifications.PlaySound(MediaFile);
}
}
}
}
We may build a free version soon also.