fix max and min in indicator area
Created at 08 Aug 2021, 16:22
fix max and min in indicator area
08 Aug 2021, 16:22
i want to fix min and max indicator windwos. like metatrader.
for ex: in stochastic i want to have 0 and 100 even when i zoom chart. because when i zoom chart for exmaple indicator area max and min changed.
i try this code but nothing happend.
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
namespace cAlgo
{
[Indicator(IsOverlay = false, AutoRescale = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class NewIndicator : Indicator
{
[Parameter(DefaultValue = 0.0)]
public double Parameter { get; set; }
[Output("RSI", Color = Colors.Blue)]
public IndicatorDataSeries Result { get; set; }
[Output("K", Color = Colors.Green)]
public IndicatorDataSeries K { get; set; }
[Output("D", Color = Colors.Red)]
public IndicatorDataSeries D { get; set; }
private RelativeStrengthIndex _rsi;
private StochasticOscillator _stochasticOscillator;
protected override void Initialize()
{
_rsi = Indicators.RelativeStrengthIndex(MarketSeries.High, 14);
_stochasticOscillator = Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple);
IndicatorArea.SetYRange(0, 100);
}
public override void Calculate(int index)
{
Result[index] = _rsi.Result[index];
K[index] = _stochasticOscillator.PercentK[index];
D[index] = _stochasticOscillator.PercentD[index];
IndicatorArea.SetYRange(0, 100);
}
}
}
PanagiotisCharalampous
09 Aug 2021, 08:43
Hi khoshroomahdi,
There is no such option at the moment.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous