public override EERROR OnTick()
        {
            //Get Rates From API
            double dBid    = 0;
            double dAsk    = 0;
            string sSymbol = "";

            foreach (KeyValuePair <string, string> entry in m_sSymbols_fix)
            {
                //FIX
                sSymbol = entry.Value;
                m_fixApi_data.getRates(entry.Key, ref dAsk, ref dBid);
                m_rates[sSymbol].dAsk     = dAsk; //
                m_rates[sSymbol].dBid     = dBid;
                m_rates[sSymbol].m_dtTime = CFATCommon.m_dtCurTime;
            }

            return(base.OnTick());
        }
Exemple #2
0
        public override EERROR OnTick()
        {
            //Get Rates From API
            double dBid    = 0;
            double dAsk    = 0;
            string sSymbol = "";

            foreach (KeyValuePair <string, string> entry in m_sSymbols_fix)
            {
                //FIX
                sSymbol = entry.Value.Replace("/", "");
                if (!m_sSymbols.Contains(sSymbol))
                {
                    sSymbol += ".agg"; //HSM_TestCode...!!!
                }
                m_fixApi_data.getRates(entry.Key, ref dAsk, ref dBid);
                m_rates[sSymbol].dAsk     = dAsk; //GP broker symbol is EUR/USD
                m_rates[sSymbol].dBid     = dBid;
                m_rates[sSymbol].m_dtTime = CFATCommon.m_dtCurTime;
            }

            return(base.OnTick());
        }