FORTS: To help beginners - page 4

You are missing trading opportunities:
- Free trading apps
- Free Forex VPS for 24 hours
- 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
What does this have to do with the ava? He can't write on the forum, he's permanently banned.
What's that got to do with the ava? He can't write on the forum, he's banned forever.
No, he's been unbanished.
The banned users are written in crossed out.
No, he's been unbanished.
Banned users are written in crossed out.
Features:
Receiving confirmation (TRADE_RETCODE_PLACED ) in OrderSend() return code and order ticket,
and for the OrderSendAsync() function in OnTradeTransaction(), this does not at all mean that
the order is really EXPOSED to an exchange.
So an additional check of the order status is needed (just as for other actions on the order).
https://www.mql5.com/ru/docs/constants/structures/mqltraderesult
It says that the ticket is filled only when thetrade type isTRADE_ACTION_PENDING.
If the operation is TRADE_ACTION_DEAL, will the order ticket be returned in result.order?
Yes.
When does error 10013 occur in response to OrderCheck()?
Here is the code of my script:
Here's the log I'm getting:
When does error 10013 occur in response to OrderCheck()?
Here is the code of my script:
Here's the log I get:
Passed when added m_request.expiration =0, although the help says:
Exchange Execution.
Trade order to open a position in Exchange Execution mode. Requires 5 fields to be specified:
You can also specify magic and comment fields.
But the weirdness doesn't end there.
1 lot Buy:
Check (RTS-6.16,M30) OnStart: retcode=0, balance=530863.24, equity=538989.4399999999, profit=2.121995790965272e-314, margin=211242.25, margin_free=319620.99, margin_level=255.1522907941001, comment=Done
Check (RTS-6.16,M30) OnStart: symbol=RTS-6.16, operation=0, volume=1.0
Margin for the transaction 211242.25, the same as the current margin - all correct as the current short position for RTS-6.16 is 2 contracts. Initial margin for 1 contract RTS-6.16 17388.75
I add one more lot.
2 lots Buy:
Check (RTS-6.16,M30) OnStart: retcode=0, balance=651428.4399999999, equity=659212.76, profit=2.121995790965272e-314, margin=211242.25, margin_free=440186.19, margin_level=312.0648260468727, comment=Done
Check (RTS-6.16,M30) OnStart: symbol=RTS-6.16, operation=0, volume=2.0
All ok, as the current position is 2 Sell, the margin remains unchanged.
Now 3 Buy contracts:
2016.04.28 01:26:47.319 Check (RTS-6.16,M30) OnStart: retcode=0, balance=651428.4399999999, equity=658739.4, profit=2.121995790965272e-314, margin=246019.75, margin_free=405408.69, margin_level=267.7587470111648, comment=Done
2016.04.28 01:26:47.319 Check (RTS-6.16,M30) OnStart: symbol=RTS-6.16, operation=0, volume=3.0
Margin value at once 246019.75. How come? For 1 contract only 17k. What about the other values (in the previous cases too)? Where did the equity and balance come from? I don't even have that much in my account. margin_free is also wrong, not talking about profit.
Can someone check it for me, maybe I'm doing something wrong?
Passed when I added m_request.expiration =0, even though it says so in help:
Always initialize all variables and structures with zeros immediately after declaration. You had some rubbish in the expiration field, so you got an error.
Always initialise all variables and structures with zeros immediately after declaration. You had some rubbish in the expiration field, that's why you got the error.