Beispiel #1
0
        protected override void OnStart()
        {
            Positions.Opened += OnPositionOpen;
            tm = new TradeManager(this);
            tm.PrintTestMessage();

            IndAtr = Indicators.AverageTrueRange(14, MovingAverageType.Simple);
            IndSMA = Indicators.SimpleMovingAverage(SMASource, SMAPeriod);
            IndSAR = Indicators.ParabolicSAR(SARMINAF, SARMAXAF);
            IndDMS = Indicators.DirectionalMovementSystem(DMSPeriod);

            /*
             * ===============================================================================================
             * DETERMINE STOP LOSS AND TAKE PROFIT VALUES
             * ===============================================================================================
             */
            if (TrailingStopTrigger == 0 || IncludeTrailingStop == false)
            {
                Vstop_loss = null;
            }
            else
            {
                Vstop_loss = TrailingStopTrigger;
            }
            // TAKE PROFIT
            // IF SET TO 0 OR USER HAS NOT INCLUDED TAKE PROFIT - SET TO NULL
            if (TakeProfitTrigger == 0 || IncludeTakeProfit == false)
            {
                Vtake_profit = null;
            }
            else
            {
                Vtake_profit = TakeProfitTrigger;
            }
        }
Beispiel #2
0
 protected override void OnStart()
 {
     Positions.Closed += PositionsOnClosed;
     Print("START GyBolliBanRange: {0}", Server.Time.ToLocalTime());
     BolliBan1 = Indicators.BollingerBands(SourceBB, PeriodBB, DeviateBB1, MaTypeBB);
     BolliBan2 = Indicators.BollingerBands(SourceBB, PeriodBB, DeviateBB2, MaTypeBB);
     SignalMA  = Indicators.MovingAverage(SourceSignalMA, PeriodSignalMA, MaTypeSignal);
     FilterADX = Indicators.DirectionalMovementSystem(PeriodADX);
 }
Beispiel #3
0
        protected override void Initialize()
        {
            _highSeries = CreateDataSeries();
            _lowSeries  = CreateDataSeries();

            _smaHigh = Indicators.SimpleMovingAverage(_highSeries, SmaPeriod);
            _smaLow  = Indicators.SimpleMovingAverage(_lowSeries, SmaPeriod);

            _dms = Indicators.DirectionalMovementSystem(AdxPeriod);
        }
Beispiel #4
0
        /// <summary>
        /// Viene generato all'avvio dell'indicatore, si inizializza l'indicatore
        /// </summary>
        protected override void Initialize()
        {
            // --> Stampo nei log la versione corrente
            Print("{0} : {1}", NAME, VERSION);

            _MyMAup = Indicators.MovingAverage(Bars.HighPrices, Period, MaType);
            _MyMA   = Indicators.MovingAverage(Bars.ClosePrices, Period, MaType);
            _MyMAdw = Indicators.MovingAverage(Bars.LowPrices, Period, MaType);

            _MyADX = Indicators.DirectionalMovementSystem(Smoothed);
        }
Beispiel #5
0
 protected override void OnStart()
 {
     Print("START GyBolliBanBreak: {0}", Server.Time.ToLocalTime());
     BolliBan1  = Indicators.BollingerBands(SourceBB, PeriodBB, DeviateBB1, MaTypeBB);
     BolliBan2  = Indicators.BollingerBands(SourceBB, PeriodBB, DeviateBB2, MaTypeBB);
     SignalMA   = Indicators.SimpleMovingAverage(SourceSignalMA, PeriodSignalMA);
     FilterADX  = Indicators.DirectionalMovementSystem(PeriodADX);
     curstate   = States.Initial;
     longstate  = HasLong.Initial;
     shortstate = HasShort.Initial;
 }
Beispiel #6
0
 protected override void Initialize()
 {
     _dms  = Indicators.DirectionalMovementSystem(ADX_Periods);
     _rsi  = Indicators.RelativeStrengthIndex(Source, FastRSI);
     _rsi2 = Indicators.RelativeStrengthIndex(Source, SlowRSI);
 }
Beispiel #7
0
 protected override void Initialize()
 {
     _dms = Indicators.DirectionalMovementSystem(14);
 }
 protected override void Initialize()
 {
     // Initialize and create nested indicators
     dms  = Indicators.DirectionalMovementSystem(ADX_Periods);
     stoc = Indicators.StochasticOscillator(K_Period, Slow_K, D_Period, MAType);
 }
Beispiel #9
0
 protected override void Initialize()
 {
     _dms     = Indicators.DirectionalMovementSystem(ADX_Periods);
     DI_Plus  = Indicators.SimpleMovingAverage(buy, ADX_Periods);
     DI_Minus = Indicators.SimpleMovingAverage(sell, ADX_Periods);
 }
Beispiel #10
0
 protected override void Initialize()
 {
     adx = Indicators.DirectionalMovementSystem(interval);
 }