Пример #1
0
        protected override void OnAccountItemUpdate(Cbi.Account account, Cbi.AccountItem accountItem, double value)
        {
            MyAllOrders = account.Orders;
            //Print(string.Format("{0} {1} {2}", account.Name, accountItem, value));

            // output:
            // Sim101 BuyingPower 103962.5
            // Sim101 CashValue 103962.5
            // Sim101 GrossRealizedProfitLoss 3962.5
            // Sim101 RealizedProfitLoss 3962.5
        }
Пример #2
0
        /// <summary>
        /// Only updated on live/sim trading, not triggered at back-testing;
        /// The evernt posted tick by tick at sim/living trading with poistion hold;
        /// </summary>
        /// <param name="account"></param>
        /// <param name="accountItem"></param>
        /// <param name="value"></param>
        protected override void OnAccountItemUpdate(Cbi.Account account, Cbi.AccountItem accountItem, double value)
        {
            if (account == null || accountItem == null || IndicatorProxy == null)
            {
                return;
            }

            if (accountItem == AccountItem.UnrealizedProfitLoss && PrintOut > 2 && !IsInStrategyAnalyzer)
            {
                IndicatorProxy.PrintLog(true, IsLiveTrading(),                 //":OnAccountItemUpdate"
                                        CurrentBar + ":OnAccountItemUpdate"
                                        + ";Name=" + account.DisplayName
                                        + ";Item=" + accountItem.ToString()
                                        + ";value=" + value
                                        + ";DailyLossLmt=" + account.DailyLossLimit
                                        + ";Status=" + account.AccountStatus.ToString()
                                        );
            }
        }
Пример #3
0
 protected override void OnAccountItemUpdate(Cbi.Account account, Cbi.AccountItem accountItem, double value)
 {
 }