Issue retrieving data

 

Hi i have an issue retrieving data. The EA prints the valid figures requested in the print function yet when it comes to the EURUSD, the EA suddenly thinks the low, high, open and close are the same value. In the following picture you'll see the same thing as i've just described yet the candlestick is clearly a large one proving my point. The weird thing is, the values are printed correctly for other currency pairs. Not sure what the issue could be, i appreciate the help!



string symbol_loop[] = {"USDJPY", "EURUSD", "USDCAD", "GBPUSD"};
double



symbol_points[];

datetime old_time; //+-------------------------------------------------------------------------------------------------------+ //|  Include Files                                                                                        | //+-------------------------------------------------------------------------------------------------------+ #include <Trade/Trade.mqh> CTrade trade; //+-------------------------------------------------------------------------------------------------------+ //|  On OnInit                                                                                            | //+-------------------------------------------------------------------------------------------------------+ int OnInit() {      // Initialize symbol_points array ArrayResize(symbol_points, ArraySize(symbol_loop)); for(int i = 0; i < ArraySize(symbol_loop); i++) { symbol_points[i] = SymbolInfoDouble(symbol_loop[i], SYMBOL_POINT); } return(INIT_SUCCEEDED); } //+-------------------------------------------------------------------------------------------------------+ //|  On DeInit                                                                                            | //+-------------------------------------------------------------------------------------------------------+ void OnDeinit(const int reason)   {   } //+-------------------------------------------------------------------------------------------------------+ //|  OnTick                                                                                               | //+-------------------------------------------------------------------------------------------------------+ void OnTick() {    // Calculating current time    datetime GMT = iTime(_Symbol, PERIOD_M15, 1);      // Check for new 15m candlestick    if (GMT > old_time){        old_time = GMT;                   for (int i = 0; i < ArraySize(symbol_loop); i++){                     //------------------------------------//       // PRICE INFO                         //       //------------------------------------//                  double Open = open(symbol_loop[i], symbol_points[i], 0);       double Close = close(symbol_loop[i], symbol_points[i], 0);       double High = high(symbol_loop[i], symbol_points[i], 0);       double Low = low(symbol_loop[i], symbol_points[i], 0);       double BodySize = NormalizeDouble(getBodySize(symbol_loop[i], symbol_points[i], 0), 1);       double UpperWickSize = NormalizeDouble(getUpperWick(symbol_loop[i], symbol_points[i]), 1);       double LowerWickSize = NormalizeDouble(getLowerWick(symbol_loop[i], symbol_points[i]), 1);                    //Previous CandleStick                    double PrevBodySize = NormalizeDouble(getPrevBodySize(symbol_loop[i], symbol_points[i], 1), 1);       double PrevUpperWick = NormalizeDouble(getPrevUpperWick(symbol_loop[i], symbol_points[i]), 1);       double PrevLowerWick = NormalizeDouble(getPrevLowerWick(symbol_loop[i], symbol_points[i]), 1);                    Print("Open Price for ", symbol_loop[i], ": ", Open);       Print("Close Price for ", symbol_loop[i], ": ", Close);       Print("High Price for ", symbol_loop[i], ": ", High);       Print("Low Price for ", symbol_loop[i], ": ", Low);       Print("BodySize Price for ", symbol_loop[i], ": ", BodySize);       Print("UpperWick Price for ", symbol_loop[i], ": ", UpperWickSize);       Print("LowerWick Price for ", symbol_loop[i], ": ", LowerWickSize);       Print("PrevBodySize Price for ", symbol_loop[i], ": ", PrevBodySize);       Print("PrevUpperWick Price for ", symbol_loop[i], ": ", PrevUpperWick);       Print("PrevLowerWick Price for ", symbol_loop[i], ": ", PrevLowerWick);    }    } } //+-------------------------------------------------------------------------------------------------------+ //|  Price Action Neccessities                                                                            | //+-------------------------------------------------------------------------------------------------------+ double open(string symbol, double point, int shift) {     // Returns the open price of the current bar for the specified symbol     return iOpen(symbol, PERIOD_CURRENT, 0); } double close(string symbol, double point, int shift) {     // Returns the close price of the current bar for the specified symbol     return iClose(symbol, PERIOD_CURRENT, 0); } double high(string symbol, double point, int shift) {     // Returns the high price of the current bar for the specified symbol     return iHigh(symbol, PERIOD_CURRENT, 0); } double low(string symbol, double point, int shift) {     // Returns the low price of the current bar for the specified symbol     return iLow(symbol, PERIOD_CURRENT, 0); } double getBodySize(string symbol, double point, int shift) {     double openPrice = open(symbol, point, 0);     double closePrice = close(symbol, point, 0);     double body = MathAbs(closePrice - openPrice);     return body / (point*10); } double getUpperWick(string symbol, double point) {     if (close(symbol, point, 0) > open(symbol, point, 0))     {         return NormalizeDouble((high(symbol, point, 0) - close(symbol, point, 0)) / (point * 10), 2);     }     else     {         return NormalizeDouble((high(symbol, point, 0) - open(symbol, point, 0)) / (point * 10), 2);     } } double getLowerWick(string symbol, double point) {     if (close(symbol, point, 0) > open(symbol, point, 0))     {         return NormalizeDouble((open(symbol, point, 0) - low(symbol, point, 0)) / (point * 10), 2);     }     else     {         return NormalizeDouble((close(symbol, point, 0) - low(symbol, point, 0)) / (point * 10), 2);     } } double getPrevBodySize(string symbol, double point, int shift) {     double openPrice = open(symbol, point, shift);     double closePrice = close(symbol, point, shift);     double body = MathAbs(closePrice - openPrice);     return body / (point*10); } double getPrevUpperWick(string symbol, double point) {     if (close(symbol, point, 1) > open(symbol, point, 1))     {         return NormalizeDouble((high(symbol, point, 1) - close(symbol, point, 1)) / (point * 10), 2);     }     else     {         return NormalizeDouble((high(symbol, point, 1) - open(symbol, point, 1)) / (point * 10), 2);     } } double getPrevLowerWick(string symbol, double point) {     if (close(symbol, point, 1) > open(symbol, point, 1))     {         return NormalizeDouble((open(symbol, point, 1) - low(symbol, point, 1)) / (point * 10), 2);     }     else     {         return NormalizeDouble((close(symbol, point, 1) - low(symbol, point, 1)) / (point * 10), 2);     } } bool greenCandlestick(string symbol, double point) {     return (open(symbol, point, 0) < close(symbol, point, 0)); } bool previousGreenCandlestick(string symbol, double point) {     return (open(symbol, point, 1) < close(symbol, point, 1)); } double GetUpperWickSize(string symbol, double point) {     if (close(symbol, point, 0) > open(symbol, point, 0))     {         return NormalizeDouble(((high(symbol, point, 0) - close(symbol, point, 0)) / (point * 10)), 1);     }     else     {         return NormalizeDouble(((high(symbol, point, 0) - open(symbol, point, 0)) / (point * 10)), 1);     } } double GetLowerWickSize(string symbol, double point) {     if (close(symbol, point, 0) > open(symbol, point, 0))     {         return NormalizeDouble(((open(symbol, point, 0) - low(symbol, point, 0)) / (point * 10)), 1);     }     else     {         return NormalizeDouble(((close(symbol, point, 0) - low(symbol, point, 0)) / (point * 10)), 1);     } }