I am a bit confused about the volume param in the PositionOpen function https://www.mql5.com/en/docs/standardlibrary/tradeclasses/ctrade/ctradepositionopen
The function definition does not give you any info on it, so I do not know what the volume is based on but I am guessing that it means how many lots, so 1 is one lot. And if that is the case, is there a way of finding out the lot size programmatically? Also, is it possible to open positions with a fraction of a lot like 0.7 ?
Ideally what I am really looking for is a way to open positions based on how much money I want to invest and with how much margin in the simplest way possible.
Thanks in advance for the help.
Yes volume is always "how many lots".
The value you can use depends of the symbol specifications. Please check the documentation.
Thank you, I found the link very useful. Also is the lot size equal to SYMBOL_TRADE_CONTRACT_SIZE ?
That's the size of 1 lot.
Example: EURUSD, contract size is 100,000 (1 standard lot).
Volume = 0.7 so that means you will trade 70,000 EUR
Thank you very much! Btw I saw that you live in Belgium and I am currently living in Brussels, let me know if you want to have a beer sometime, I´ll pay of course, given that you are the one answering to all my posts I think is the least I could do :)