Пример #1
0
        /// <summary>
        /// calculate indicator
        /// рассчитать индикатор
        /// </summary>
        /// <param name="candles">candles/свечи</param>
        public void Process(List <Candle> candles)
        {
            _myCandles = candles;
            if (atr == null)
            {
                atr = new Atr(false)
                {
                    IsWatr = true,
                    Lenght = Lenght
                };
            }

            atr.Process(candles);

            if (Values != null &&
                Values.Count + 1 == candles.Count)
            {
                ProcessOne(candles);
            }
            else if (Values != null &&
                     Values.Count == candles.Count)
            {
                ProcessLast(candles);
            }
            else
            {
                ProcessAll(candles);
            }
        }
Пример #2
0
        /// <summary>
        /// конструктор
        /// </summary>
        /// <param name="atr">индикатор для настроек</param>
        public AtrUi(Atr atr)
        {
            InitializeComponent();
            _atr = atr;

            TextBoxLenght.Text = _atr.Lenght.ToString();

            HostColorBase.Child           = new TextBox();
            HostColorBase.Child.BackColor = _atr.ColorBase;
            CheckBoxPaintOnOff.IsChecked  = _atr.PaintOn;
        }
Пример #3
0
        /// <summary>
        /// constructor
        /// конструктор
        /// </summary>
        /// <param name="atr">configuration indicator/индикатор для настроек</param>
        public AtrUi(Atr atr)
        {
            InitializeComponent();
            _atr = atr;

            TextBoxLenght.Text = _atr.Lenght.ToString();

            HostColorBase.Child           = new TextBox();
            HostColorBase.Child.BackColor = _atr.ColorBase;
            CheckBoxPaintOnOff.IsChecked  = _atr.PaintOn;

            ButtonColorAdx.Content       = OsLocalization.Charts.LabelButtonIndicatorColor;
            CheckBoxPaintOnOff.Content   = OsLocalization.Charts.LabelPaintIntdicatorIsVisible;
            ButtonAccept.Content         = OsLocalization.Charts.LabelButtonIndicatorAccept;
            LabelIndicatorPeriod.Content = OsLocalization.Charts.LabelIndicatorPeriod;
        }