Files
QuanTAlib/quantower/Volatility/RviIndicator.cs
T

27 lines
772 B
C#
Raw Normal View History

2024-10-04 21:31:25 -07:00
using TradingPlatform.BusinessLayer;
namespace QuanTAlib;
public class RviIndicator : IndicatorBase
{
[InputParameter("Period", sortIndex: 1, 2, 100, 1, 0)]
public int Period { get; set; } = 10;
private Rvi? rvi;
protected override AbstractBase QuanTAlib => rvi!;
public override string ShortName => $"RVI {Period} : {SourceName}";
public RviIndicator() : base()
{
Name = "RVI - Relative Volatility Index";
2024-10-11 18:02:09 -07:00
Description = "Measures the direction of volatility, helping to identify overbought or oversold conditions in price.";
2024-10-04 21:31:25 -07:00
SeparateWindow = true;
2024-10-11 18:02:09 -07:00
}
2024-10-04 21:31:25 -07:00
protected override void InitIndicator()
{
rvi = new Rvi(Period);
MinHistoryDepths = rvi.WarmupPeriod;
base.InitIndicator();
}
}