Remove region color and opacity from indicator input parameters
This commit is contained in:
parent
72cc25ec22
commit
b28f81ea2f
@ -306,7 +306,6 @@ namespace NinjaTrader.NinjaScript.Indicators
|
|||||||
[Display(Name = "Period", Description = "Period for the EMA", Order = 1, GroupName = "Sonic R Dragon")]
|
[Display(Name = "Period", Description = "Period for the EMA", Order = 1, GroupName = "Sonic R Dragon")]
|
||||||
public int Period { get; set; }
|
public int Period { get; set; }
|
||||||
|
|
||||||
[NinjaScriptProperty]
|
|
||||||
[XmlIgnore]
|
[XmlIgnore]
|
||||||
[Display(Name = "Region Color", Description = "Color of the region between the EMAs of highs and lows", Order = 2, GroupName = "Sonic R Dragon")]
|
[Display(Name = "Region Color", Description = "Color of the region between the EMAs of highs and lows", Order = 2, GroupName = "Sonic R Dragon")]
|
||||||
public Brush RegionColor { get; set; }
|
public Brush RegionColor { get; set; }
|
||||||
@ -318,7 +317,6 @@ namespace NinjaTrader.NinjaScript.Indicators
|
|||||||
set { RegionColor = Serialize.StringToBrush(value); }
|
set { RegionColor = Serialize.StringToBrush(value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
[NinjaScriptProperty]
|
|
||||||
[Range(0, 1)]
|
[Range(0, 1)]
|
||||||
[Display(Name = "Region Opacity", Description = "Opacity of the region", Order = 3, GroupName = "Sonic R Dragon")]
|
[Display(Name = "Region Opacity", Description = "Opacity of the region", Order = 3, GroupName = "Sonic R Dragon")]
|
||||||
public double RegionOpacity { get; set; }
|
public double RegionOpacity { get; set; }
|
||||||
@ -333,18 +331,18 @@ namespace NinjaTrader.NinjaScript.Indicators
|
|||||||
public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase
|
public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase
|
||||||
{
|
{
|
||||||
private SonicRDragon[] cacheSonicRDragon;
|
private SonicRDragon[] cacheSonicRDragon;
|
||||||
public SonicRDragon SonicRDragon(int period, Brush regionColor, double regionOpacity)
|
public SonicRDragon SonicRDragon(int period)
|
||||||
{
|
{
|
||||||
return SonicRDragon(Input, period, regionColor, regionOpacity);
|
return SonicRDragon(Input, period);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SonicRDragon SonicRDragon(ISeries<double> input, int period, Brush regionColor, double regionOpacity)
|
public SonicRDragon SonicRDragon(ISeries<double> input, int period)
|
||||||
{
|
{
|
||||||
if (cacheSonicRDragon != null)
|
if (cacheSonicRDragon != null)
|
||||||
for (int idx = 0; idx < cacheSonicRDragon.Length; idx++)
|
for (int idx = 0; idx < cacheSonicRDragon.Length; idx++)
|
||||||
if (cacheSonicRDragon[idx] != null && cacheSonicRDragon[idx].Period == period && cacheSonicRDragon[idx].RegionColor == regionColor && cacheSonicRDragon[idx].RegionOpacity == regionOpacity && cacheSonicRDragon[idx].EqualsInput(input))
|
if (cacheSonicRDragon[idx] != null && cacheSonicRDragon[idx].Period == period && cacheSonicRDragon[idx].EqualsInput(input))
|
||||||
return cacheSonicRDragon[idx];
|
return cacheSonicRDragon[idx];
|
||||||
return CacheIndicator<SonicRDragon>(new SonicRDragon(){ Period = period, RegionColor = regionColor, RegionOpacity = regionOpacity }, input, ref cacheSonicRDragon);
|
return CacheIndicator<SonicRDragon>(new SonicRDragon(){ Period = period }, input, ref cacheSonicRDragon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -353,14 +351,14 @@ namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns
|
|||||||
{
|
{
|
||||||
public partial class MarketAnalyzerColumn : MarketAnalyzerColumnBase
|
public partial class MarketAnalyzerColumn : MarketAnalyzerColumnBase
|
||||||
{
|
{
|
||||||
public Indicators.SonicRDragon SonicRDragon(int period, Brush regionColor, double regionOpacity)
|
public Indicators.SonicRDragon SonicRDragon(int period)
|
||||||
{
|
{
|
||||||
return indicator.SonicRDragon(Input, period, regionColor, regionOpacity);
|
return indicator.SonicRDragon(Input, period);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Indicators.SonicRDragon SonicRDragon(ISeries<double> input , int period, Brush regionColor, double regionOpacity)
|
public Indicators.SonicRDragon SonicRDragon(ISeries<double> input , int period)
|
||||||
{
|
{
|
||||||
return indicator.SonicRDragon(input, period, regionColor, regionOpacity);
|
return indicator.SonicRDragon(input, period);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -369,14 +367,14 @@ namespace NinjaTrader.NinjaScript.Strategies
|
|||||||
{
|
{
|
||||||
public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase
|
public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase
|
||||||
{
|
{
|
||||||
public Indicators.SonicRDragon SonicRDragon(int period, Brush regionColor, double regionOpacity)
|
public Indicators.SonicRDragon SonicRDragon(int period)
|
||||||
{
|
{
|
||||||
return indicator.SonicRDragon(Input, period, regionColor, regionOpacity);
|
return indicator.SonicRDragon(Input, period);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Indicators.SonicRDragon SonicRDragon(ISeries<double> input , int period, Brush regionColor, double regionOpacity)
|
public Indicators.SonicRDragon SonicRDragon(ISeries<double> input , int period)
|
||||||
{
|
{
|
||||||
return indicator.SonicRDragon(input, period, regionColor, regionOpacity);
|
return indicator.SonicRDragon(input, period);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user