I want to take the min and max from prior hour and draw lines in the min and max to the current hour.
I'm using this code to show the open of current hour, but the high and low isn't working, also the idea of use the high and low lines is to show the min and max of prior hour.
Thank you for your help in advance!
InicioHora = new DateTime(Time[0].Year, Time[0].Month, Time[0].Day, Time[0].Hour, 00, Time[0].Second);
FinHora = InicioHora.AddHours(1);
[COLOR=#c0392b][B]//I don't know how to find PriorStartHour and PriorEndHour and its respectives min and max values.[/B][/COLOR]
if (Time[0] >= InicioHora && Time[0] < FinHora)
{
HoraMax = Math.Max(High[0], HoraMax);
HoraMin = Math.Min(Low[0], HoraMin);
Print (HoraMax + " HoraMax");
Print (HoraMin + " HoraMin");
if (InicioHora == Time[0])
{
/// Dibujos
/// Apertura, máximo, mínimo
Draw.Line(this, "AperturaHora " + Dias, false, InicioHora, Open[0], FinHora, Open[0], Hora_Color, Hora_DashStyle, Hora_Width);
Draw.Line(this, "MáximoHora" + Dias, false, InicioHora, HoraMax, FinHora, HoraMax, MinMax_Color, MinMax_DashStyle, MinMax_Width);
Draw.Line(this, "MínimoHora" + Dias, false, InicioHora, HoraMin, FinHora, HoraMin, MinMax_Color, MinMax_DashStyle, MinMax_Width);
}
}

Comment