Prices are not loading for last two days
Created at 05 Jan 2016, 07:00
Prices are not loading for last two days
05 Jan 2016, 07:00
Hi Spotware,
the prices of few pairs are not loading beside waiting for hours...... have attached the screen shot and the code. I have run this code on VPS, local computer and on different brokers cTRADER platform and the result is same, it simply hangs on EURNZD prices and also on CADJPY.
Please look into this matter, at your earliest. Thank you
///S.Khan
// ATR INDICATOR INSTANCE ///////////////////// private AverageTrueRange ATR_Indicator_1; private AverageTrueRange ATR_Indicator_2; private AverageTrueRange ATR_Indicator_3; //GLOBAL VARIABLES Symbol t_Symbol; string tstr_Code; double t_1, Current_ATR_V1, Current_ATR_V2, Current_ATR_V3 ; //LOOP for (int i = 0; i < 7; i++) { t_Symbol = Get_Pair_Symbol(i); tstr_Code = t_Symbol.Code.ToString(); t_1 = t_Symbol.PipSize; // MONTHLY var temp_1 = MarketData.GetSeries(tstr_Code, TimeFrame.Monthly); ATR_Indicator_1 = Indicators.AverageTrueRange(temp_1, 2, MovingAverageType.Simple); // WEEKLY var temp_2 = MarketData.GetSeries(tstr_Code, TimeFrame.Weekly); ATR_Indicator_2 = Indicators.AverageTrueRange(temp_2, 3, MovingAverageType.Simple); // DAILY var temp_3 = MarketData.GetSeries(tstr_Code, TimeFrame.Daily); ATR_Indicator_3 = Indicators.AverageTrueRange(temp_3, 5, MovingAverageType.Simple); Current_ATR_V1 = Math.Round(ATR_Indicator_1.Result.LastValue / t_1, 0); Current_ATR_V2 = Math.Round(ATR_Indicator_2.Result.LastValue / t_1, 0); Current_ATR_V3 = Math.Round(ATR_Indicator_3.Result.LastValue / t_1, 0); Print(i + ". " + tstr_Code + " = " + Current_ATR_V1 + ", " + Current_ATR_V2 + ", " + Current_ATR_V3); } //END FOR //METHOD GET SYMBOL private Symbol Get_Pair_Symbol(int t_Pair) { switch (t_Pair) { case 0: return MarketData.GetSymbol("EURUSD"); break; case 1: return MarketData.GetSymbol("EURJPY"); break; case 2: return MarketData.GetSymbol("EURGBP"); break; case 3: return MarketData.GetSymbol("EURAUD"); break; case 4: return MarketData.GetSymbol("EURNZD"); break; case 5: return MarketData.GetSymbol("EURCAD"); break; case 6: return MarketData.GetSymbol("EURCHF"); break; } return Symbol; }
*FROM THE VPS,
Broker : (1) FxPro and (2) Roboforex
GoldnOil750
05 Jan 2016, 07:57
replacing monthly with weekly it works
Dear Spotware,
in the above issue, if we replace the monthly timeframe by weekly and daily, 15 mins so on, it works and give the ATR values. But with TimeFrame set to "Monthly", it get stuck on EURZD and so on.
why is the TimeFrame "Monthly" not working on few pairs ??
Thank you
///S.Khan
@GoldnOil750