コード例 #1
0
 public Indicator.anaCurrentDayOHLV43 anaCurrentDayOHLV43(anaSessionTypeCD43 currentSession, int factorDailyRange, int factorNoiseBands, bool includeAfterSession, int rangePeriod1, int rangePeriod2, anaSessionCountCD43 selectedSession, bool showCurrentClose, bool showCurrentOpen, bool showFibonacci, bool showHiLo, bool showMidline, bool showNoiseLevels, bool showTargetLevels, anaTargetTypeCD43 targetType)
 {
     return _indicator.anaCurrentDayOHLV43(Input, currentSession, factorDailyRange, factorNoiseBands, includeAfterSession, rangePeriod1, rangePeriod2, selectedSession, showCurrentClose, showCurrentOpen, showFibonacci, showHiLo, showMidline, showNoiseLevels, showTargetLevels, targetType);
 }
コード例 #2
0
        /// <summary>
        /// anaCurrentDayOHLV43.
        /// </summary>
        /// <returns></returns>
        public Indicator.anaCurrentDayOHLV43 anaCurrentDayOHLV43(Data.IDataSeries input, anaSessionTypeCD43 currentSession, int factorDailyRange, int factorNoiseBands, bool includeAfterSession, int rangePeriod1, int rangePeriod2, anaSessionCountCD43 selectedSession, bool showCurrentClose, bool showCurrentOpen, bool showFibonacci, bool showHiLo, bool showMidline, bool showNoiseLevels, bool showTargetLevels, anaTargetTypeCD43 targetType)
        {
            if (InInitialize && input == null)
                throw new ArgumentException("You only can access an indicator with the default input/bar series from within the 'Initialize()' method");

            return _indicator.anaCurrentDayOHLV43(input, currentSession, factorDailyRange, factorNoiseBands, includeAfterSession, rangePeriod1, rangePeriod2, selectedSession, showCurrentClose, showCurrentOpen, showFibonacci, showHiLo, showMidline, showNoiseLevels, showTargetLevels, targetType);
        }
