How to Code Multi Timeframe & Multi Instruments Indicators for NinjaTrader?

In this post I will show you how we can easily multi timeframe and multi instrument indicators on NinjaTrader very easily as compared to on MT5 and MT4. NinjaTrader provides us with its C# based NinjaScript framework that is very powerful as compared to MQL4 and MQL5 provided by MetaQoutes Corporation. C# is a very powerful modern object oriented programming language that you can use to do a lot of things. Coding NinjaTrader indicators using C# does not require us to be experts in C#. We should just have some basic understanding of programming and how to create methods and classes stuff like that. With this basic knowledge of C# we are all set to code indicators on NinjaTrader. You should have some idea of what an interface is. Interface is a contract that each class agrees to maintain.

As I said above you don’t need to be an expert C# programmer to start coding NinjaTrader indicators. If you know some object oriented programming in any programming language you are all set to start coding NinjaTrader indicators. The purpose of an indicator is to help you in your trading by giving trading signals that you can then analyze and decide whether you want to trade that trading signal or skip it. Now this is a simple indicator. There is nothing complicated in it. It will give an alert whenever a bar gets formed on SMA50 on M15, M20, M30 and H1 timeframes. When the bars forms on these four timeframes you will get a sound alert and in the output window you can find the currency pair name and the timeframe. Below is the code for this indicator.

#region Using declarations
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Gui;
using NinjaTrader.Gui.Chart;
using NinjaTrader.Gui.SuperDom;
using NinjaTrader.Gui.Tools;
using NinjaTrader.Data;
using NinjaTrader.NinjaScript;
using NinjaTrader.Core.FloatingPoint;
using NinjaTrader.NinjaScript.DrawingTools;
#endregion

//This namespace holds Indicators in this folder and is required. Do not change it. 
namespace NinjaTrader.NinjaScript.Indicators
{
	public class D1 : Indicator
	{
		#region Variables

		private double _pip;
		
		


		#endregion

		#region Currency Pairs Array
		private string[] _pairs ={"EURUSD", "GBPUSD", "USDJPY",
		"USDCHF", "AUDUSD", "NZDUSD", "USDCAD", "GBPJPY", "GBPCHF",
		"GBPCAD", "GBPAUD", "GBPNZD", "EURJPY", "AUDJPY",
		"NZDJPY", "CADJPY", "CHFJPY", "EURCHF", "AUDCHF",
		"NZDCHF", "CADCHF", "EURAUD", "AUDNZD", "AUDCAD",
		"EURNZD", "NZDCAD", "EURCAD", "EURGBP"};
		#endregion


		protected override void OnStateChange()
		{
			if (State == State.SetDefaults)
			{
				Description									= @"SMA50 Alert on different timeframes.";
				Name										= "D1";
				Calculate									= Calculate.OnBarClose;
				IsOverlay									= true;
				DisplayInDataBox							= false;
				DrawOnPricePanel							= false;
				DrawHorizontalGridLines						= false;
				DrawVerticalGridLines						= false;
				PaintPriceMarkers							= false;
				ScaleJustification							= NinjaTrader.Gui.Chart.ScaleJustification.Right;
				//Disable this property if your indicator requires custom values that cumulate with each new market data event. 
				//See Help Guide for additional information.
				IsSuspendedWhileInactive					= true;
				Lookback = 55;
			}
			else if (State == State.Configure)
			{
				#region Add Timeframe Data Series
				foreach (string _pair in _pairs)
				{

					// Add M15 Bars object - BarsInProgress index = 1
					AddDataSeries(_pair, BarsPeriodType.Minute, 15);
					// Add M20 Bars object - BarsInProgress index = 2
					AddDataSeries(_pair, BarsPeriodType.Minute, 20);
					// Add M30 Bars Bars object - BarsInProgress index = 3
					AddDataSeries(_pair, BarsPeriodType.Minute, 30);
					// Add H1 Bars Bars object - BarsInProgress index = 4
					AddDataSeries(_pair, BarsPeriodType.Minute, 60);
					

				}
				#endregion

			}

			else if (State == State.DataLoaded)
			{
				//initialize the pip value
				_pip = PipPoint();

				

			}
		}//End OnStateChange()

		protected override void OnBarUpdate()
		{
			for (int k = 0; k < _pairs.Length; k++)
			{

				#region M15 Chart
				//Check M15 Bars

				if (BarsInProgress == 4 * k + 1)
				{

					if (CurrentBars[4 * k + 1] < Lookback) return;

					int _alert = 0;
					_alert = CheckPattern(Highs[4 * k + 1],
						Lows[4 * k + 1], Closes[4 * k + 1]);

					SignalAlert(_alert);



				}//End of M15

				#endregion

				#region M20 Chart
				//Check M20 Bars


				if (BarsInProgress == 4 * k + 2)
				{

					if (CurrentBars[4 * k + 2] < Lookback) return;

					int _alert = 0;
					_alert = CheckPattern(Highs[4 * k + 2],
						Lows[4 * k + 2], Closes[4 * k + 2]);

					SignalAlert(_alert);

				}//End of M20

				#endregion

				#region M30 Chart
				//Check M30 Bars


				if (BarsInProgress == 4 * k + 3)
				{

					if (CurrentBars[4 * k + 3] < Lookback) return;

					int _alert = 0;
					_alert = CheckPattern(Highs[4 * k + 3],
						Lows[4 * k + 3], Closes[4 * k + 3]);

					SignalAlert(_alert);

				}//End of M30

				#endregion

				#region H1 Chart
				//Check H1 Bars


				if (BarsInProgress == 4 * k + 4)
				{

					if (CurrentBars[4 * k + 4] < Lookback) return;

					int _alert = 0;
					_alert = CheckPattern(Highs[4 * k + 4],
						Lows[4 * k + 4], Closes[4 * k + 4]);

					SignalAlert(_alert);

				}//End of H1

				#endregion





			}//End of for loop
		}

		#region Properties
		[NinjaScriptProperty]
		[Range(20, 1000)]
		[Display(Name = "Lookback",
			Description = "Number of bars to Lookback",
			Order = 1, GroupName = "Parameters")]
		public int Lookback
		{ get; set; }

		#endregion

		#region Pip Point Calculator

		protected double PipPoint()
		{
			double pipValue = 10 * TickSize;
			return pipValue;


		}

		#endregion

		#region Check Pattern
		protected int CheckPattern(PriceSeries highs, 
			PriceSeries lows, PriceSeries closes)
		{

			int _checkPattern = 0;


			double sma50 = SMA(closes, 50)[0];
			


			if (highs[0] > sma50 && lows[0] < sma50) 
				_checkPattern = 1;
			




			return _checkPattern;
		}


		#endregion

		#region Signal Alert
		protected void SignalAlert(int _signal)
		{
			if (_signal == 1)
			{
				string _name = Bars.ToChartString();
				Print(_name);

				Alert("SMA50 Signal", Priority.High, "SMA50 Signal",
							NinjaTrader.Core.Globals.InstallDir + @"\sounds\Alert1.wav",
							10, Brushes.Black, Brushes.Yellow);

			}		

		}


		#endregion
	}
}

#region NinjaScript generated code. Neither change nor remove.

namespace NinjaTrader.NinjaScript.Indicators
{
	public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase
	{
		private D1[] cacheD1;
		public D1 D1()
		{
			return D1(Input);
		}

		public D1 D1(ISeries<double> input)
		{
			if (cacheD1 != null)
				for (int idx = 0; idx < cacheD1.Length; idx++)
					if (cacheD1[idx] != null &&  cacheD1[idx].EqualsInput(input))
						return cacheD1[idx];
			return CacheIndicator<D1>(new D1(), input, ref cacheD1);
		}
	}
}

namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns
{
	public partial class MarketAnalyzerColumn : MarketAnalyzerColumnBase
	{
		public Indicators.D1 D1()
		{
			return indicator.D1(Input);
		}

		public Indicators.D1 D1(ISeries<double> input )
		{
			return indicator.D1(input);
		}
	}
}

namespace NinjaTrader.NinjaScript.Strategies
{
	public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase
	{
		public Indicators.D1 D1()
		{
			return indicator.D1(Input);
		}

		public Indicators.D1 D1(ISeries<double> input )
		{
			return indicator.D1(input);
		}
	}
}

#endregion

