If you don't mind I would like to know how do you get there? It was the string conversion that doesn't work? The code has the same value: order index, SL values, type of order...
One more question: I was searching on the mql4 book for operand/expressions to understand the structure of the code that you have written: "MarketStopLevel = (minStop>0.0)?minStop:MarketStopLevel;"
When I saw yesterday the correction of Ernst I have remember your comment to one topic that I have made before, where you already suggested to use switch instead of string and then:
OP_BUY
0
Buy operation
OP_SELL
1
Sell operation
OP_BUYLIMIT
2
Buy limit pending order
OP_SELLLIMIT
3
Sell limit pending order
OP_BUYSTOP
4
Buy stop pending order
OP_SELLSTOP
5
Sell stop pending order
But I didn't understand well! I was thinking that you mean put the number of the type in the function, ex: ModifyOrders("1") instead ofModifyOrders(OP_BUY).
I have to thank you also for the help. My mistake! Sorry...
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.
Ernst, thank you for the help!
If you don't mind I would like to know how do you get there? It was the string conversion that doesn't work? The code has the same value: order index, SL values, type of order...
One more question: I was searching on the mql4 book for operand/expressions to understand the structure of the code that you have written: "MarketStopLevel = (minStop>0.0)?minStop:MarketStopLevel;"
Can you give a link to read?
The problem was the order ticket (post 8).
MarketStopLevel = (minStop>0.0) ? minStop : MarketStopLevel;is simply a shorthand if else statement.
It wasn't the string conversion because:
Now you successfully hired Ernst for a couple of days to,
https://www.mql5.com/en/docs/basis/operators/ternary
Marco,
When I saw yesterday the correction of Ernst I have remember your comment to one topic that I have made before, where you already suggested to use switch instead of string and then:
OP_BUY
0
Buy operation
OP_SELL
1
Sell operation
OP_BUYLIMIT
2
Buy limit pending order
OP_SELLLIMIT
3
Sell limit pending order
OP_BUYSTOP
4
Buy stop pending order
OP_SELLSTOP
5
Sell stop pending order
But I didn't understand well! I was thinking that you mean put the number of the type in the function, ex: ModifyOrders("1") instead of ModifyOrders(OP_BUY).
I have to thank you also for the help. My mistake! Sorry...