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
I want to know how to calculate corretly all costs to open and close a position to be able to handle better an dynamic volume entrances.
I search about this topic here, but It was very hard to find something useful. The relevant tools that I found were:
To get margin from symbols: https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants
To get margin account: https://www.mql5.com/en/docs/constants/environment_state/accountinformation
To calculate a estimated profit: https://www.mql5.com/en/docs/trading/ordercalcprofit
To calculate the needed margin to open an order: https://www.mql5.com/en/docs/trading/ordercalcmargin
My questions are:
1. Is there some article or guide that shows how to open / close positions safety, looking by all possible costs involved? I found articles to check my account and environment, but none to check each operation.
2. Always OrderCalcProfit returns the same as PositionGetDouble (POSITION_PROFIT)? In my tests it's true, but I don't know if it's coincidence ...
3. Where can I found the broker fees and charges to add to the profit calculation?
4. There is some MQL5 article that explains how the tool handle stocks and the differences among other symbols (like forex, futures, etc.)? If it not exists, will be very helpful the indication of a good documentation to understand the peculiarities of the stocks trades to build a good EA.
Tks by advance