I manage and process each tab and to create the detail i need - which is all good.
What i want to determine ... in OnWindowCreated which is called on starting a new chart within here i process the tabs. What is recommended way to check the bartype for each tab being processed in a chart ..
for each tab being processed from MainTabControl i get the following ...
ChartTab chartTab = currentTab.Content as ChartTab;
_currentTabchartControl = chartTab.ChartControl;
BarsType barType = null;
barType = Bars.BarsType as NinjaTrader.NinjaScript.BarsTypes.MYCUSTOMEBARType ;
so now i have the type of my custom type
can i check this against the bar type of the current tab being processed.
Is this bar information available at this point?
eg ... the following but realise this is not the same as bartype .. and will only tell me if tick - minute etc .. i need to know if matches my bartype ideally ... i couldnt see BarsType in the available list here ..
_currentTabchartControl.BarsPeriod.GetType
What i would like to do is only process the tab in the iteration if it matches my custom bar type and ignore/not process any other bar type.
In the OnWindowCreated called from an addon .. i would like to confirm what is available to reliably check for ... ie Bars .. Indicators loaded on the chart ?
The other way would be to check from the list of indicators...
foreach (NinjaTrader.Gui.NinjaScript.IndicatorRenderBase currentIndicator in chartIndicators)
if My indicator is on the tab ....
so either way .. asking for guidelines as to what is available .. similary to the onstatechange approach and what is available at each stage eg Bars .. Instrument etc
hope this is clear
thanks
Comment