#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;

#endregion



#region NinjaScript generated code. Neither change nor remove.

namespace NinjaTrader.NinjaScript.Indicators
{
	public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase
	{
		
		private DynamicStopLoss[] cacheDynamicStopLoss;

		
		public DynamicStopLoss DynamicStopLoss(int lookbackBars, string accountName, bool clearOnExit, int lineBarsBack, int textPixelOffset)
		{
			return DynamicStopLoss(Input, lookbackBars, accountName, clearOnExit, lineBarsBack, textPixelOffset);
		}


		
		public DynamicStopLoss DynamicStopLoss(ISeries<double> input, int lookbackBars, string accountName, bool clearOnExit, int lineBarsBack, int textPixelOffset)
		{
			if (cacheDynamicStopLoss != null)
				for (int idx = 0; idx < cacheDynamicStopLoss.Length; idx++)
					if (cacheDynamicStopLoss[idx].LookbackBars == lookbackBars && cacheDynamicStopLoss[idx].AccountName == accountName && cacheDynamicStopLoss[idx].ClearOnExit == clearOnExit && cacheDynamicStopLoss[idx].LineBarsBack == lineBarsBack && cacheDynamicStopLoss[idx].TextPixelOffset == textPixelOffset && cacheDynamicStopLoss[idx].EqualsInput(input))
						return cacheDynamicStopLoss[idx];
			return CacheIndicator<DynamicStopLoss>(new DynamicStopLoss(){ LookbackBars = lookbackBars, AccountName = accountName, ClearOnExit = clearOnExit, LineBarsBack = lineBarsBack, TextPixelOffset = textPixelOffset }, input, ref cacheDynamicStopLoss);
		}

	}
}

namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns
{
	public partial class MarketAnalyzerColumn : MarketAnalyzerColumnBase
	{
		
		public Indicators.DynamicStopLoss DynamicStopLoss(int lookbackBars, string accountName, bool clearOnExit, int lineBarsBack, int textPixelOffset)
		{
			return indicator.DynamicStopLoss(Input, lookbackBars, accountName, clearOnExit, lineBarsBack, textPixelOffset);
		}


		
		public Indicators.DynamicStopLoss DynamicStopLoss(ISeries<double> input , int lookbackBars, string accountName, bool clearOnExit, int lineBarsBack, int textPixelOffset)
		{
			return indicator.DynamicStopLoss(input, lookbackBars, accountName, clearOnExit, lineBarsBack, textPixelOffset);
		}
	
	}
}

namespace NinjaTrader.NinjaScript.Strategies
{
	public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase
	{
		
		public Indicators.DynamicStopLoss DynamicStopLoss(int lookbackBars, string accountName, bool clearOnExit, int lineBarsBack, int textPixelOffset)
		{
			return indicator.DynamicStopLoss(Input, lookbackBars, accountName, clearOnExit, lineBarsBack, textPixelOffset);
		}


		
		public Indicators.DynamicStopLoss DynamicStopLoss(ISeries<double> input , int lookbackBars, string accountName, bool clearOnExit, int lineBarsBack, int textPixelOffset)
		{
			return indicator.DynamicStopLoss(input, lookbackBars, accountName, clearOnExit, lineBarsBack, textPixelOffset);
		}

	}
}

#endregion
