示例#1
0
        protected override void OnStart()
        {
            botLabel = string.Format("{0}-{1} {2}", botPrefix, Symbol.Code, TimeFrame);

            williamsPercentRange = Indicators.GetIndicator <WilliamsPercentRange>(PeriodWPR);

            Positions.Opened += OnPositionOpened;
            Positions.Closed += OnPositionClosed;

            controlBuyAndSell();
        }
示例#2
0
        protected override void OnStart()
        {
            base.OnStart();
            botLabel = string.Format("{0}-{1} {2}", botPrefix, Symbol.Code, TimeFrame);

            Print(this.botName());


            wpr = Indicators.GetIndicator <WilliamsPercentRange>(wprSource, wprPeriod, wprOverbuyCeil, wprOversellCeil, WprMagicNumber, wprMinMaxPeriod, wprExceedMinMax);

            // ZigZag Kwan MBFX Timing ou Beta
            zigzagKwanMBFXTiming = Indicators.GetIndicator <ZigzagKwanMBFXTiming>(mbfxLen, mbfxFilter);

            zigZag = Indicators.GetIndicator <ZigZag>(ZzDepth, ZzDeviation, ZzBackStep);

            trendMagic = Indicators.GetIndicator <TrendMagic>(TMCciPeriod, TMAtrPeriod);

            _cci = Indicators.CommodityChannelIndex(TMCciPeriod);

            Positions.Opened += OnPositionOpened;
            Positions.Closed += OnPositionClosed;
        }