You cannot miss first 7 parameters, as they dont have default values. You can skip last 4 if you want to use them with their default values. If you want to use "magic" with different value, last 2 parameters can be skipped, but "comment" must exist before "magic".
You can skip last parameters from a function if they have default values. And position of parameters cannot be changed.
intOrderSend(
string symbol,
int cmd,
double volume,
double price,
int slippage,
double stoploss,
double takeprofit,
string comment=NULL,
int magic=0,
datetime expiration=0,
color arrow_color=CLR_NONE
)
I added comments. What should I do for the "invalid lot size" and the "invalid double number as parameter 3" ?
sorry and thank you again
They are the same thing . . . read the documentation, parameter 3 is the lotsize.
Comment is not mandatory, but if you are using any parameters that come after it, magic number, expiration and color, you must allow for it . . . even if it is ""
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
You missed Comment
RaptorUK,
Yeap, I have the smiling face. No problem with that. ^^
JDeel,
Does comment are compulsory ?
zzuegg,
As you said I have errors in log... see picture below...dont know so much what does that mean...
I added comments. What should I do for the "invalid lot size" and the "invalid double number as parameter 3" ?
sorry and thank you again
You cannot miss first 7 parameters, as they dont have default values. You can skip last 4 if you want to use them with their default values. If you want to use "magic" with different value, last 2 parameters can be skipped, but "comment" must exist before "magic".
You can skip last parameters from a function if they have default values. And position of parameters cannot be changed.
I added comments. What should I do for the "invalid lot size" and the "invalid double number as parameter 3" ?
sorry and thank you again
They are the same thing . . . read the documentation, parameter 3 is the lotsize.
Comment is not mandatory, but if you are using any parameters that come after it, magic number, expiration and color, you must allow for it . . . even if it is ""
I added comments. What should I do for the "invalid lot size" and the "invalid double number as parameter 3" ?
sorry and thank you again
Invalid lot size comes from wrong "volume" parameter. This is double parameter, not string... remove " "
thank you very much guys for your explanations,
I changed things as you said and when I attach EA to the graph, i do not have problem :
But...EA is still not trading at all... here is my corrected codes...
is that correct ?
Do you want it open every new tick a new pendingtrade ?
Is your broker 4 or 5 digit Is the SL and TP big enough 4 digit will give TP 7 pips but on 5 digit it will be 0.7 pips propably to small
There needs on plenty brokers some distance between orderopenprice() pendingtrade and the price the moment you place the trade is this big enough ?
Are you allowed to send the trade with SL and TP directly ?