The code looks complicated. If you have never coded a NinjaTrader indicator than ofcourse you will find the code complicated. Once you code one or two indicators you will find the code easy. NinjaTrader provides us with the NinjaScript framework to code indicators. NinjaScript gives you a template for the indicator. There are predefined methods that drive the event driven NinjaScript engine. We need to know what a method is doing. For example we have this OnStateChange() method that will intimidate you at the top of the code. I will explain everything in this blog post. So don’t panic. Now this is another indicator:

#region Using declarations
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Gui;
using NinjaTrader.Gui.Chart;
using NinjaTrader.Gui.SuperDom;
using NinjaTrader.Gui.Tools;
using NinjaTrader.Data;
using NinjaTrader.NinjaScript;
using NinjaTrader.Core.FloatingPoint;
using NinjaTrader.NinjaScript.DrawingTools;
#endregion

//This namespace holds Indicators in this folder and is required. Do not change it. 
namespace NinjaTrader.NinjaScript.Indicators
{
	public class D8 : Indicator
	{
        #region Variables
               
        private double _pip;		
		private int[][] _sma;
		private string _alert;


		#endregion

		#region Currency Pairs Array
		private string[] _pairs ={"EURUSD", "GBPUSD", "USDJPY",
		"USDCHF", "AUDUSD", "NZDUSD", "USDCAD", "GBPJPY", "GBPCHF",
		"GBPCAD", "GBPAUD", "GBPNZD", "EURJPY", "AUDJPY",
		"NZDJPY", "CADJPY", "CHFJPY", "EURCHF", "AUDCHF",
		"NZDCHF", "CADCHF", "EURAUD", "AUDNZD", "AUDCAD",
		"EURNZD", "NZDCAD", "EURCAD", "EURGBP"};
		#endregion


		protected override void OnStateChange()
		{
			if (State == State.SetDefaults)
			{
				Description = @"Multi Timeframe Indicator.";
				Name = "D8";
				Calculate = Calculate.OnBarClose;
				IsOverlay = true;
				DisplayInDataBox = true;
				DrawOnPricePanel = true;
				DrawHorizontalGridLines = true;
				DrawVerticalGridLines = true;
				PaintPriceMarkers = true;
				ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right;
				//Disable this property if your indicator requires custom values that cumulate with each new market data event. 
				//See Help Guide for additional information.
				IsSuspendedWhileInactive = true;
				Lookback =25;
			}
			else if (State == State.Configure)
			{				

				#region Add Currency Pairs
				foreach (string _pair in _pairs)
				{

					// Add H1 Bars object - BarsInProgress index = 1
					AddDataSeries(_pair, BarsPeriodType.Minute, 60);
					// Add H2 Bars object - BarsInProgress index = 2
					AddDataSeries(_pair, BarsPeriodType.Minute, 120);
					// Add H3 Bars Bars object - BarsInProgress index = 3
					AddDataSeries(_pair, BarsPeriodType.Minute, 180);
					// Add H4 Bars Bars object - BarsInProgress index = 4
					AddDataSeries(_pair, BarsPeriodType.Minute, 240);
					// Add H6 Bars Bars object - BarsInProgress index = 5
					AddDataSeries(_pair, BarsPeriodType.Minute, 360);
					// Add H8 Bars object - BarsInProgress index = 6
					AddDataSeries(_pair, BarsPeriodType.Minute, 480);
					// Add H10 Bars object - BarsInProgress index = 7
					AddDataSeries(_pair, BarsPeriodType.Minute, 600);
					// Add H12 Bars object - BarsInProgress index = 8
					AddDataSeries(_pair, BarsPeriodType.Minute, 720);
					// Add H16 Bars object - BarsInProgress index = 9
					AddDataSeries(_pair, BarsPeriodType.Minute, 960);
					// Add D1 Bars object - BarsInProgress index = 10
					AddDataSeries(_pair, BarsPeriodType.Day, 1);


				}
				#endregion
			}

			else if (State == State.DataLoaded)
			{
				//initialize the pip value
				_pip = PipPoint();

				#region initialize the pattern array
				_sma = new int[10][];

				for (int k = 0; k < 10; k++) 
				{
					_sma[k] = new int[_pairs.Length];
				
				}

				#endregion

			}

		}//End OnStateChange()

