Add() private method

private Add ( GroupField groupField ) : void
groupField GroupField
return void
コード例 #1
0
ファイル: Program.cs プロジェクト: fastquant/fastquant.dll
        protected override void OnStrategyStart()
        {
            //
            barChartGroup = new Group("Bars");

            barChartGroup.Add("Pad", 0);
            barChartGroup.Add("SelectorKey", Instrument.Symbol);

            //
            fillChartGroup = new Group("Fills");

            fillChartGroup.Add("Pad", 0);
            fillChartGroup.Add("SelectorKey", Instrument.Symbol);

            //
            GroupManager.Add(barChartGroup);
            GroupManager.Add(fillChartGroup);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: fastquant/fastquant.dll
        private void AddGroups()
        {
            // Create bars group.
            barsGroup = new Group("Bars");
            barsGroup.Add("Pad", DataObjectType.String, 0);
            barsGroup.Add("SelectorKey", Instrument.Symbol);

            // Create fills group.
            fillGroup = new Group("Fills");
            fillGroup.Add("Pad", 0);
            fillGroup.Add("SelectorKey", Instrument.Symbol);

            // Create equity group.
            equityGroup = new Group("Equity");
            equityGroup.Add("Pad", Instrument.Legs.Count + 1);
            equityGroup.Add("SelectorKey", Instrument.Symbol);

            // Add groups to manager.
            GroupManager.Add(barsGroup);
            GroupManager.Add(fillGroup);
            GroupManager.Add(equityGroup);
        }
コード例 #3
0
 public override object Read(BinaryReader reader, byte version)
 {
     var gname = reader.ReadString();
     var id = reader.ReadInt32();
     var group = new Group(gname);
     group.Id = id;
     int count = reader.ReadInt32();
     for (int i = 0; i < count; ++i)
     {
         var name = reader.ReadString();
         var type = reader.ReadByte();
         object obj = this.streamerManager.Deserialize(reader);
         group.Add(name, type, obj);
     }
     return group;
 }
コード例 #4
0
        public override object Read(BinaryReader reader, byte version)
        {
            var gname = reader.ReadString();
            var id    = reader.ReadInt32();
            var group = new Group(gname);

            group.Id = id;
            int count = reader.ReadInt32();

            for (int i = 0; i < count; ++i)
            {
                var    name = reader.ReadString();
                var    type = reader.ReadByte();
                object obj  = this.streamerManager.Deserialize(reader);
                group.Add(name, type, obj);
            }
            return(group);
        }
コード例 #5
0
ファイル: Program.cs プロジェクト: fastquant/fastquant.dll
        private void AddGroups()
        {
            // Create bars group.
            barsGroup = new Group("Bars");
            barsGroup.Add("Pad", DataObjectType.String, 0);
            barsGroup.Add("SelectorKey", Instrument.Symbol);

            // Create fills group.
            fillGroup = new Group("Fills");
            fillGroup.Add("Pad", 0);
            fillGroup.Add("SelectorKey", Instrument.Symbol);

            // Create equity group.
            equityGroup = new Group("Equity");
            equityGroup.Add("Pad", 1);
            equityGroup.Add("SelectorKey", Instrument.Symbol);

            // Create BBU group.
            bbuGroup = new Group("BBU");
            bbuGroup.Add("Pad", 0);
            bbuGroup.Add("SelectorKey", Instrument.Symbol);
            bbuGroup.Add("Color", Color.Blue);

            // Create BBL group.
            bblGroup = new Group("BBL");
            bblGroup.Add("Pad", 0);
            bblGroup.Add("SelectorKey", Instrument.Symbol);
            bblGroup.Add("Color", Color.Blue);

            // Create SMA group.
            smaGroup = new Group("SMA");
            smaGroup.Add("Pad", 0);
            smaGroup.Add("SelectorKey", Instrument.Symbol);
            smaGroup.Add("Color", Color.Yellow);

            // Add groups to manager.
            GroupManager.Add(barsGroup);
            GroupManager.Add(fillGroup);
            GroupManager.Add(equityGroup);
            GroupManager.Add(bbuGroup);
            GroupManager.Add(bblGroup);
            GroupManager.Add(smaGroup);
        }
コード例 #6
0
ファイル: Program.cs プロジェクト: fastquant/fastquant.dll
        private void AddGroups()
        {
            // Create bars group.
            barsGroup = new Group("Bars");
            barsGroup.Add("Pad", DataObjectType.String, 0);
            barsGroup.Add("SelectorKey", Instrument.Symbol);

            // Create fills group.
            fillGroup = new Group("Fills");
            fillGroup.Add("Pad", 0);
            fillGroup.Add("SelectorKey", Instrument.Symbol);

            // Create equity group.
            equityGroup = new Group("Equity");
            equityGroup.Add("Pad", 1);
            equityGroup.Add("SelectorKey", Instrument.Symbol);

            // Create channel's highest values group.
            highestGroup = new Group("Highest");
            highestGroup.Add("Pad", 0);
            highestGroup.Add("SelectorKey", Instrument.Symbol);
            highestGroup.Add("Color", Color.Green);

            // Create channel's lowest values group.
            lowestGroup = new Group("Lowest");
            lowestGroup.Add("Pad", 0);
            lowestGroup.Add("SelectorKey", Instrument.Symbol);
            lowestGroup.Add("Color", Color.Red);

            // Add groups to manager.
            GroupManager.Add(barsGroup);
            GroupManager.Add(fillGroup);
            GroupManager.Add(equityGroup);
            GroupManager.Add(highestGroup);
            GroupManager.Add(lowestGroup);
        }
コード例 #7
0
ファイル: Program.cs プロジェクト: fastquant/fastquant.dll
        private void AddGroups()
        {
            int pad = 0;

            foreach (Leg leg in spread.Legs)
            {
                ++pad;
                groups[leg.Instrument] = new Group[2];

                // Create bars group.
                Group barsGroup = new Group("Bars");
                barsGroup.Add("Pad", DataObjectType.Int32, pad);
                barsGroup.Add("SelectorKey", DataObjectType.String, spread.Symbol);

                // Create fills group.
                Group fillGroup = new Group("Fills");
                fillGroup.Add("Pad", DataObjectType.Int32, pad);
                fillGroup.Add("SelectorKey", DataObjectType.String, spread.Symbol);

                // Add groups to manager.
                GroupManager.Add(barsGroup);
                GroupManager.Add(fillGroup);

                groups[leg.Instrument][0] = barsGroup;
                groups[leg.Instrument][1] = fillGroup;
            }
        }
コード例 #8
0
ファイル: Program.cs プロジェクト: fastquant/fastquant.dll
        private void AddGroups()
        {
            // Create bars group.
            barsGroup = new Group("Bars");
            barsGroup.Add("Pad", DataObjectType.String, 0);
            barsGroup.Add("SelectorKey", Instrument.Symbol);

            // Create fills group.
            fillGroup = new Group("Fills");
            fillGroup.Add("Pad", 0);
            fillGroup.Add("SelectorKey", Instrument.Symbol);

            // Create equity group.
            equityGroup = new Group("Equity");
            equityGroup.Add("Pad", 2);
            equityGroup.Add("SelectorKey", Instrument.Symbol);

            // Create RSI values group.
            rsiGroup = new Group("RSI");
            rsiGroup.Add("Pad", 1);
            rsiGroup.Add("SelectorKey", Instrument.Symbol);
            rsiGroup.Add("Color", Color.Blue);

            // Create BuyLevel values group.
            buyLevelGroup = new Group("BuyLevel");
            buyLevelGroup.Add("Pad", 1);
            buyLevelGroup.Add("SelectorKey", Instrument.Symbol);
            buyLevelGroup.Add("Color", Color.Red);

            // Create SellLevel values group.
            sellLevelGroup = new Group("SellLevel");
            sellLevelGroup.Add("Pad", 1);
            sellLevelGroup.Add("SelectorKey", Instrument.Symbol);
            sellLevelGroup.Add("Color", Color.Red);

            // Add groups to manager.
            GroupManager.Add(barsGroup);
            GroupManager.Add(fillGroup);
            GroupManager.Add(equityGroup);
            GroupManager.Add(rsiGroup);
            GroupManager.Add(buyLevelGroup);
            GroupManager.Add(sellLevelGroup);
        }
コード例 #9
0
ファイル: Program.cs プロジェクト: fastquant/fastquant.dll
        protected override void OnStrategyStart()
        {
            //
            barChartGroup = new Group("Bars");

            barChartGroup.Add("Pad", DataObjectType.Int, 0);
            barChartGroup.Add("SelectorKey", DataObjectType.String, "VWAP " + Instrument.Symbol);

            //
            fillChartGroup = new Group("Fills");

            fillChartGroup.Add("Pad", DataObjectType.Int, 0);
            fillChartGroup.Add("SelectorKey", DataObjectType.String, "VWAP " + Instrument.Symbol);

            //
            GroupManager.Add(barChartGroup);
            GroupManager.Add(fillChartGroup);
        }
コード例 #10
0
ファイル: Program.cs プロジェクト: fastquant/fastquant.dll
        private void AddGroups()
        {
            // Create bars group.
            Group barGroup = new Group("Bars");
            barGroup.Add("Pad", DataObjectType.Int, legIndex + 2);
            barGroup.Add("SelectorKey", DataObjectType.String, rootInstrument.Symbol);

            // Create fills group.
            Group fillGroup = new Group("Fills");
            fillGroup.Add("Pad", DataObjectType.Int, legIndex + 2);
            fillGroup.Add("SelectorKey", DataObjectType.String, rootInstrument.Symbol);

            // Add groups to manager.
            GroupManager.Add(fillGroup);
            GroupManager.Add(barGroup);

            // Add groups to dictionary.
            fillGroups[currentFuturesContract] = fillGroup;
            barsGroups[currentFuturesContract] = barGroup;
        }
コード例 #11
0
ファイル: Program.cs プロジェクト: fastquant/fastquant.dll
        public override void OnStrategyStart()
        {
            barsChartGroup = new Group("Bars");

            barsChartGroup.Add("Pad", 0);
            barsChartGroup.Add("SelectorKey", Instrument.Symbol);

            // add fill group

            fillChartGroup = new Group("Fills");

            fillChartGroup.Add("Pad", 0);
            fillChartGroup.Add("SelectorKey", Instrument.Symbol);

            // add equity group

            equityChartGroup = new Group("Equity");

            equityChartGroup.Add("Pad", 1);
            equityChartGroup.Add("SelectorKey", Instrument.Symbol);

            // register groups

            GroupManager.Add(barsChartGroup);
            GroupManager.Add(fillChartGroup);
            GroupManager.Add(equityChartGroup);
        }
コード例 #12
0
ファイル: Program.cs プロジェクト: fastquant/fastquant.dll
        private void AddGroups()
        {
            // Create bars group.
            barsGroup = new Group("Bars");
            barsGroup.Add("Pad", DataObjectType.String, 0);
            barsGroup.Add("SelectorKey", Instrument.Symbol);

            // Create fills group.
            fillGroup = new Group("Fills");
            fillGroup.Add("Pad", 0);
            fillGroup.Add("SelectorKey", Instrument.Symbol);

            // Create equity group.
            equityGroup = new Group("Equity");
            equityGroup.Add("Pad", 1);
            equityGroup.Add("SelectorKey", Instrument.Symbol);

            // Create fast sma values group.
            fastSmaGroup = new Group("FastSMA");
            fastSmaGroup.Add("Pad", 0);
            fastSmaGroup.Add("SelectorKey", Instrument.Symbol);
            fastSmaGroup.Add("Color", Color.Green);

            // Create slow sma values group.
            slowSmaGroup = new Group("SlowSMA");
            slowSmaGroup.Add("Pad", 0);
            slowSmaGroup.Add("SelectorKey", Instrument.Symbol);
            slowSmaGroup.Add("Color", Color.Red);

            // Add groups to manager.
            GroupManager.Add(barsGroup);
            GroupManager.Add(fillGroup);
            GroupManager.Add(equityGroup);
            GroupManager.Add(fastSmaGroup);
            GroupManager.Add(slowSmaGroup);
        }
コード例 #13
0
ファイル: Program.cs プロジェクト: fastquant/fastquant.dll
        private void AddGroups()
        {
            // Create bars group.
            barsGroup = new Group("Bars");
            barsGroup.Add("Pad", DataObjectType.String, 0);
            barsGroup.Add("SelectorKey", Instrument.Symbol);

            //// Create fills group.
            fillGroup = new Group("Fills");
            fillGroup.Add("Pad", 0);
            fillGroup.Add("SelectorKey", Instrument.Symbol);

            // Create equity group.
            equityGroup = new Group("Equity");
            equityGroup.Add("Pad", 1);
            equityGroup.Add("SelectorKey", Instrument.Symbol);

            // Create sma1 values group.
            sma1Group = new Group("SMA1");
            sma1Group.Add("Pad", 0);
            sma1Group.Add("SelectorKey", Instrument.Symbol);
            sma1Group.Add("Color", Color.Green);

            // Create sma2 values group.
            sma2Group = new Group("SMA2");
            sma2Group.Add("Pad", 0);
            sma2Group.Add("SelectorKey", Instrument.Symbol);
            sma2Group.Add("Color", Color.Red);

            // Create log monitor groups.
            closeMonitorGroup = new Group("Close");
            closeMonitorGroup.Add("LogName", "Close");
            closeMonitorGroup.Add("StrategyName", "MyStrategy");
            closeMonitorGroup.Add("Symbol", Instrument.Symbol);

            openMonitorGroup = new Group("Open");
            openMonitorGroup.Add("LogName", "Open");
            openMonitorGroup.Add("StrategyName", "MyStrategy");
            openMonitorGroup.Add("Symbol", Instrument.Symbol);

            positionMonitorGroup = new Group("Position");
            positionMonitorGroup.Add("LogName", "Position");
            positionMonitorGroup.Add("StrategyName", "MyStrategy");
            positionMonitorGroup.Add("Symbol", Instrument.Symbol);

            // Add groups to manager.
            GroupManager.Add(barsGroup);
            GroupManager.Add(fillGroup);
            GroupManager.Add(equityGroup);
            GroupManager.Add(sma1Group);
            GroupManager.Add(sma2Group);
            GroupManager.Add(closeMonitorGroup);
            GroupManager.Add(openMonitorGroup);
            GroupManager.Add(positionMonitorGroup);
        }