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
So you mean, I should use OrderOpenPrice() for OrderSend() and OrderClosePrice()for OrderClose()?
But why? - Where is the difference? - e.g.:
Magic Number: So you mean somehting like this? (I nerver understood Magic Numbers... - I already read the documentation 5 times I think... Magic Numbers are so difficult...)
Would that be right? - (But the documentation says: int magic=0, // magic number - https://docs.mql4.com/trading/ordersend)
So I thought I also can use 0...
And my last question for today is. How can I get the price between Bid and Ask? - Is it "PRICE_MEDIAN"?
Also the first parameter of OrderClose() is a Ticket Number, not a Magic number. Don't just invent things - follow the instructions in the documentation.
Now, my final say because this is becoming tedious. You continue to refuse to do the research and look at example code:
NB! Look at some of the example EA's provided by MetaQuotes, such as "MACD Sample.mq4" and "Moving Average.mq4" as well as the many, many examples of EA's in the CodeBase.
Thank you a lot. My code looks now so. Is that right?
Do you mean "NULL" at OrderSend?
Well, why don't you try answering your own question! What does the documentation say about OrderSend() and that parameter?
Also, what does the documentation say about OrderClose() and the return value?
Do you mean "NULL" at OrderSend?
I always use Symbol() as the first parameter in OrderSend() ( when I am placing an order with the chart symbol.)
NULL means the current symbol when calling iClose() etc but it is not explicitly stated in the documentation that it can be used with OrderSend. It does work, but who knows whether that may change in future builds? For that reason, I will stick with Symbol().
I beg to differ. The documentation explicitly says that NULL is valid in iClose() and that it represents the current symbol. The documentation for OrderSend(), in contrast, states that the Symbol is required for the parameter.