Questions from Beginners MQL4 MT4 MetaTrader 4 - page 62

 
Vitalie Postolache:
It is mandatory. And not only the lots, but also other values that are sent to the server. Lots are also useful to check the minimum and maximum value allowed in the account, as well as the step change, there have been cases where the lot can be changed in increments of 0.03, which means 90.01 will not work, at least for the normalization.
I thank you for the tip. I would check the minimum and maximum values in my account. About the step... My lots are already calculated using MarketInfo(Symbol(),MODE_LOTSTEP). I think it would be enough for the step. What do you think?
 

Where can I find a complete list of all the functions that have been changed from MT4 to MT5 or their equivalents for switching from MT4 to MT5?

There is almost nothing in the documentation in the transition section.

 
Andrei:
Where can I find a complete list of all functions that have been changed from MT4 to MT5 or their equivalents for MT4 to MT5 transition?

Here, for example.

I was translating a huge indicator from mql4 to mql5, started adding all sorts of transitional features, then realized that they are different languages and threw out everything that belonged to 4. I rewrote everything to pure five. After that I threw the program into four, and strangely enough, not a single error appeared, even that in the trend lines went through.

    ObjectSetInteger(chart_ID,nm,OBJPROP_TIME,t1);
    ObjectSetDouble(chart_ID,nm,OBJPROP_PRICE,p1);
    ObjectSetInteger(chart_ID,nm,OBJPROP_TIME,1,t2);
    ObjectSetDouble(chart_ID,nm,OBJPROP_PRICE,1,p2);

The only thing was a problem with the buffer colour, replaced just one expression.

So now I will only write for fours using the new standards, or better yet, write in fives and then tweak for fours if needed.

 
Vitaly Muzichenko:

Here, for example.

Thank you. Is this full list up to date, the article is old, isn't it? It says there are no trade functions, maybe something else?
 
Andrei:
Thank you. Is this full list up to date, the article is old, isn't it? They say there are no trading functions, maybe something else?
You can't translatethe trading functions, translate everything but the trading ones, and there's plenty of material on the forum
 
Vitaly Muzichenko:
You can't translate the trading functions, translate everything but the trading functions, and there's plenty of material on the forum
Why can't you translate it? Is there somewhere that describes everything in one place?
 
Andrei:
But why may it not be translated? Is there a description of everything in one place?

Read the documentation, there are plenty of examples.

And even better, look in the codebase, there are plenty of examples, and you will understand what you need.

Added: There is a library, which connects to the Expert Advisor and converts the whole thing, something like MT4Order

I will say it again: better not to mix the two languages, and write it as it should be. Yes, this is not an easy task, but the result will be much better.

 
Vitaly Muzichenko:

Let me repeat: it is better not to mix the two languages, but to write it as it should be written. Yes, it is not an easy task, but the result will be many times better.

In 99% of cases it is better to use MQL4 tradingfunctions in MT5.
 
Vitaly Muzichenko:

Read the documentation, there are plenty of examples.

Better yet, look in the codebase, there are plenty of examples and you'll see what you need.

It would be better if there were not a lot of different examples to dig through and compare, but just one correct one. Why two different examples about the same thing? Also interested in which functions work for hedging and which only for netting. I didn't find this in the documentation.

 
fxsaber:
99% of the time it is better to use MQL4 tradingfunctions in MT5.
How's that?