![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
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 ?