示例#1
0
        protected override void OnStart()
        {
            hmafast      = Indicators.GetIndicator <HMAfast>(5);
            hmaslow      = Indicators.GetIndicator <HMAslow>(31);
            HmaDaySeries = MarketData.GetSeries(TimeFrame.Daily);
            hmaSignal    = Indicators.GetIndicator <HMAHTF>(HmaDaySeries, 21, false, false, 3, false, 24);


            Positions.Opened += PositionsOnOpened;
            Positions.Closed += PositionsOnClosed;
        }
示例#2
0
        protected override void OnStart()
        {
            hmafast      = Indicators.GetIndicator <HMAfast>(5);
            hmaslow      = Indicators.GetIndicator <HMAslow>(31);
            _macd        = Indicators.MacdHistogram(LongCycle, ShortCycle, Period);
            HmaDaySeries = MarketData.GetSeries(TimeFrame.Hour4);
            hmaSignal    = Indicators.GetIndicator <HMAHTF>(HmaDaySeries, 21, false, false, 3, false, 24);


            Positions.Opened += PositionsOnOpened;
            Positions.Closed += PositionsOnClosed;
        }
示例#3
0
        protected override void OnStart()
        {
            _hmafastshift = Indicators.GetIndicator <HMAFastShift>(FastPeriod, FastShift);
            _hmaslowshift = Indicators.GetIndicator <HMASlowShift>(SlowPeriod, SlowShift);
            _macd         = Indicators.MacdHistogram(LongCycle, ShortCycle, Period);
            HmaDaySeries  = MarketData.GetSeries(TimeFrame.Hour4);
            hmaSignal     = Indicators.GetIndicator <HMAHTF>(HmaDaySeries, 21, false, false, 3, false, 24);


            Positions.Opened += PositionsOnOpened;
            Positions.Closed += PositionsOnClosed;
        }
        protected override void OnStart()
        {
            cBotLabel         = "La Tortuga V3" + Symbol.Code + " " + TimeFrame.ToString();
            hmafast           = Indicators.GetIndicator <HMAfast>(5);
            hmaslow           = Indicators.GetIndicator <HMAslow>(31);
            HmaDaySeries      = MarketData.GetSeries(TimeFrame.Hour4);
            hmaSignal         = Indicators.GetIndicator <HMAHTF>(HmaDaySeries, 21, false, false, 3, false, 24);
            Positions.Opened += PositionsOnOpened;
            Positions.Closed += PositionsOnClosed;
            // Start Time is the same day at 07:00:00 Server Time
            _startTime = Server.Time.Date.AddHours(StartTime);

            // Stop Time is the same day at 20:00:00
            _stopTime = Server.Time.Date.AddHours(StopTime);

            Print("Start Time {0},", _startTime);
            Print("Stop Time {0},", _stopTime);
        }
        protected override void OnStart()
        {
            cBotLabel         = "Jaws V1" + " " + Symbol.Code;
            hmafast           = Indicators.GetIndicator <HMAfast>(5);
            hmaslow           = Indicators.GetIndicator <HMAslow>(31);
            HmaDaySeries      = MarketData.GetSeries(TimeFrame.Minute15);
            hmaSignal         = Indicators.GetIndicator <HMAHTF>(HmaDaySeries, 21, false, false, 3, false, 24);
            Positions.Opened += PositionsOnOpened;
            Positions.Closed += PositionsOnClosed;
            _macd             = Indicators.MacdHistogram(LongCycle, ShortCycle, Period);
            _emaFast          = Indicators.ExponentialMovingAverage(Price, FastPeriods);
            // Start Time is the same day at 08:00:00 Server Time
            _startTime = Server.Time.Date.AddHours(StartTime);

            // Stop Time is the same day at 21:00:00
            _stopTime = Server.Time.Date.AddHours(StopTime);

            Print("Start Time {0},", _startTime);
            Print("Stop Time {0},", _stopTime);
        }