
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
Forum on trading, automated trading systems and testing trading strategies
PositionsTotal() return 0 after a call of function trade.PositionOpen()
fxsaber, 2018.08.09 19:44
You must wait until Result.deal != 0
There are many pitfalls in the platform. This one is the simplest. So I do not use a standard library and I use my own (MQL4-style).
Forum on trading, automated trading systems and testing trading strategies
PositionsTotal() return 0 after a call of function trade.PositionOpen()
fxsaber, 2018.08.09 19:51
Try this Demo for Result.deal == 0 - ForexTimeFXTM-Demo01 (or FXOpen-MT5).
Which function should I use to check if an order (not pending) is excuted on the server side ?
I monitor in the OnTradeTransaction() event. This is similar to @fxsaber 's solution.
I monitor in the OnTradeTransaction() event.
Try this script there ForexTimeFXTM-Demo01 (or FXOpen-MT5)
Sometimes two new positions will open, not one.
You must wait until Result.deal != 0
There are many pitfalls in the platform. This one is the simplest. So I do not use a standard library and I use my own (MQL4-style).
It may happens there is never a deal.
It's not about reject.
It's not about reject.
It may happens there is never a deal, even when the order was accepted.
Forum on trading, automated trading systems and testing trading strategies
How to check that an order is executed after calling PositionOpen
fxsaber, 2018.08.09 20:35
Try this script there ForexTimeFXTM-Demo01 (or FXOpen-MT5)
Sometimes two new positions will open, not one.
I know that since 2014.
Forum on trading, automated trading systems and testing trading strategies
PositionsTotal() return 0 after a call of function trade.PositionOpen()
fxsaber, 2018.08.09 19:44
You must wait until Result.deal != 0
There are many pitfalls in the platform. This one is the simplest. So I do not use a standard library and I use my own (MQL4-style).
isn't a return code of 10009 a sufficient indication of a successful operation on server side ?
The problem is the synchronization between Server side and Client (Terminal) side.
It's not true!
Result