Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 254

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Through a file, for example...
if you don't mind, a little more detail.
if you don't mind, a little more detail.
To pull quotes, use the Copy functions:
https://www.mql5.com/ru/docs/series
Then https://www.mql5.com/ru/docs/files is a link to file operations.
Good evening, I'm making a "rails" pattern, but I can't get it to work.... can you see what's wrong? Thanks in advance.
And these conditions will never be met
Good afternoon! The task is this - I need to determine how many bars there will be before the next 01.00 hours. I've done it so far with a loop, but maybe it's more correct to do it somehow with iBarShift? Maybe it's more correct to do it differently at all?
Good afternoon! The task is this - I need to determine how many bars there will be before the next 01.00 hours. I've done it so far with a loop, but maybe it's more correct to do it somehow with iBarShift? Maybe it's more correctly done in a different way altogether?
For a more painless transition to mql5 in the future, it would be better to use functions that are used in both languages. For searching for the number of bars it is better to use
Actually, iBarShift() will do the job better than cycle.
For a more painless transition to mql5 in the future, it is better to use the functions used in both languages. For searching for the number of bars it's better to use
The iBarShift() can handle this task better than cycle.
int iBarShift(
string symbol,// symbol
inttimeframe, // period
datetimetime, // time ?????????
bool exact=false // mode
);
Yes, but the problem is finding the nearest 01.00 hours. How do you determine this?
int iBarShift(
string symbol,// symbol
inttimeframe, // period
datetimetime, // time ?????????
bool exact=false // mode
);
Forum on trading, automated trading systems & strategy testing
Any questions for beginners on MQL4, help and discussion on algorithms and codes
Alexey Viktorov, 2017.07.27 13:54
If you want to make future migration to mql5 as painless as possible, use functions available in both languages. To search for the number of bars it is better to use
In principle, iBarShift() can handle this task better than a loop.
Will return the number of bars between the specified time and the current time, if the current bar time is specified as stop_time.
The only problem is that I never fill up my memory cell with such unnecessary things as what the obtained value will be equal to, given a bar with the specified time, or less by 1. I just check every time.
Returns the number of bars between the specified time and the current time, if the current bar time is specified as stop_time.
The only problem is, I never clog my memory cell with unnecessary stuff like what the value will be equal to, including the bar with the specified time or less by 1. I just check every time.
This I all understand, but try to get into the question. How do you find the specified time - in my case you need to find the nearest 01.00 hours. How do you write it down?
datetime start_time, // from what date ???
This I all understand, but try to get into the question. How do you find the specified time - in my case you have to find the nearest 01.00 hours. How do you write it down?
datetime start_time, // from what date ???