void zf_AccountUpdate(object sender, ZenFire.AccountEventArgs e)
        {
            ZenFire.IAccount acct = e.Account;

            string[] row = { acct.ToString(),                                "0",                                                            /*acct.GetPosition().ToString(),*/ acct.OpenPL.ToString(), acct.ClosedPL.ToString(),
                             "0",                                            /*acct.TotalPL,*/ acct.Balance.ToString(),                      "0" };
            ThreadPool.QueueUserWorkItem(new WaitCallback(WorkerMethod), (object)row);
        }
        void zf_PositionDetailsUpdate(object sender, ZenFire.AccountEventArgs e)
        {
            ZenFire.IAccount acct = e.Account;

            string[] row = { acct.ToString(), /*acct.AvgFillPrice,*/ /*acct.Position,*/ acct.OpenPL.ToString(),
                             /*acct.Symbol,*/ acct.ClosedPL.ToString(), /*acct.LastTrade,*/ /*acct.TotalPL*/ };
            ThreadPool.QueueUserWorkItem(new WaitCallback(WorkerMethod), (object)row);
        }
Exemplo n.º 3
0
 private void accountListBox_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     ZenFire.IAccount acct = (ZenFire.IAccount)accountListBox.Items[e.Index];
     if (e.NewValue == CheckState.Checked)
     {
         zf.SubscribeAccount(acct);
     }
     else
     {
         zf.UnsubscribeAccount(acct);
     }
 }
Exemplo n.º 4
0
 void zf_AccountUpdate(object sender, ZenFire.AccountEventArgs e)
 {
     ZenFire.IAccount acct = e.Account;
     string[]         row  = { acct.ToString(), acct.Balance.ToString(), acct.Margin.ToString(), acct.OpenPL.ToString(), acct.ClosedPL.ToString() };
     this.Invoke(insertRow, new object[] { 0, row });
 }
Exemplo n.º 5
0
 void zf_AccountUpdate(object sender, ZenFire.AccountEventArgs e)
 {
     ZenFire.IAccount acct = e.Account;
     string[]         row  = { acct.ToString(), acct.Balance.ToString(), acct.Margin.ToString(), acct.OpenPL.ToString(), acct.ClosedPL.ToString() };
     ThreadPool.QueueUserWorkItem(new WaitCallback(WorkerMethod), (object)row);
 }