		protected override void OnBarUpdate()
		{
			
			for (int k = 0; k < _pairs.Length; k++)
			{							

					#region D1 Chart
					//Check D1 Bars

					if (BarsInProgress == 10 * k + 10)
					{

						if (CurrentBars[10 * k + 10] < Lookback) return;

						_sma[0][k] = CheckPattern(Highs[10 * k + 10],
							Lows[10 * k + 10], Closes[10 * k + 10]);



					}//End of D1

				#endregion

					#region H16 Chart
					//Check H16 Bars


					if (BarsInProgress == 10 * k + 9)
					{

						if (CurrentBars[10 * k + 9] < Lookback) return;

						_sma[1][k] = CheckPattern(Highs[10 * k + 9],
							Lows[10 * k + 9], Closes[10 * k + 9]);



					}//End of H16

					#endregion

					#region H12 Chart
					//Check H12 Bars


					if (BarsInProgress == 10 * k + 8)
					{

						if (CurrentBars[10 * k + 8] < Lookback) return;

						_sma[2][k] = CheckPattern(Highs[10 * k + 8],
							Lows[10 * k + 8], Closes[10 * k + 8]);



					}//End of H12

					#endregion

					#region H10 Chart
					//Check H10 Bars


					if (BarsInProgress == 10 * k + 7)
						{

							if (CurrentBars[10 * k + 7] < Lookback) return;

							_sma[3][k] = CheckPattern(Highs[10 * k + 7],
								Lows[10 * k + 7], Closes[10 * k + 7]);



						}//End of H10

						#endregion

					#region H8 Chart
					//Check H8 Bars

					if (BarsInProgress == 10 * k + 6)
					{

						if (CurrentBars[10 * k + 6] < Lookback) return;

						_sma[4][k] = CheckPattern(Highs[10 * k + 6],
							Lows[10 * k + 6], Closes[10 * k + 6]);



					}//End of H8

					#endregion

					#region H6 Chart
					//Check H6 Bars

					if (BarsInProgress == 10 * k + 5)
					{

						if (CurrentBars[10 * k + 5] < Lookback) return;

						_sma[5][k] = CheckPattern(Highs[10 * k + 5],
							Lows[10 * k + 5], Closes[10 * k + 5]);



					}//End of H6

					#endregion

					#region H4 Chart
					//Check H4 Bars

					if (BarsInProgress == 10 * k + 4)
					{

						if (CurrentBars[10 * k + 4] < Lookback) return;

						_sma[6][k] = CheckPattern(Highs[10 * k + 4],
							Lows[10 * k + 4], Closes[10 * k + 4]);



					}//End of H4

					#endregion

					#region H3 Chart
					//Check H3 Bars

					if (BarsInProgress == 10 * k + 3)
					{

						if (CurrentBars[10 * k + 3] < Lookback) return;

						_sma[7][k] = CheckPattern(Highs[10 * k + 3],
							Lows[10 * k + 3], Closes[10 * k + 3]);



					}//End of H3

					#endregion

					#region H2 Chart
					//Check H2 Bars				

					if (BarsInProgress == 10 * k + 2)
					{

						if (CurrentBars[10 * k + 2] < Lookback) return;

						_sma[8][k] = CheckPattern(Highs[10 * k + 2],
							Lows[10 * k + 2], Closes[10 * k + 2]);



					}//End of H2
				
				#endregion

					#region H1 Chart
					//Check H1 Bars

					if (BarsInProgress == 10 * k + 1)
					{

						if (CurrentBars[10 * k + 1] < Lookback) return;

						_sma[9][k] = CheckPattern(Highs[10 * k + 1], Lows[10 * k + 1],
							Closes[10 * k + 1]);						

						_alert = Bars.Instrument.MasterInstrument.Name +
									" H1: " + _sma[9][k] +
									" H2: " + _sma[8][k] +
									" H3: " + _sma[7][k] +
									" H4: " + _sma[6][k] +
									" H6: " + _sma[5][k] +
									" H8: " + _sma[4][k] +
									" H10: " + _sma[3][k] +
									" H12: " + _sma[2][k] +
									" H16: " + _sma[1][k] +
									" D1: " + _sma[0][k];

						Print(_alert);



					}//End of H1



				#endregion

					

			}//End of for loop

		}

