I have some questions concerning mql5:
1) Is there really no book on mql5? Is there a good website to learn mql5? I'm good at c++ and i've seen the mql-documentation. This is nice, but it's only good to look-up things, not good to learn. I've found some articles on this website (especially this one helped me alot https://www.mql5.com/en/articles/100 ), but I don't know which articles I should read (in which order). A book or a bigger tutorial would help me a lot.
2) What is the difference between a position and an order? I've seen that in an article, but I didn't really get the difference.
3) If I have a buy-position opened, how can I close it? Do I really have to use Order_Send with a .type = ORDER_TYPE_SELL? Isn't there something like Close(Order_ID)?
Thank you! :)
1. Try to look for "MQL5 (doc) as help file" at left side of online doc (https://www.mql5.com/en/docs), you can also get the same book from MetaEditor 5 help menu and select MQL5 reference, and you can use sample in MetaEditor 5 and MQL5.com code base as a learning sample.
2. This is gonna be confusing a little : Position is open market order (buy or sell), order is pending order (buylimit, sellimit, buystop, sellstop, buystoplimit, sellstoplimit).
3. Yes, to close a buy position you must open sell position with the same amount of volume/lot, and vice versa to close sell position. No, there's no Close function in MQL5.
From that help file I mention above ,read this section (just to name a few) https://www.mql5.com/en/docs/trading, and trade class https://www.mql5.com/en/docs/standardlibrary/tradeclasses/ctrade.
IMHO read/learn MQL5 code from MetaEditor would help a lot than reading MQL5 help file.