I'm using intraday charts and I would like to be able to display the Day Of the Week on the chart i.e. bottom left beside the session start vertical line.
This way, when I scroll back through the charts, it displays the actual day of the week beside each new session.
I have tried the following and it sort of works. i.e. if I leave out the IF statement and just use the switch, I can get it to display on the far left (not session start). With the if statement I get nothing.
if (Bars.FirstBarOfSession)
{
switch (Time[0].DayOfWeek)
//switch (Bars.GetTime.dayofweek)
{
case DayOfWeek.Monday : DOW = "Monday" ; break ;
case DayOfWeek.Tuesday : DOW = "Tuesday" ; break ;
case DayOfWeek.Wednesday : DOW = "Wednesday" ; break ;
case DayOfWeek.Thursday : DOW = "Thursday" ; break ;
case DayOfWeek.Friday : DOW = "Friday" ; break ;
case DayOfWeek.Saturday : DOW = "Saturday" ; break ;
case DayOfWeek.Sunday : DOW = "Sunday" ; break ;
}
graphics.DrawString("DOW = " + DOW, ChartControl.Font, textBrush, bounds.X , bounds.Y + bounds.Height - (50+textHeight), stringFormat);
}
Any ideas?
Thanks,
Neil.
Comment