Download MetaTrader 5
To add comments, please log in or register
Your conversation partner speaks foreign language? Automatic translation will help you!
Mahmood
75
Mahmood 2015.12.21 14:02 
When I compail these code i get error missed parameters 

OrderSend (pair,action,volume(),MarketInfo(pair,MODE_ASK),3,stopLose1,takeProfit1,,,0,Green);

OrderModify(OrderToModify(),,stopLose1,takeProfit1,0,Green);

For both i recive this error:  ',' - syntax error, parameter missed

But for this one:
OrderClose(OrderToModify(),OrdersLots(),MarketInfo(pair,MODE_ASK),3,);

I recive error:  ')'- syntax error, parameter missed 

What and where do i missed parameters? 
All Variables are initialized before for example, pair contains string "eurusd", action contains string "OP_BUY", OrderToModify() is a function which returns a ticket
variable action contains a string value, is that my Problem? 
Mahmood
75
Mahmood 2015.12.21 14:27  
Mahmood000:
When I compail these code i get error missed parameters 

OrderSend (pair,action,volume(),MarketInfo(pair,MODE_ASK),3,stopLose1,takeProfit1,,,0,Green);

OrderModify(OrderToModify(),,stopLose1,takeProfit1,0,Green);

For both i recive this error:  ',' - syntax error, parameter missed

But for this one:
OrderClose(OrderToModify(),OrdersLots(),MarketInfo(pair,MODE_ASK),3,);

I recive error:  ')'- syntax error, parameter missed 

What and where do i missed parameters? 
All Variables are initialized before for example, pair contains string "eurusd", action contains string "OP_BUY", OrderToModify() is a function which returns a ticket
variable action contains a string value, is that my Problem? 

Help
honest_knave
969
honest_knave 2015.12.21 16:51  

Probably best to wait more than 25 minutes for a reply before bumping your topic ;-)

You need to put values in between your commas:

OrderSend (pair,action,volume(),MarketInfo(pair,MODE_ASK),3,stopLose1,takeProfit1,,,0,Green);
OrderModify(OrderToModify(),,stopLose1,takeProfit1,0,Green);
OrderClose(OrderToModify(),OrdersLots(),MarketInfo(pair,MODE_ASK),3,);
Mahmood
75
Mahmood 2015.12.21 20:13  
honest_knave:

Probably best to wait more than 25 minutes for a reply before bumping your topic ;-)

You need to put values in between your commas:


Ok don't get mad on me Im new here and don't know your rules
All resolved but the parameter i missed in OrderModify line is an open price which I dont want to modify it,  should I put 0 there?
Thank you 
Carl Schreiber
5962
Carl Schreiber 2015.12.21 21:52  
Mahmood000:

Ok don't get mad on me Im new here and don't know your rules
All resolved but the parameter i missed in OrderModify line is an open price which I dont want to modify it,  should I put 0 there?
Thank you 

Sir I would like to remind you respectfully that with the mql editor connected you can find the MQL4 reference where you can find the answers of 99% of your questions.

And if you are not sure whether this or that works just create a little script and check it out yourself - you can run it in the debugger - a very helpful tool!!

 This way is a lot faster than posting here and waiting for someone willing to answer. Many people don't like to spend their time on such too simple things - one feels a bit stupid.

WHRoeder writes once and a while learn to code let me add: learn to read before that.

/
To add comments, please log in or register