Exemplo n.º 1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="name">Pass null or empty to use the UserFriendly name attribute (applicable for custom indicators, not to GenericTaLib ones).</param>
        /// <param name="isTradeable"></param>
        /// <param name="isScaledToQuotes">Is the indicator the same number scale as quote dataDelivery (for ex. a same scaled indicator is a MA indicator, and a RSI is not)</param>
        public Indicator(string name, bool?isTradeable, bool?isScaledToQuotes, string[] resultSetNames)
        {
            _name = name;
            if (string.IsNullOrEmpty(_name))
            {
                _name = GetUserFriendlyName();
            }
            _tradeable      = isTradeable;
            _scaledToQuotes = isScaledToQuotes;

            _results    = new IndicatorResults(this, resultSetNames);
            _signals    = new IndicatorSignals(this);
            _parameters = new IndicatorParameters();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="name">Pass null or empty to use the UserFriendly name attribute (applicable for custom indicators, not to GenericTaLib ones).</param>
        /// <param name="isTradeable"></param>
        /// <param name="isScaledToQuotes">Is the indicator the same number scale as quote dataDelivery (for ex. a same scaled indicator is a MA indicator, and a RSI is not)</param>
        public Indicator(string name, bool? isTradeable, bool? isScaledToQuotes, string[] resultSetNames)
        {
            _name = name;
            if (string.IsNullOrEmpty(_name))
            {
                _name = GetUserFriendlyName();
            }
            _tradeable = isTradeable;
            _scaledToQuotes = isScaledToQuotes;

            _results = new IndicatorResults(this, resultSetNames);
            _signals = new IndicatorSignals(this);
            _parameters = new IndicatorParameters();
        }
Exemplo n.º 3
0
        public object Clone()
        {
            IndicatorParameters result = new IndicatorParameters();

            lock (this)
            {
                foreach (string name in _coreValues.Keys)
                {
                    result._coreValues.Add(name, _coreValues[name]);
                }

                foreach (string name in _dynamicValues.Keys)
                {
                    result._dynamicValues.Add(name, _dynamicValues[name]);
                }
            }
            return(result);
        }
        public object Clone()
        {
            IndicatorParameters result = new IndicatorParameters();
            lock (this)
            {
                foreach (string name in _coreValues.Keys)
                {
                    result._coreValues.Add(name, _coreValues[name]);
                }

                foreach (string name in _dynamicValues.Keys)
                {
                    result._dynamicValues.Add(name, _dynamicValues[name]);
                }
            }
            return result;
        }