I understand I can do a simple multiplication on length in the input, but this is just the start of my code and I can't get past that.
public class HMASuite : Indicator
{
HMA hullMAMult;
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Description = @"Enter the description for your new custom Indicator here.";
Name = "HMASuite";
Calculate = Calculate.OnEachTick;
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;
Length = 60;
Multiplier = 3;
AddLine(Brushes.LightSalmon, 4, "HullMultiplier");
}
else if (State == State.Configure)
{
}
else if (State == State.DataLoaded)
{
hullMAMult = HMA(Close, Length * Multiplier);
}
}
protected override void OnBarUpdate()
{
//Add your custom indicator logic here.
if (CurrentBar < 1)
return;
Value[0] = hullMAMult[0];
Print("Test");
//= hullMAMult[0];
if(IsRising(Value)) {PlotBrushes[0][0] = Brushes.Green;}
else if(IsFalling(Value)) {PlotBrushes[0][0] = Brushes.Red;}
else {PlotBrushes[0][0] = Brushes.Yellow;}
}
Comment