		#region Properties
		[NinjaScriptProperty]
		[Range(20, 1000)]
		[Display(Name = "Lookback",
			Description = "Number of bars to Lookback",
			Order = 1, GroupName = "Parameters")]
		public int Lookback
		{ get; set; }

		#endregion

		#region Email Signal And Alert
		protected void EmailSignal(double _high, double _low, int _signal)
		{

			//Buy Signal
			if (_signal == 1)
			{

				double _stopLoss = _low;

				string _name = Bars.ToChartString() + " Buy";
				Print(_name + " SL: " + _stopLoss.ToString());

				Alert("BuySignal", Priority.High, "Buy Signal",
							NinjaTrader.Core.Globals.InstallDir + @"\sounds\Alert1.wav",
							10, Brushes.Black, Brushes.Yellow);

				SendMail("ahmad_hassam@hotmail.com", _name, " SL: " + _stopLoss.ToString());

			}

			//Sell Signal
			if (_signal == -1)
			{
				double _stopLoss = _high;

				string _name = Bars.ToChartString() + " Sell";
				Print(_name + " SL: " + _stopLoss.ToString());

				Alert("SellSignal", Priority.High, "Sell Signal",
							NinjaTrader.Core.Globals.InstallDir + @"\sounds\Alert1.wav",
							10, Brushes.Black, Brushes.Yellow);



				SendMail("ahmad_hassam@hotmail.com", _name, " SL: " + _stopLoss.ToString());
			}

		}


		#endregion

		#region Email Signal And Alert Overload
		protected void EmailSignal(Tuple<int, double> _signal1,
			int _signal2)
		{

			//Buy Signal
			if (_signal1.Item1 == 1 && _signal2 == 1)
			{

				double _stopLoss = _signal1.Item2;

				string _name = Bars.ToChartString() + " Buy";
				Print(_name + " SL: " + _stopLoss.ToString());

				Alert("BuySignal", Priority.High, "Buy Signal",
							NinjaTrader.Core.Globals.InstallDir + @"\sounds\Alert1.wav",
							10, Brushes.Black, Brushes.Yellow);

				SendMail("ahmad_hassam@hotmail.com", _name, " SL: " + _stopLoss.ToString());

			}

			//Sell Signal
			if (_signal1.Item1 == -1 && _signal2 == -1)
			{
				double _stopLoss = _signal1.Item2;

				string _name = Bars.ToChartString() + " Sell";
				Print(_name + " SL: " + _stopLoss.ToString());

				Alert("SellSignal", Priority.High, "Sell Signal",
							NinjaTrader.Core.Globals.InstallDir + @"\sounds\Alert1.wav",
							10, Brushes.Black, Brushes.Yellow);



				SendMail("ahmad_hassam@hotmail.com", _name, " SL: " + _stopLoss.ToString());
			}

		}


		#endregion		

		#region Check Momentum
		protected int CheckMomentum(PriceSeries closes)
		{

			int _momentumState = 0;


			double macd = MACD(closes, 12, 26, 9)[0];
			double signal = MACD(closes, 12, 26, 9).Avg[0];

			double macd1 = MACD(closes, 12, 26, 9)[1];
			double signal1 = MACD(closes, 12, 26, 9).Avg[1];

			if (macd > macd1) _momentumState = 1;
			else if (macd < macd1) _momentumState = -1;

			return _momentumState;
		}


		#endregion

