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

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
Can you tell me what to do if the Market does not work in the terminal?
Have you entered everything correctly in Menu-Service-Settings-Community?
In iTime is the indexing not like in timeseries? Not backwards (the newest bar is zero)?
The new bar is zero in all timeseries
Guys, please write urgently.
HOW do I update the data, only when a new bar is completed?
Guys, please write urgently.
HOW do I update the data, only when a new bar is completed?
Like this when a new bar appears:
static datetime prevtime=0;
if(Time[0] == prevtime) return;
But this part should be separated from the main code (or after the main code). Otherwise, all actions will be performed when a new bar appearsprevtime=Time[0]; RefreshRates();
Like this, when a new bar appears:
static datetime prevtime=0;
if(Time[0] == prevtime) return;
prevtime=Time[0]; RefreshRates();
Yes thank you very much, I found this topic too. Is this how I did it ok? It seems to execute this part of code when time has changed and then equates
void OnTick()
{
if(prevetime!=Time[0])
{
if(MathAbs(PriceHigh-PriceLow)>kanal*Point)
{
nPeriod=nPeriod2;
}
if(MathAbs(PriceHigh-PriceLow)<kanal2*Point)
{
nPeriod=nPeriod1;
}
PriceHigh = iCustom(NULL,0, "Trendlinesday",nPeriod,Limit, 0, 0);
PriceLow = iCustom(NULL,0, "Trendlinesday",nPeriod,Limit, 1, 0);
s11 = iCustom(NULL,0, "Trendlinesday",nPeriod,Limit, 2, 0);
r11 = iCustom(NULL,0, "Trendlinesday",nPeriod,Limit, 3, 0);
prevetime=Time[0];
}
Dear Sirs!
Please tell me what's wrong. I can't compile the program. When I try to compile the code, I get
COMMA EXPECTED message It seems that all the semicolons are in place. I can't figure out what the problem is.
working on MQl4, there are questions
Dear Sirs!
Please tell me what's wrong. I can't compile the program. When I try to compile the code, I get
COMMA EXPECTED message It seems that all the semicolons are in place. I don't know what the problem is.
semicolons are semicolon, and you're missing a comma. Just click on that line in the tester window and it will show you where
Hi! Can you tell me how it is: "mode of total invisibility of all EA operations to the broker"? Is it possible? And how to implement it?
the broker only accepts trade orders to open and close.
The broker only accepts trade orders to open and close.