I am attempting to AddSataSeries but only if the TRading Hours is ETH.
This code will not work because the Bars Object is not available in State.Configure. So I though about capturing the Trading Selection to test for ETH.
else if (State == State.Configure)
{
if(Bars.TradingHours.Name.Contains(" ETH"))
{
// tajBar == 159753
AddDataSeries(null, new BarsPeriod(){ BarsPeriodType = (BarsPeriodType) 159753, Value = BarsPeriod.Value, Value2 = BarsPeriod.Value2},"CME US Index Futures RTH", true);
}
}
else if (State == State.DataLoaded)
{
// ETH Chart
if(Bars.TradingHours.Name.Contains(" ETH"))
{
DayType = tajBarDayType(BarsArray[1]);
}
// RTH Chart
else
{
DayType = tajBarDayType();
AddChartIndicator(DayType);
}
}
​
The item I am trying to capture in the UI is Trading Hours.
then use it in State.Configure instead of the Bars Object.

Comment