Forum

Copying rates from different timeframes

Guys, I am trying to code an indicator for D1 charts, which uses M1 price/volume/spread/etc. data to calculate the indicator daily values. I use this code to copy rates: MqlRates RatesM1[],RatesD1[]; datetime first_bar_date= SeriesInfoInteger ( _Symbol , PERIOD_M1 , SERIES_FIRSTDATE );

Reading from TXT file issue

Hello guys, I am trying to read data from a txt file but for some reason it doesn't work. I wanted to share the code with you in case you may have a solution. Thanks a lot in advance. So the file is a TXT file having only 2 integer values of 1 and 10 separated by XX. So the file content is like

array out of range problem

Hi guys, I am having a bizarre problem. A simple expression is giving me a consistent error. Could anyone give me a hint what is wrong? //--- preprocessor . . . int A[]; //---- in OnInint() section { A[0]=5; Print(A[0]); } ERROR: array out of range Thanks a lot

could someone PLEASE tell me what is wrong with this code?

in a costum indicator I want the program to copy D1 and M1 rates but it wont copy the M1 rates. Could someone please help me with this? it's driving me crazy int RatesDCopyCheck=CopyRates(_Symbol,PERIOD_D1,TerminalFirstDay,LastDay,RatesD); int

Accessing price data (close,volume, etc) of different timeframes (D1,H1,etc)

Hello guys, I am pretty much a beginner in both coding in mql5 and using this forum. I would greatly appreciate if you could help me with my question.I am writing a costume indicator. It plot a line on daily chart but needs the close prices of M1 bars to calculate its daily values. How can I access