		#region Check Pattern
		protected int CheckPattern(PriceSeries highs,
			PriceSeries lows, PriceSeries closes)
		{

			int _checkPattern = 0;


			double sma4 = SMA(closes, 4)[0];
			double sma18 = SMA(closes, 18)[0];
			double sma4_1 = SMA(closes, 4)[1];
			double sma18_1 = SMA(closes, 18)[1];
			double sma4_2 = SMA(closes, 4)[2];
			double sma18_2 = SMA(closes, 18)[2];
			double sma4_3 = SMA(closes, 4)[3];
			double sma18_3 = SMA(closes, 18)[3];

			
			if (sma4_3 > sma18_3 && highs[3] > sma18_3 &&
				lows[3] > sma18_3 && highs[3] > highs[0] &&
				lows[3] < lows[0]) _checkPattern = 8;
			else if (sma4_2 > sma18_2 && highs[2] > sma18_2 &&
				lows[2] > sma18_2 && highs[2] > highs[0] &&
				lows[2] < lows[0]) _checkPattern = 7;
			if (sma4_1 > sma18_1 && highs[1] > sma18_1 &&
				lows[1] > sma18_1 && highs[1] > highs[0] &&
				lows[1] < lows[0]) _checkPattern = 6;
			else if (sma4_3 > sma18_3 && highs[3] > sma18_3 &&
				lows[3] < sma18_3 && highs[3] > highs[0] &&
				lows[3] < lows[0]) _checkPattern = 5;
			else if (sma4_2 > sma18_2 && highs[2] > sma18_2 &&
				lows[2] < sma18_2 && highs[2] > highs[0] &&
				lows[2] < lows[0]) _checkPattern = 4;
			else if (sma4_1 > sma18_1 && highs[1] > sma18_1 &&
				lows[1] < sma18_1 && highs[1] > highs[0] &&
				lows[1] < lows[0]) _checkPattern = 3;
			else if (sma4 > sma18 && highs[0] > sma18 &&
				lows[0] < sma18) _checkPattern = 2;
			else if (sma4 > sma18) _checkPattern = 1;

			else if (sma4_3 < sma18_3 && highs[3] < sma18_3 &&
				lows[3] < sma18_3 && highs[3] > highs[0] &&
				lows[3] < lows[0]) _checkPattern = 6;
			else if (sma4_2 < sma18_2 && highs[2] < sma18_2 &&
				lows[2] < sma18_2 && highs[2] > highs[0] &&
				lows[2] < lows[0]) _checkPattern = -7;
			if (sma4_1 < sma18_1 && highs[1] < sma18_1 &&
				lows[1] < sma18_1 && highs[1] > highs[0] &&
				lows[1] < lows[0]) _checkPattern = -6;
			else if (sma4_3 < sma18_3 && highs[3] > sma18_3 &&
				lows[3] < sma18_3 && highs[3] > highs[0] &&
				lows[3] < lows[0]) _checkPattern = -5;
			else if (sma4_2 < sma18_2 && highs[2] > sma18_2 &&
				lows[2] < sma18_2 && highs[2] > highs[0] &&
				lows[2] < lows[0]) _checkPattern = -4;
			else if (sma4_1 < sma18_1 && highs[1] > sma18_1 &&
				lows[1] < sma18_1 && highs[1] > highs[0] &&
				lows[1] < lows[0]) _checkPattern = -3;
			else if (sma4 < sma18 && highs[0] > sma18 &&
				lows[0] < sma18) _checkPattern = -2;
			else if (sma4 < sma18) _checkPattern = -1;




			return _checkPattern;
		}


		#endregion

		#region Pip Point Calculator

		protected double PipPoint()
		{
			double pipValue = 10 * TickSize;
			return pipValue;


		}

		#endregion

		

	}
}

#region NinjaScript generated code. Neither change nor remove.

namespace NinjaTrader.NinjaScript.Indicators
{
	public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase
	{
		private D8[] cacheD8;
		public D8 D8(int lookback)
		{
			return D8(Input, lookback);
		}

		public D8 D8(ISeries<double> input, int lookback)
		{
			if (cacheD8 != null)
				for (int idx = 0; idx < cacheD8.Length; idx++)
					if (cacheD8[idx] != null && cacheD8[idx].Lookback == lookback && cacheD8[idx].EqualsInput(input))
						return cacheD8[idx];
			return CacheIndicator<D8>(new D8(){ Lookback = lookback }, input, ref cacheD8);
		}
	}
}

namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns
{
	public partial class MarketAnalyzerColumn : MarketAnalyzerColumnBase
	{
		public Indicators.D8 D8(int lookback)
		{
			return indicator.D8(Input, lookback);
		}

		public Indicators.D8 D8(ISeries<double> input , int lookback)
		{
			return indicator.D8(input, lookback);
		}
	}
}

namespace NinjaTrader.NinjaScript.Strategies
{
	public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase
	{
		public Indicators.D8 D8(int lookback)
		{
			return indicator.D8(Input, lookback);
		}

		public Indicators.D8 D8(ISeries<double> input , int lookback)
		{
			return indicator.D8(input, lookback);
		}
	}
}

#endregion
Published
Categorized as Forex