private string IsRunningIn() { // Find the top most NinjaScriptBase NinjaScriptBase topMost = this; for (; topMost.Parent != null; topMost = topMost.Parent) {} // Check if it is a Market Analyzer Indicator Column MarketAnalyzerColumns.IndicatorMarketAnalyzerColum n ma = topMost as MarketAnalyzerColumns.IndicatorMarketAnalyzerColum n; if (ma != null) return "Market Analyzer"; // Check if its a SuperDom Indicator IndicatorSuperDomBase sd = topMost as IndicatorSuperDomBase; if (sd != null) return "Super DOM"; // Check if it is a chart indicator IndicatorBase ib = topMost as IndicatorBase; if (ib != null) return "Chart"; return "Unknown"; }
I'm not sure this IsInStrategyAnalyzer example works?
protected override void OnBarUpdate() { // Only draw the ArrowUp on our condition if we're not in the Strategy Analyzer chart if (Close[0] > SMA(High, 14)[0] && !IsInStrategyAnalyzer) Draw.ArrowUp(this, CurrentBar.ToString(), true, 0, High[0] + TickSize, Brushes.Blue); }
https://ninjatrader.com/support/help...8/strategy.htm
(also I think the link is misspelt i.e. helpGuides/nt8/isinstrategyanalyer.htm, should this be isinstrategyanalyzer.htm?)
Comment