I'm sorry in advance. It's been 7-8 years since I last programmed. I decided to write an EA. I use several timeframes in my trading. How can I insert data from another timeframe into one timeframe I'm trading, which provides a bigger picture?
vvu78: My apologies in advance... my last time I programmed about 7-8 years ago, I decided to write an EA. In my trade I use several timeframes. How to insert data from another timeframe, which reports the overall picture, into one timeframe, on which I trade?
PeriodSeconds Returns the number of seconds in a period. int PeriodSeconds ( ENUM_TIMEFRAMES period=PERIOD_CURRENT // chart period ); Parameters period=PERIOD_CURRENT [in] Value of the chart period from enumeration ENUM_TIMEFRAMES. If the parameter is not specified, the number of seconds of the current chart period, at which the program is running, is returned. Returned value Number of seconds in the specified period. See also _Period, Graph periods, Date and time, Object visibility https://www.mql5.com/ru/docs/common/periodseconds
PeriodSeconds Returns the number of seconds in a period. int PeriodSeconds ( ENUM_TIMEFRAMES period=PERIOD_CURRENT // graph period ); Parameters period=PERIOD_CURRENT [in] Value of graph period from ENUM_TIMEFRAMES enumeration. If the parameter is not specified, the number of seconds of the current chart period, at which the program is running, is returned. Returned value Number of seconds in the specified period. See also _Period, Graph periods, Date and time, Object visibility https://www.mql5.com/ru/docs/common/periodseconds
Thank you! And how to get back the value of period by received seconds?
Guys,remaking from mq4 to mq5- the results are completely different I don't understand- can you please compare the values of the indicator I get in the same way?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
My apologies in advance... my last time I programmed about 7-8 years ago, I decided to write an EA. In my trade I use several timeframes. How to insert data from another timeframe, which reports the overall picture, into one timeframe, on which I trade?
Use the Copyxxx functions:
Where you set the required timeframe. Also useful links:Organisation of dataaccess
Use the Copyxxx functions:
Where you set the required timeframe. Also useful links:Organizing dataaccess
thanks)
Hello, dear forum members, I am facing the following problem in Metatrader 5. When inserting a resource with the command
#resource"<resource_file_path>".
The quality of BMP image is lost. All sorts of dots appear on the image when inserting it as an OBJ_BIYMAP_LABEL object.
Who has encountered such a problem, and more importantly, how has this problem been solved?
In mq4 PERIOD_H1 returns 60, what about in mq5 ?
SL=SL_Start*(PERIOD_H4/P);In mq4 PERIOD_H1 returns 60, what about in mq5 ?
PeriodSeconds
PeriodSeconds Returns the number of seconds in a period. int PeriodSeconds ( ENUM_TIMEFRAMES period=PERIOD_CURRENT // chart period ); Parameters period=PERIOD_CURRENT [in] Value of the chart period from enumeration ENUM_TIMEFRAMES. If the parameter is not specified, the number of seconds of the current chart period, at which the program is running, is returned. Returned value Number of seconds in the specified period. See also _Period, Graph periods, Date and time, Object visibility https://www.mql5.com/ru/docs/common/periodseconds
PeriodSeconds
PeriodSeconds Returns the number of seconds in a period. int PeriodSeconds ( ENUM_TIMEFRAMES period=PERIOD_CURRENT // graph period ); Parameters period=PERIOD_CURRENT [in] Value of graph period from ENUM_TIMEFRAMES enumeration. If the parameter is not specified, the number of seconds of the current chart period, at which the program is running, is returned. Returned value Number of seconds in the specified period. See also _Period, Graph periods, Date and time, Object visibility https://www.mql5.com/ru/docs/common/periodseconds
Thank you! And how to get back the value of period by received seconds?
Pe variable should be converted somehow toCopyTime
although okay...I'll use P straight away before sending to a function that
Guys,remaking from mq4 to mq5- the results are completely different I don't understand- can you please compare the values of the indicator I get in the same way?
MQ4
MQ5
As I was writing I sawPRICE_MEDIAN andPRICE_CLOSE, but apart from that?