Ejemplo n.º 1
0
        //NinjaTrader.Indicator.PriceActionSwingOscillator so = null;

        #endregion

        /// <summary>
        /// This method is used to configure the strategy and is called once before any strategy method is called.
        ///
        /// </summary>
        protected override void Initialize()
        {
            //int dtbStrength = Iparm1;
            //int swingSize = Iparm2;
//			atrTimes = dparm1;
//			atrPeriod = period1;

            atr = ATRTrailing(atrTimes, atrPeriod, Ratched);
            atr.PaintPriceMarkers = false;
            atr.AutoScale         = false;
            Add(atr);

            vbo = rcVolatilityBreakout(20);
            vbo.PaintPriceMarkers = false;
            vbo.AutoScale         = false;
            Add(vbo);

//			dc = DonchianChannel(Period1);
//			dc.Displacement = 1;
//			dc.PaintPriceMarkers = false;
//			Add(dc);

            // CL settings CST
            Add(PitColor(Color.Blue, 80000, 15, 143000));

            //SetProfitTarget(CalculationMode.Ticks, Iparm1);
            //SetStopLoss(CalculationMode.Ticks, Iparm2);
            //SetTrailStop(CalculationMode.Ticks, dparm2);

            Unmanaged           = false;
            BarsRequired        = 10;
            CalculateOnBarClose = true;
            ExitOnClose         = true;
            IncludeCommission   = true;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// This method is used to configure the strategy and is called once before any strategy method is called.
        /// </summary>
        protected override void Initialize()
        {
            //ClearOutputWindow();

            //SetStopLoss("", CalculationMode.Percent, stopLossPercentage, false);
            //SetProfitTarget("", CalculationMode.Percent, profitPercentage);
            int length = 20;

            vbo = rcVolatilityBreakout(length);

            Add(vbo);
            vbo.AutoScale = false;

            CalculateOnBarClose = true;
        }