コード例 #1
0
        public override void PnlUpdate(PnlInfo oInfo)
        {
            StringBuilder sb = new StringBuilder();

            oInfo.Dump(sb);
            sb.AppendFormat("\n");

            debug(sb);
        }
コード例 #2
0
ファイル: SampleMD.cs プロジェクト: rebider/TradeLinkProj
        public override void PnlUpdate(PnlInfo oInfo)
        {
            StringBuilder sb = new StringBuilder();

            oInfo.Dump(sb);
            sb.AppendFormat("\n");

            System.Console.Out.Write(sb);
        }
コード例 #3
0
        private void Settings_Load(object sender, EventArgs e)
        {
            mainFrm = (MainForm)this.Owner;
            AddListItems(new[] { "常规", "播放", "声音", "画面", "字幕", "关联", "背景", "截图", "赞助", "更新", "其他" });
            MenuList.Items[0].Focus();
            MenuList.Items[0].BackColor = SelectedBackColor;

            Thread thread = new Thread(LoadPrepare);

            thread.Start();

            PnlInfo.Refresh();
        }
コード例 #4
0
        private void ProcessPnL(PnlInfo info)
        {
            //ProcessAccount(info.Account);

            BaseChangeMessage <PositionChangeTypes> message;

            if (info.Symbol.IsEmpty())
            {
                message = this.CreatePortfolioChangeMessage(info.Account.AccountId);
            }
            else
            {
                message = this.CreatePositionChangeMessage(
                    info.Account.AccountId,
                    new SecurityId
                {
                    SecurityCode = info.Symbol,
                    BoardCode    = info.Exchange,
                });
            }

            switch (info.Position.State)
            {
            case Ignorable <int> .ValueState.Ignore:
                break;

            case Ignorable <int> .ValueState.Clear:
                message.Add(PositionChangeTypes.CurrentValue, 0m);
                break;

            case Ignorable <int> .ValueState.Use:
                message.Add(PositionChangeTypes.CurrentValue, (decimal)info.Position.Value);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            SendOutMessage(message
                           .TryAdd(PositionChangeTypes.CurrentPrice, info.AccountBalance)
                           .TryAdd(PositionChangeTypes.VariationMargin, info.MarginBalance)
                           .TryAdd(PositionChangeTypes.UnrealizedPnL, info.OpenPnl)
                           .TryAdd(PositionChangeTypes.RealizedPnL, info.ClosedPnl)
                           .TryAdd(PositionChangeTypes.AveragePrice, info.AvgOpenFillPrice)
                           );
        }
コード例 #5
0
			public override void PnlUpdate(PnlInfo info)
			{
				_client.AccountPnLUpdate.WithDump(_receiver).WithError(TransactionError).SafeInvoke(info);
			}
コード例 #6
0
 private void SessionHolderOnAccountPnLUpdate(PnlInfo info)
 {
     ProcessAccount(info.Account);
     ProcessPnL(info);
 }
コード例 #7
0
ファイル: SampleMD.cs プロジェクト: bluejack2000/core
          public override void PnlUpdate(PnlInfo oInfo)
               {
               StringBuilder sb = new StringBuilder();

               oInfo.Dump(sb);
               sb.AppendFormat("\n");

               System.Console.Out.Write(sb);
               }
コード例 #8
0
		private void ProcessPnL(PnlInfo info)
		{
			//ProcessAccount(info.Account);

			BaseChangeMessage<PositionChangeTypes> message;

			if (info.Symbol.IsEmpty())
			{
				message = this.CreatePortfolioChangeMessage(info.Account.AccountId);
			}
			else
			{
				message = this.CreatePositionChangeMessage(
					info.Account.AccountId,
					new SecurityId
					{
						SecurityCode = info.Symbol,
						BoardCode = info.Exchange,
					});	
			}

			switch (info.Position.State)
			{
				case Ignorable<int>.ValueState.Ignore:
					break;
				case Ignorable<int>.ValueState.Clear:
					message.Add(PositionChangeTypes.CurrentValue, 0m);
					break;
				case Ignorable<int>.ValueState.Use:
					message.Add(PositionChangeTypes.CurrentValue, (decimal)info.Position.Value);
					break;
				default:
					throw new ArgumentOutOfRangeException();
			}

			SendOutMessage(message
				.TryAdd(PositionChangeTypes.CurrentPrice, info.AccountBalance)
				.TryAdd(PositionChangeTypes.VariationMargin, info.MarginBalance)
				.TryAdd(PositionChangeTypes.UnrealizedPnL, info.OpenPnl)
				.TryAdd(PositionChangeTypes.RealizedPnL, info.ClosedPnl)
				.TryAdd(PositionChangeTypes.AveragePrice, info.AvgOpenFillPrice)
			);
		}
コード例 #9
0
		private void SessionHolderOnAccountPnLUpdate(PnlInfo info)
		{
			ProcessAccount(info.Account);
			ProcessPnL(info);
		}
コード例 #10
0
ファイル: ServerRithmic.cs プロジェクト: antonywu/tradelink
          public override void PnlUpdate(PnlInfo oInfo)
               {
               StringBuilder sb = new StringBuilder();

               oInfo.Dump(sb);
               sb.AppendFormat("\n");

               debug(sb);
               }
コード例 #11
0
 public override void PnlUpdate(PnlInfo info)
 {
     _client.AccountPnLUpdate.WithDump(_receiver).WithError(TransactionError).SafeInvoke(info);
 }