Indicator code I'm trying to pass:
public SlopeStatus currentSlope;
public enum SlopeStatus
{
UpShallow,
UpSteep,
DownShallow,
DownSteep,
Flat
}
if (xSlope <= -angle2)
{
PlotBrushes[0][0] = EmaSlopeDownAngleSteep;
PlotBrushes[1][0] = EmaSlopeDownAngleSteep;
PlotBrushes[2][0] = EmaSlopeDownAngleSteep;
currentSlope = SlopeStatus.DownSteep;
}
else
if (xSlope <= -angle1)
{
PlotBrushes[0][0] = EmaSlopeDownAngleShallow;
PlotBrushes[1][0] = EmaSlopeDownAngleShallow;
PlotBrushes[2][0] = EmaSlopeDownAngleShallow;
currentSlope = SlopeStatus.DownShallow;
}
else
{
PlotBrushes[0][0] = EMAflat;
PlotBrushes[1][0] = EMAflat;
PlotBrushes[2][0] = EMAflat;
currentSlope = SlopeStatus.Flat;
}
case MarketPosition.Flat:
switch (momentumBands1.currentSlope)
{
case Indicators.MomentumBands.SlopeStatus.Flat:
return;
case Indicators.MomentumBands.SlopeStatus.UpShallow:
ExecuteLongEntry("Going Long");
break;
case Indicators.MomentumBands.SlopeStatus.UpSteep:
ExecuteLongEntry("Going Long");
break;
case Indicators.MomentumBands.SlopeStatus.DownShallow:
ExecuteShortEntry("Going Short");
break;
case Indicators.MomentumBands.SlopeStatus.DownSteep:
ExecuteShortEntry("Going Short");
break;
}
break;
Thanks!

Comment