Ejemplo n.º 1
0
        public PatternTraderUi(PatternTrader bot)
        {
            InitializeComponent();

            _bot = bot;

            _gridPatternsToOpen                   = new DataGridView();
            _gridPatternsToOpen.MouseClick       += _gridPatternsToOpen_MouseClick;
            _gridPatternsToOpen.CellValueChanged += _gridPatternsToOpen_CellValueChanged;

            _gridPatternsToClose                   = new DataGridView();
            _gridPatternsToClose.MouseClick       += _gridPatternsToClose_MouseClick;
            _gridPatternsToClose.CellValueChanged += _gridPatternsToClose_CellValueChanged;

            CreateGridPatternsGrid(_gridPatternsToOpen, HostGridPatternsToOpen);
            CreateGridPatternsGrid(_gridPatternsToClose, HostGridPatternToClose);

            _chartSingleOpenPattern = new ChartPainter("OpenSinglePattern");
            _chartSingleOpenPattern.IsPatternChart = true;
            _chartSingleClosePattern = new ChartPainter("CloseSinglePattern");
            _chartSingleClosePattern.IsPatternChart = true;

            _chartSingleOpenPattern.StartPaintPrimeChart(HostSinglePatternToOpen, new Rectangle());
            _chartSingleClosePattern.StartPaintPrimeChart(HostSinglePatternToClose, new Rectangle());

            InitializePrimeSettings();
            InitializePattarnsToOpenTab();
            InitializeTabClosePosition();

            PaintGridPatternsToOpen();
            PaintGridPatternsToClose();
            PaintClosePattern(0);
            PaintOpenPattern(0);
        }
Ejemplo n.º 2
0
        public PatternTraderUi(PatternTrader bot)
        {
            InitializeComponent();

            _bot = bot;

            _gridPatternsToOpen                   = new DataGridView();
            _gridPatternsToOpen.MouseClick       += _gridPatternsToOpen_MouseClick;
            _gridPatternsToOpen.CellValueChanged += _gridPatternsToOpen_CellValueChanged;

            _gridPatternsToClose                   = new DataGridView();
            _gridPatternsToClose.MouseClick       += _gridPatternsToClose_MouseClick;
            _gridPatternsToClose.CellValueChanged += _gridPatternsToClose_CellValueChanged;

            CreateGridPatternsGrid(_gridPatternsToOpen, HostGridPatternsToOpen);
            CreateGridPatternsGrid(_gridPatternsToClose, HostGridPatternToClose);

            _chartSingleOpenPattern = new ChartCandlePainter("OpenSinglePattern", bot.StartProgram);
            _chartSingleOpenPattern.IsPatternChart = true;
            _chartSingleClosePattern = new ChartCandlePainter("CloseSinglePattern", bot.StartProgram);
            _chartSingleClosePattern.IsPatternChart = true;

            _chartSingleOpenPattern.StartPaintPrimeChart(HostSinglePatternToOpen, new Rectangle());
            _chartSingleClosePattern.StartPaintPrimeChart(HostSinglePatternToClose, new Rectangle());

            InitializePrimeSettings();
            InitializePattarnsToOpenTab();
            InitializeTabClosePosition();

            PaintGridPatternsToOpen();
            PaintGridPatternsToClose();
            PaintClosePattern(0);
            PaintOpenPattern(0);

            Title = OsLocalization.Trader.Label114;
            LabelRegime.Content                     = OsLocalization.Trader.Label115;
            LabelSet.Content                        = OsLocalization.Trader.Label116;
            LabelPatternGroup.Content               = OsLocalization.Trader.Label117;
            LabelMaximumPositions.Content           = OsLocalization.Trader.Label118;
            LabelVolume.Content                     = OsLocalization.Trader.Label30;
            TabItemOpeningPosition.Header           = OsLocalization.Trader.Label119;
            LabelPatterns.Content                   = OsLocalization.Trader.Label120;
            LabelSide.Content                       = OsLocalization.Trader.Label121;
            LabelEntryWeight.Content                = OsLocalization.Trader.Label122;
            LabelSlippage.Content                   = OsLocalization.Trader.Label92;
            TabItemClosePosition.Header             = OsLocalization.Trader.Label100;
            CheckBoxStopOrderIsOn.Content           = OsLocalization.Trader.Label123;
            CheckBoxProfitOrderIsOn.Content         = OsLocalization.Trader.Label124;
            CheckBoxExitFromSomeCandlesIsOn.Content = OsLocalization.Trader.Label125;
            CheckBoxTrailingStopIsOn.Content        = OsLocalization.Trader.Label126;

            LabelSlippage1.Content = OsLocalization.Trader.Label92;
            LabelSlippage2.Content = OsLocalization.Trader.Label92;
            LabelSlippage3.Content = OsLocalization.Trader.Label92;
            LabelSlippage4.Content = OsLocalization.Trader.Label92;
            LabelSlippageExitByPatterns.Content = OsLocalization.Trader.Label127;
            LabelWeightForExit.Content          = OsLocalization.Trader.Label128;
        }