I added a dataseries,,,
else if (State == State.Configure)
{
AddDataSeries(Data.BarsPeriodType.Minute, 15);
}
and then wrote OnBarUpdate ...
if ((CurrentBars[1] > 1)
{
double CDL15Open = Opens[1][0];
double CDL15Close = Closes[1][0];
double CDL15Diff = Math.Round((CDL15Open- CDL15Close),2);
Draw.Text(this, "CDL15Open", true, CDL15Open.ToString(), 0, High[5], 0, Brushes.White, new SimpleFont(), TextAlignment.Center, Brushes.Orange, Brushes.Black, 10);
Draw.Text(this, "CDL15Close", true, CDL15Close.ToString(), 0, High[4], 0, Brushes.White, new SimpleFont(), TextAlignment.Center, Brushes.Orange, Brushes.Black, 10);
Draw.Text(this, "CDL15Diff", true, CDL15Diff.ToString(), 0, High[3], 0, Brushes.White, new SimpleFont(), TextAlignment.Center, Brushes.Orange, Brushes.Black, 10);
}
I'm getting values all right but when printed on screen, the values printed where from 2 or 3 candles back as if i had written Opens[1][2];
How do i reference the OHLC of the currently forming higher time frame in the added dataseries?
Comment