I get the array out of range error and I cant seem to figure out why! Any help is greatly appreciated!
MqlRates PriceInfo[];
//Sorts it from the current candle to the oldest candleArraySetAsSeries(PriceInfo,true);
//Copies the price information into the arraydouble Data=CopyRates(Symbol(),PERIOD_CURRENT,0,Bars(Symbol(),PERIOD_CURRENT),PriceInfo); //THIS SHOULD HAVE PERIOD_D1Bid=NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_BID),_Digits);
Comment(StringFormat("Current price = %G\n",Bid));
double high_price[]; //Store the high pricedouble low_price[]; //Store the low pricedouble close_price[]; //Store the close priceArrayResize(high_price,no_candles+1);
ArrayResize(low_price,no_candles+1);
ArrayResize(close_price,no_candles+1);
for(int i=0; i<=no_candles; i=i+1)
{
high_price[i]=PriceInfo[i+1].high;
low_price[i]=PriceInfo[i+1].low;
close_price[i]=PriceInfo[i+1].close;
}
Hi all,
I get the array out of range error and I cant seem to figure out why! Any help is greatly appreciated!