i have the following problem. I createt a class where i defined a couble of attributes. after that i instanced a Serie<> and the type is the name of the class with the attribute where i want to save all the values i need. But when i´d like to ask for the values[1] i alwas get this error.
where is the problem. there shoud be saved value[0] and value[1].
In the following the code.
Candle = new Series<LevelAndre>(this, MaximumBarsLookBack.Infinite);
}
}
protected override void OnBarUpdate()
{
if (startTime.Date != Time[0].Date)
{
startTime = new DateTime(Time[0].Year, Time[0].Month, myDate.Day, StartTime.Hour, StartTime.Minute, StartTime.Second);
myDate = new DateTime(Time[0].Year, Time[0].Month, myDate.Day, StartTime.Hour, StartTime.Minute, StartTime.Second);
}
if (BarsPeriod.BarsPeriodType == BarsPeriodType.Minute)
{
if (CurrentBar < 1)
{
return;
}
if (BarsPeriod.Value == 60)
{
if (Time[0] == startTime)
{
LevelAndre level = new LevelAndre(High[0], Low[0], Open[0], Close[0], Time[0], BarsPeriod.BarsPeriodType, BarsPeriod.Value, CurrentBar);
Candle[0] = level;
Print(Candle[0].Starts.Month);
if (Candle.Count >= 0 && count == false)
{
count = true;
}
else if (count)
{
Print(Candle[1].ID);
Print("");
Draw.Line(this, "Cost Afferage", true, CurrentBar - Candle[0].ID, Candle[1].Close, CurrentBar - Candle[0].ID, Candle[0].Close, Plots[0].Brush, Plots[0].DashStyleHelper, (int)Plots[0].Width, DrawOnPricePanel);
}
Thanks for your help in advance!

Comment