コード例 #3
0
        /// <summary>
        /// anaCurrentDayOHLV43.
        /// </summary>
        /// <returns></returns>
        public anaCurrentDayOHLV43 anaCurrentDayOHLV43(Data.IDataSeries input, anaSessionTypeCD43 currentSession, int factorDailyRange, int factorNoiseBands, bool includeAfterSession, int rangePeriod1, int rangePeriod2, anaSessionCountCD43 selectedSession, bool showCurrentClose, bool showCurrentOpen, bool showFibonacci, bool showHiLo, bool showMidline, bool showNoiseLevels, bool showTargetLevels, anaTargetTypeCD43 targetType)
        {
            if (cacheanaCurrentDayOHLV43 != null)
                for (int idx = 0; idx < cacheanaCurrentDayOHLV43.Length; idx++)
                    if (cacheanaCurrentDayOHLV43[idx].CurrentSession == currentSession && cacheanaCurrentDayOHLV43[idx].FactorDailyRange == factorDailyRange && cacheanaCurrentDayOHLV43[idx].FactorNoiseBands == factorNoiseBands && cacheanaCurrentDayOHLV43[idx].IncludeAfterSession == includeAfterSession && cacheanaCurrentDayOHLV43[idx].RangePeriod1 == rangePeriod1 && cacheanaCurrentDayOHLV43[idx].RangePeriod2 == rangePeriod2 && cacheanaCurrentDayOHLV43[idx].SelectedSession == selectedSession && cacheanaCurrentDayOHLV43[idx].ShowCurrentClose == showCurrentClose && cacheanaCurrentDayOHLV43[idx].ShowCurrentOpen == showCurrentOpen && cacheanaCurrentDayOHLV43[idx].ShowFibonacci == showFibonacci && cacheanaCurrentDayOHLV43[idx].ShowHiLo == showHiLo && cacheanaCurrentDayOHLV43[idx].ShowMidline == showMidline && cacheanaCurrentDayOHLV43[idx].ShowNoiseLevels == showNoiseLevels && cacheanaCurrentDayOHLV43[idx].ShowTargetLevels == showTargetLevels && cacheanaCurrentDayOHLV43[idx].TargetType == targetType && cacheanaCurrentDayOHLV43[idx].EqualsInput(input))
                        return cacheanaCurrentDayOHLV43[idx];

            lock (checkanaCurrentDayOHLV43)
            {
                checkanaCurrentDayOHLV43.CurrentSession = currentSession;
                currentSession = checkanaCurrentDayOHLV43.CurrentSession;
                checkanaCurrentDayOHLV43.FactorDailyRange = factorDailyRange;
                factorDailyRange = checkanaCurrentDayOHLV43.FactorDailyRange;
                checkanaCurrentDayOHLV43.FactorNoiseBands = factorNoiseBands;
                factorNoiseBands = checkanaCurrentDayOHLV43.FactorNoiseBands;
                checkanaCurrentDayOHLV43.IncludeAfterSession = includeAfterSession;
                includeAfterSession = checkanaCurrentDayOHLV43.IncludeAfterSession;
                checkanaCurrentDayOHLV43.RangePeriod1 = rangePeriod1;
                rangePeriod1 = checkanaCurrentDayOHLV43.RangePeriod1;
                checkanaCurrentDayOHLV43.RangePeriod2 = rangePeriod2;
                rangePeriod2 = checkanaCurrentDayOHLV43.RangePeriod2;
                checkanaCurrentDayOHLV43.SelectedSession = selectedSession;
                selectedSession = checkanaCurrentDayOHLV43.SelectedSession;
                checkanaCurrentDayOHLV43.ShowCurrentClose = showCurrentClose;
                showCurrentClose = checkanaCurrentDayOHLV43.ShowCurrentClose;
                checkanaCurrentDayOHLV43.ShowCurrentOpen = showCurrentOpen;
                showCurrentOpen = checkanaCurrentDayOHLV43.ShowCurrentOpen;
                checkanaCurrentDayOHLV43.ShowFibonacci = showFibonacci;
                showFibonacci = checkanaCurrentDayOHLV43.ShowFibonacci;
                checkanaCurrentDayOHLV43.ShowHiLo = showHiLo;
                showHiLo = checkanaCurrentDayOHLV43.ShowHiLo;
                checkanaCurrentDayOHLV43.ShowMidline = showMidline;
                showMidline = checkanaCurrentDayOHLV43.ShowMidline;
                checkanaCurrentDayOHLV43.ShowNoiseLevels = showNoiseLevels;
                showNoiseLevels = checkanaCurrentDayOHLV43.ShowNoiseLevels;
                checkanaCurrentDayOHLV43.ShowTargetLevels = showTargetLevels;
                showTargetLevels = checkanaCurrentDayOHLV43.ShowTargetLevels;
                checkanaCurrentDayOHLV43.TargetType = targetType;
                targetType = checkanaCurrentDayOHLV43.TargetType;

                if (cacheanaCurrentDayOHLV43 != null)
                    for (int idx = 0; idx < cacheanaCurrentDayOHLV43.Length; idx++)
                        if (cacheanaCurrentDayOHLV43[idx].CurrentSession == currentSession && cacheanaCurrentDayOHLV43[idx].FactorDailyRange == factorDailyRange && cacheanaCurrentDayOHLV43[idx].FactorNoiseBands == factorNoiseBands && cacheanaCurrentDayOHLV43[idx].IncludeAfterSession == includeAfterSession && cacheanaCurrentDayOHLV43[idx].RangePeriod1 == rangePeriod1 && cacheanaCurrentDayOHLV43[idx].RangePeriod2 == rangePeriod2 && cacheanaCurrentDayOHLV43[idx].SelectedSession == selectedSession && cacheanaCurrentDayOHLV43[idx].ShowCurrentClose == showCurrentClose && cacheanaCurrentDayOHLV43[idx].ShowCurrentOpen == showCurrentOpen && cacheanaCurrentDayOHLV43[idx].ShowFibonacci == showFibonacci && cacheanaCurrentDayOHLV43[idx].ShowHiLo == showHiLo && cacheanaCurrentDayOHLV43[idx].ShowMidline == showMidline && cacheanaCurrentDayOHLV43[idx].ShowNoiseLevels == showNoiseLevels && cacheanaCurrentDayOHLV43[idx].ShowTargetLevels == showTargetLevels && cacheanaCurrentDayOHLV43[idx].TargetType == targetType && cacheanaCurrentDayOHLV43[idx].EqualsInput(input))
                            return cacheanaCurrentDayOHLV43[idx];

                anaCurrentDayOHLV43 indicator = new anaCurrentDayOHLV43();
                indicator.BarsRequired = BarsRequired;
                indicator.CalculateOnBarClose = CalculateOnBarClose;
#if NT7
                indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256;
                indicator.MaximumBarsLookBack = MaximumBarsLookBack;
#endif
                indicator.Input = input;
                indicator.CurrentSession = currentSession;
                indicator.FactorDailyRange = factorDailyRange;
                indicator.FactorNoiseBands = factorNoiseBands;
                indicator.IncludeAfterSession = includeAfterSession;
                indicator.RangePeriod1 = rangePeriod1;
                indicator.RangePeriod2 = rangePeriod2;
                indicator.SelectedSession = selectedSession;
                indicator.ShowCurrentClose = showCurrentClose;
                indicator.ShowCurrentOpen = showCurrentOpen;
                indicator.ShowFibonacci = showFibonacci;
                indicator.ShowHiLo = showHiLo;
                indicator.ShowMidline = showMidline;
                indicator.ShowNoiseLevels = showNoiseLevels;
                indicator.ShowTargetLevels = showTargetLevels;
                indicator.TargetType = targetType;
                Indicators.Add(indicator);
                indicator.SetUp();

                anaCurrentDayOHLV43[] tmp = new anaCurrentDayOHLV43[cacheanaCurrentDayOHLV43 == null ? 1 : cacheanaCurrentDayOHLV43.Length + 1];
                if (cacheanaCurrentDayOHLV43 != null)
                    cacheanaCurrentDayOHLV43.CopyTo(tmp, 0);
                tmp[tmp.Length - 1] = indicator;
                cacheanaCurrentDayOHLV43 = tmp;
                return indicator;
            }
        }