/// <summary>
        /// Updates historical log of user positions
        ///
        /// Trigger update for GUI, Database and
        ///  client classB (which transmit to traderdipatcher, and
        ///  then to clients)
        /// Call from UserDealsPosBox
        ///
        /// this.CalculateBotsPos
        ///
        /// </summary>
        /// <param name="botId"></param>
        /// <param name="instrument"></param>
        /// <param name="bp"></param>
        /// <param name="rd"></param>
        public void UpdateUserPosLog(int botId, string instrument, CBotPos bp, CRawUserDeal rd)
        {
            try
            {
                CBotPos botPos = (CBotPos)bp.Copy();

                DicBotPosLog.Update(botId, instrument, botPos);



                UserDealsPosBoxClient.GUIBotUpdatePosLog(botPos, botId);
                UserDealsPosBoxClient.UpdateTradersPosLog(botId);



                //  UpdateLatestBotPos(botId, instrument, bp);



                UserDealsPosBoxClient.UpdateDBPosLog(botId,
                                                     UserDealsPosBoxClient.StockExchId,
                                                     instrument,
                                                     (CBotPos)bp.Copy());
            }
            catch (Exception e)
            {
                Error("UpdateUserPosLog(", e);
            }
        }
        public void CleanUserPosLog()
        {
            foreach (var kvp in DicBotPosLog)
            {
                kvp.Value.Clear();
            }

            foreach (var kvp in DicBotPosLog)
            {
                UserDealsPosBoxClient.UpdateTradersPosLog(kvp.Key);
            }
        }