Remove NinjaScriptProperty attributes from volume profile indicator
This commit is contained in:
parent
8f3cdd7082
commit
c084cf682d
@ -112,12 +112,10 @@ namespace NinjaTrader.NinjaScript.Indicators
|
|||||||
get { return Name; }
|
get { return Name; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[NinjaScriptProperty]
|
|
||||||
[Display(Name = "Profile Color", Description = "Color of the volume profile", Order = 1, GroupName = "Volume Profile")]
|
[Display(Name = "Profile Color", Description = "Color of the volume profile", Order = 1, GroupName = "Volume Profile")]
|
||||||
public Brush ProfileColor
|
public Brush ProfileColor
|
||||||
{ get; set; }
|
{ get; set; }
|
||||||
|
|
||||||
[NinjaScriptProperty]
|
|
||||||
[Display(Name = "Max Width (Pixels)", Description = "Maximum pixel width for volume bars", Order = 2, GroupName = "Volume Profile")]
|
[Display(Name = "Max Width (Pixels)", Description = "Maximum pixel width for volume bars", Order = 2, GroupName = "Volume Profile")]
|
||||||
public int MaxPixelWidth
|
public int MaxPixelWidth
|
||||||
{
|
{
|
||||||
@ -125,7 +123,6 @@ namespace NinjaTrader.NinjaScript.Indicators
|
|||||||
set { maxPixelWidth = value; }
|
set { maxPixelWidth = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[NinjaScriptProperty]
|
|
||||||
[Display(Name = "Opacity (%)", Description = "Opacity of volume profile", Order = 3, GroupName = "Volume Profile")]
|
[Display(Name = "Opacity (%)", Description = "Opacity of volume profile", Order = 3, GroupName = "Volume Profile")]
|
||||||
public int Opacity
|
public int Opacity
|
||||||
{ get; set; }
|
{ get; set; }
|
||||||
@ -139,18 +136,18 @@ namespace NinjaTrader.NinjaScript.Indicators
|
|||||||
public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase
|
public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase
|
||||||
{
|
{
|
||||||
private VP[] cacheVP;
|
private VP[] cacheVP;
|
||||||
public VP VP(Brush profileColor, int maxPixelWidth, int opacity)
|
public VP VP()
|
||||||
{
|
{
|
||||||
return VP(Input, profileColor, maxPixelWidth, opacity);
|
return VP(Input);
|
||||||
}
|
}
|
||||||
|
|
||||||
public VP VP(ISeries<double> input, Brush profileColor, int maxPixelWidth, int opacity)
|
public VP VP(ISeries<double> input)
|
||||||
{
|
{
|
||||||
if (cacheVP != null)
|
if (cacheVP != null)
|
||||||
for (int idx = 0; idx < cacheVP.Length; idx++)
|
for (int idx = 0; idx < cacheVP.Length; idx++)
|
||||||
if (cacheVP[idx] != null && cacheVP[idx].ProfileColor == profileColor && cacheVP[idx].MaxPixelWidth == maxPixelWidth && cacheVP[idx].Opacity == opacity && cacheVP[idx].EqualsInput(input))
|
if (cacheVP[idx] != null && cacheVP[idx].EqualsInput(input))
|
||||||
return cacheVP[idx];
|
return cacheVP[idx];
|
||||||
return CacheIndicator<VP>(new VP(){ ProfileColor = profileColor, MaxPixelWidth = maxPixelWidth, Opacity = opacity }, input, ref cacheVP);
|
return CacheIndicator<VP>(new VP(), input, ref cacheVP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -159,14 +156,14 @@ namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns
|
|||||||
{
|
{
|
||||||
public partial class MarketAnalyzerColumn : MarketAnalyzerColumnBase
|
public partial class MarketAnalyzerColumn : MarketAnalyzerColumnBase
|
||||||
{
|
{
|
||||||
public Indicators.VP VP(Brush profileColor, int maxPixelWidth, int opacity)
|
public Indicators.VP VP()
|
||||||
{
|
{
|
||||||
return indicator.VP(Input, profileColor, maxPixelWidth, opacity);
|
return indicator.VP(Input);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Indicators.VP VP(ISeries<double> input , Brush profileColor, int maxPixelWidth, int opacity)
|
public Indicators.VP VP(ISeries<double> input )
|
||||||
{
|
{
|
||||||
return indicator.VP(input, profileColor, maxPixelWidth, opacity);
|
return indicator.VP(input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -175,14 +172,14 @@ namespace NinjaTrader.NinjaScript.Strategies
|
|||||||
{
|
{
|
||||||
public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase
|
public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase
|
||||||
{
|
{
|
||||||
public Indicators.VP VP(Brush profileColor, int maxPixelWidth, int opacity)
|
public Indicators.VP VP()
|
||||||
{
|
{
|
||||||
return indicator.VP(Input, profileColor, maxPixelWidth, opacity);
|
return indicator.VP(Input);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Indicators.VP VP(ISeries<double> input , Brush profileColor, int maxPixelWidth, int opacity)
|
public Indicators.VP VP(ISeries<double> input )
|
||||||
{
|
{
|
||||||
return indicator.VP(input, profileColor, maxPixelWidth, opacity);
|
return indicator.VP(input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user