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
this is still mql4, isnt it ??
MQL5.
MQL5.
thanks, will try ur way.
since there is no solution for ordercloseprice for mql5.
since there is no solution for ordercloseprice for mql5.
Forum on trading, automated trading systems and testing trading strategies
need help for calculated total pips for order closed today (Mql5)
fxsaber, 2017.10.25 01:00
is there a another code if i dont want to use include #include <MT4Orders.mqh> ??
is there a another code if i dont want to use include #include <MT4Orders.mqh> ??
Of course, using "standard" mql5 code. Please post your attempt if you need coding help.
Yeah there are a bunch of bugs.
Mainly you can't use an index (i) related to deals to get order data.
To get open/close price you should work with deals only, DEAL_IN gives you open price, DEAL_OUT (eventually INOUT and OUT_BY) gives you the close price. You have to check DEAL_POSITION_ID to be sure you are working with open/close of the same position.
Alain is correct.
First you need to understand what a position is in MT5. A position is any number of trades on an instrument that starts when the first trade is placed and ends when the net position size is 0, meaning there can be any number of deals that comprise a position. In order to do what you want you will need to complete the following steps:
Here is an example.
Here is an example.
Anti-advertising of MQL5-EA.
Anti-advertising of MQL5-EA.
Thanks, but that's how it's done.