Questions from Beginners MQL4 MT4 MetaTrader 4 - page 83

 

Hello, here's a question:

in the tester there is such a button "Skip to", and there is a possibility in MQL4, to call this function, for example, by pressing the key in the tester went to the next new bar???

 
Dmitry Melnichenko:

Hello, here's a question:

In the tester, there is such a button "Skip to", and there is an opportunity in MQL4, to call this function, for example, by pressing the key in the tester went to the next new bar??

The test by close prices, after the start you have to pause and press F12.

There is no way to do it programmatically.

 
void Calc(int needCalc, int numInsideBars){
Print(needCalc);
if(needCalc > 0){
for(int i = needCalc; i > 0; i --){
int typeTrend = TypeTrend(i);
if(typeTrend > 0){
//test[i] = 2;
datetime time = Time[i];
int shiftBar = iBarShift(NULL, gTimeFrame, time, 1);
if(shiftBar < 0){/*Alert("No history for low timeframe!"); return;*/}
else{
double max = ND(iHigh(NULL, gTimeFrame, shiftBar));
int numRez = shiftBar;
for(int j = shiftBar; j > shiftBar - numInsideBars; j --){
double high = ND(iHigh(NULL, gTimeFrame, j));
if(max < high){max = high; numRez = j;}
}
up[i] = numRez - (shiftBar - numInsideBars);
}
}
if(typeTrend < 0){
//test[i] = -2;
datetime time = Time[i];
int shiftBar = iBarShift(NULL, gTimeFrame, time, 1);
if(shiftBar < 0){/*Alert("No history for low timeframe!"); return;*/}
else{
double min = ND(iLow(NULL, gTimeFrame, shiftBar));
int numRez = shiftBar;
for(int j = shiftBar; j > shiftBar - numInsideBars; j --){
double low = ND(iLow(NULL, gTimeFrame, j));
if(min > low){min = low; numRez = j;}
}
down[i] = -1 * (numRez - (shiftBar - numInsideBars))
}
}
}

}


Does anyone know what this means? I mean write the lines with comments. And how would this code look in MQL5?

 

Good afternoon, another question from a complete beginner, this branch seemed the most appropriate for such a delicate question.

I am watching a video lesson on programming and creating a new Expert Advisor. The video clip shows the MQL4 wizard, while I have MQL5, hence the different directory and file extensions.

I've already asked one more question, since it's a trivia question - how to change the terminal BILD and where to get it.

 
Sergey Voytsekhovsky:

Good afternoon, another question from a complete beginner, this branch seemed the most appropriate for such a delicate question.

I am watching a video lesson on programming and creating a new Expert Advisor. The video clip shows the MQL4 wizard, while I have MQL5, hence the different directory and file extensions.

I've already asked one more question, since it's a trivia question - how to change the terminal BILD and where to get it.

What difference does it make which directories and extensions ? Just consider the difference, it does not change the essence.

Terminal build is listed in Menu -> Help -> About...

 
George Merts:

What difference does it make which directories and extensions ? Just consider the difference, it doesn't change the point.

Terminal build is in Menu -> Help -> About...


Thanks.

It's hard to know the difference between what you don't know and what you don't know. I think it's hard to make MT4 open mq4 files.

I've found where to look for the BILD, but I don't know how to change it.

 
If you move an order, the history will show the price of its last value. is there any information about its initial setting price stored somewhere?
 

MT4 at broker - does not load history

GBPAUD
GBPCAD
GBPNZD

I went to the "MetaQuotes" demo but these pairs are simply not there. Why so? What do I have to do to make them appear?


 
Money_Maker:
If you move an order, the history shows the price of its last value. is there any information about its initial setting price stored somewhere?

In the log...
 
Please help me with writing a function. I need the function to look through all open orders on the chart and select two orders, the first with the smallest lot and negative profit, the second with the biggest lot and positive profit. It would be better to delete these orders immediately in this function because it seems that two tickets cannot be sent simultaneously.
Reason: