basically this code should give me the ability to specifically select 1 of 6 tabs in a superDOM window using a specific hotkey for each tab.
here’s what I need to know so I can fill in the code better.
1. I need to identify the method or API that allows me to switch tabs in the SuperDOM window.
2. Also I need to determine how the tabs are identified or referenced in the SuperDOM window.
I need to use the identified method or API to switch to the desired tab based on the given tab index or tab name.
here is my code so far
```csharp
region Using declarations
using System;
using System.ComponentModel;
using System.Windows.Input;
using System.Linq;
using NinjaTrader.Cbi;
using NinjaTrader.NinjaScript;
using NinjaTrader.NinjaScript.Strategies;
using NinjaTrader.NinjaScript.Indicators;
#endregion
namespace NinjaTrader.NinjaScript.Strategies
{
public class SuperDOMTabHotkeys : Strategy
{
// Strategy parameters
private string[] instrumentTabs = new string[6] { "Instrument1", "Instrument2", "Instrument3", "Instrument4", "Instrument5", "Instrument6" };
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Description = @"Assigns hotkey functions to SuperDOM tabs.";
Name = "SuperDOMTabHotkeys";
Calculate = Calculate.OnBarClose;
IsExitOnSessionCloseStrategy = true;
ExitOnSessionCloseSeconds = 30;
BarsRequiredToTrade = 0;
}
}
protected override void OnHotKey(HotKeyEventArgs e)
{
base.OnHotKey(e);
// Check if a tab selection hotkey was pressed
if (e.HotKey.Equals(Key.LeftCtrl | Key.D1))
{
ChangeSuperDOMTab(0); // Switch to the first tab
}
else if (e.HotKey.Equals(Key.LeftCtrl | Key.D2))
{
ChangeSuperDOMTab(1); // Switch to the second tab
}
else if (e.HotKey.Equals(Key.LeftCtrl | Key.D3))
{
ChangeSuperDOMTab(2); // Switch to the third tab
}
else if (e.HotKey.Equals(Key.LeftCtrl | Key.D4))
{
ChangeSuperDOMTab(3); // Switch to the fourth tab
}
else if (e.HotKey.Equals(Key.LeftCtrl | Key.D5))
{
ChangeSuperDOMTab(4); // Switch to the fifth tab
}
else if (e.HotKey.Equals(Key.LeftCtrl | Key.D6))
{
ChangeSuperDOMTab(5); // Switch to the sixth tab
}
}
private void ChangeSuperDOMTab(int tabIndex)
{
if (tabIndex < 0 || tabIndex >= instrumentTabs.Length)
return;
string tabName = instrumentTabs[tabIndex];
SetTab(tabName);
}
private void SetTab(string tabName)
{
if (tabName.IsNullOrEmpty())
return;
foreach (SuperDomWindow superDomWindow in SuperDomWindows)
{
SuperDomTab selectedTab = superDomWindow.Tabs.FirstOrDefault(t => t.Header == tabName);
if (selectedTab != null)
{
superDomWindow.SelectedTab = selectedTab;
break;
}
}
}
}
}
```

Comment