Dimka-novitsek: Still, it's still fighting... Let's say action=ORDER_TYPE_SELL, it says 'action' - undeclared identifier. OrENUM_ORDER_TYPE action=ORDER_TYPE_SELL, it says 'action' - unexpected token. And so on...
I don't make the function... I'll find out where it came from! I'm sorry if I misled you or if I misunderstood. I'll just...
Ah, here.
OrderCalcMargin
Calculates the amount of margin required for the specified order type in the current account and in the current market environment, without considering current pending orders and open positions. Allows you to estimate the amount of margin for the planned trade. The value is returned in the account currency. bool OrderCalcMargin( ENUM_ORDER_TYPE action, // order type string symbol, // symbol name double volume, // volume double price, //open price double& margin //variable for getting the margin value );
But it still fouls up... Let's say action=ORDER_TYPE_SELL, it says 'action' - undeclared identifier. OrENUM_ORDER_TYPE action=ORDER_TYPE_SELL, it says 'action' - unexpected token.
It's everywhere... And in English...
Dimitri!
Once again I am pointing you to the function and function call sections!
Function definition:
int function (int a, int b)
{
return (a+b);
}
first comes its header.
It has the return value type (int), function name and its input parameters with their types!
function call:
int c = 1;
int d = 5;
int summa;
summa = function(c, d); // вызывается функция, фактические параметры переменные c и d
summa = function(1, 3); // вызывается функция, фактические параметры числа 1 и 3
summa = function(1, d); // вызывается функция, фактические параметры число 1 и переменная d
here first you have defined some variables (or not)
and then you call the function by writing in parentheses for which numbers or variables you call it.
Please help me, I can not become a programmer, so just tell me what to do, I have an Expert Advisor mql5 how to modify it to mql4, if you can not tell me please tell me!!!! or in private
fokeevis: Help please, I can't become a programmer, so please tell me what to do, i have an mql5 Expert Advisor, how can i modify it to mql4, if you are not hard to tell me about it!!!! or in person.
It is complicated and very difficult, especially for a non-programmer, so you are right to ask Jobs.
Dimka-novitsek: I developed a function at someone's request, it should look something like this. I haven't compiled it yet, I haven't tested it in work, I wrote it in Notepad.
Is it possible to make the spread on MetaQuotes-Demo server constant, because debugging, adjustment turns into a nightmare, you have to take into account the spread, which is constantly changing and distorts the picture????????
So "what is a function and what is a function call" is still unread? :)
I'll get that...
I don't make the function... I'll find out where it came from! I'm sorry if I misled you or if I misunderstood. I'll just...
Ah, here.
OrderCalcMargin
Calculates the amount of margin required for the specified order type in the current account and in the current market environment, without considering current pending orders and open positions. Allows you to estimate the amount of margin for the planned trade. The value is returned in the account currency.
bool OrderCalcMargin(
ENUM_ORDER_TYPE action, // order type
string symbol, // symbol name
double volume, // volume
double price, //open price
double& margin //variable for getting the margin value
);
But it still fouls up... Let's say action=ORDER_TYPE_SELL, it says 'action' - undeclared identifier. OrENUM_ORDER_TYPE action=ORDER_TYPE_SELL, it says 'action' - unexpected token.
It's everywhere... And in English...
Dimitri!
Once again I am pointing you to the function and function call sections!
Function definition:
first comes its header.
It has the return value type (int), function name and its input parameters with their types!
function call:
here first you have defined some variables (or not)
and then you call the function by writing in parentheses for which numbers or variables you call it.
Help please, I can't become a programmer, so please tell me what to do, i have an mql5 Expert Advisor, how can i modify it to mql4, if you are not hard to tell me about it!!!! or in person.
I developed a function at someone's request, it should look something like this. I haven't compiled it yet, I haven't tested it in work, I wrote it in Notepad.
Is it possible to make the spread on MetaQuotes-Demo server constant, because debugging, adjustment turns into a nightmare, you have to take into account the spread, which is constantly changing and distorts the picture????????
Floating spread is an unnecessary headache.