Thank you for your time.
namespace NinjaTrader.NinjaScript.Indicators
{
public class test3indicator : Indicator
{
private NinjaTrader.NinjaScript.Indicators.GomPro.GomOrder FlowProValues GomOrderFlowProValues1;
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Description = @"Enter the description for your new custom Indicator here.";
Name = "test3indicator";
Calculate = Calculate.OnBarClose;
IsOverlay = true;
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;
AddPlot(new Stroke(Brushes.DarkGreen, 2), PlotStyle.TriangleUp, "UpSignal");
AddPlot(new Stroke(Brushes.Red, 2), PlotStyle.TriangleDown, "DownSignal");
}
else if (State == State.Configure)
{
}
else if (State == State.DataLoaded)
{
GomOrderFlowProValues1 = GomOrderFlowProValues(Close, Gom.DeltaLib.DeltaCalcType.BidAsk, false, -1, 0, 2, Gom.OrderFlow.ImbalanceDirectionType.Diagonal, Gom.OrderFlow.ImbalanceComparisonType.Ratio, 3, Gom.OrderFlow.ImbalanceDirectionType.None, Gom.OrderFlow.ImbalanceComparisonType.Difference, 3, 0, 1, -1, 2, 100, 3, false, 0, Gom.OrderFlow.ReversalPocPositionType.Anywhere, false, false);
}
}
protected override void OnBarUpdate()
{
//Add your custom indicator logic here.
if
// Aggressive Buyers
(GomOrderFlowProValues1.NbBuyImbalances[0] >= 3)
{
Draw.TriangleUp(this, @"UpSignal" + Convert.ToString(CurrentBars[0]), false, 0, (Low[0] - 7) , Brushes.Lime);
}
}
#region Properties
[Browsable(false)]
[XmlIgnore]
public Series<double> UpSignal
{
get { return Values[0]; }
}
[Browsable(false)]
[XmlIgnore]
public Series<double> DownSignal
{
get { return Values[1]; }
}
#endregion
}

Comment