protected override void OutPosition(PriceBars priceBar, BarItemType barType) { majorTrend = GetMajorTrend(); if (IsLongSetup(priceBar)) { Enter(PositionMode.Long); } else if (IsShortSetup(priceBar)) { Enter(PositionMode.Short); } }
protected override void OutPosition(PriceBars priceBar, BarItemType barType) { if (CrossesAbove(sma10.Value(1), sma10.Value(), sma50.Value(1), sma50.Value())) { trend = TrendDirectionMode.Bullish; } else if (CrossesBelow(sma10.Value(1), sma10.Value(), sma50.Value(1), sma50.Value())) { trend = TrendDirectionMode.Bearish; } if (IsLongSetup(priceBar)) { Enter(PositionMode.Long); } else if (IsShortSetup(priceBar)) { Enter(PositionMode.Short); } }