Esempio n. 1
0
        private static bool IsSameInstruments(DS.Selection instrument1, DS.Selection instrument2)
        {
            if (instrument1 == null || instrument2 == null)
            {
                return(false);
            }

            return(instrument1.Symbol == instrument2.Symbol &&
                   instrument1.DataFeed == instrument2.DataFeed &&
                   instrument1.TimeFactor == instrument2.TimeFactor &&
                   instrument1.Timeframe == instrument2.Timeframe &&
                   instrument1.Level == instrument2.Level);
        }
Esempio n. 2
0
        internal static SignalSelection ToClientSelection(DS.Selection selection)
        {
            if (selection == null)
            {
                return(null);
            }

            return(new SignalSelection(selection.DataFeed, selection.Symbol)
            {
                TimeFrame = (TimeFrame)selection.Timeframe,
                Interval = selection.TimeFactor,
                BarCount = selection.BarCount,
                Level = selection.Level,
                MarketDataSlot = selection.MarketDataSlot,
                Leverage = selection.Leverage,
                Slippage = selection.Slippage
            });
        }