This has to be easy but can't figure it out now, sorry
Simple indicator like:
public class TestCallZigZag : Indicator
{
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Description = @"Enter the description for your new custom Indicator here.";
Name = "TestCallZigZag";
Calculate = Calculate.OnBarClose;
IsOverlay = false;
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;
DeviationType = DeviationType.Points;
DeviationValue = 0.5;
UseHighLow = false;
}
else if (State == State.Configure)
{
}
}
protected override void OnBarUpdate()
{
//Add your custom indicator logic here.
ZigZag(DeviationType, DeviationValue, UseHighLow).HighBar(0,1, 256);
}
[NinjaScriptProperty]
[Display(ResourceType = typeof(Custom.Resource), Name = "DeviationType", GroupName = "NinjaScriptParameters", Order = 0)]
public DeviationType DeviationType
{ get; set; }
[Range(0, int.MaxValue), NinjaScriptProperty]
[Display(ResourceType = typeof(Custom.Resource), Name = "DeviationValue", GroupName = "NinjaScriptParameters", Order = 1)]
public double DeviationValue
{ get; set; }
[NinjaScriptProperty]
[Display(ResourceType = typeof(Custom.Resource), Name = "UseHighLow", GroupName = "NinjaScriptParameters", Order = 2)]
public bool UseHighLow
{ get; set; }
and if I compile that to dll
I have to add ZigZag that it compiles and that is okay
but I can't import that to NinjaTrader
Import failed The NinjaScript Archive File may contain duplicate method names that ... (and so on)
(probably because of that included ZigZag)
Any help?, please example, no jargon...

Comment