Beispiel #1
0
        protected override void OutPosition(PriceBars priceBar, BarItemType barType)
        {
            majorTrend = GetMajorTrend();

            if (IsLongSetup(priceBar))
            {
                Enter(PositionMode.Long);
            }
            else if (IsShortSetup(priceBar))
            {
                Enter(PositionMode.Short);
            }
        }
Beispiel #2
0
        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);
            }
        }