
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
Thank you. Added your option as a parallel check. Now it's just a matter of catching the right moment.
I'm 100% sure it will work!
Because you didn't fill the structure correctly (not just the fields, but the values as well).
Strange that the compiler didn't "swear".
You:
It needs to:
MtRequest.action = TRADE_ACTION_DEAL;
But no! The code in my message is not from the Expert Advisor, it is a corrected fragment of logs where debugging information is written from the Expert Advisor. My bad, my mistake.)
The EA itself fills in the structure as required, but the result of the check is different. It either calculates the margin correctly or gives some nonsense like in the example.
Here is a fragment from the live site
Make it so:
Here's another moment in the log:
I pass the same structure to OrderSend() and everything opens perfectly!
By the way, build 1194.
Selling Si-12.15, 2 lots. GO for 1 contract is 5090 rubles. A trade should have the QR 5090*2 = 10180 RUB. But the function returns 172148.68 RUB, which equals 172148.68 / 5090 = 33.82 contracts!
What a miracle...
Here's another moment in the log:
I pass the same structure to OrderSend() and everything opens fine!
By the way, build 1194.
Selling Si-12.15, 2 lots. GO for 1 contract is 5090 rubles. A trade should have the QR 5090*2 = 10180 RUB. And the function returns 172148.68 rubles, which corresponds to 172148.68 / 5090 = 33.82 contracts!
What wonders...
1. I gave you a sample of how to properly fill out the structure, and you ignore this advice.
Then why are you asking?
2. 1194 build is not compatible with current servers (Renat mentioned this. Use build 1159 for now).
3. I don't use OrderCheck() at all, I check the funds myself.
1. I have given you a sample of how to fill in the structure correctly, and you ignore this advice.
Why are you asking then?
2) Build 1194 is not compatible with the current servers (Renat mentioned this. Use build 1159 for now).
3. I don't use OrderCheck() at all, I check the means myself.
1. I don't ignore it at all. I'm not ignoring it at all. I've included your sample into the code, now I'm observing it.
2. Oh, man! I didn't know that.
3. I did the same thing. And the function is almost exactly the same, except 90% (good idea, by the way)
I raised this question because my function (similar to yours) checks CS and allows to open position, while standard OrderCheck() sometimes fails.
This probably refers to point 2.
In the terminal log there are a lot of messages like:
1. Why should I ignore it? I'm not ignoring it at all. I've included your sample in the code, now I'm watching.
2. Oh, man! I didn't know that.
3. I did the same thing. And the function is almost exactly the same, except 90% (good idea, by the way)
I precisely brought up this question because my function (similar to yours) checks CS and allows to open position, while standard OrderCheck() sometimes glitches.
So use all your own on FORTS - it's much more correct :)
That's how you end up doing it! Tempted somewhere to use someone else's code or library, in order to save time on writing a "wheel" or test some idea.
But in the end you have to spend a week on catching errors and defects of other developers. In the end everything is rewritten so that there is no trace of other people's code.
Hello!
Futures glues appeared in the test window, which in itself is very pleasing, however, when trying to match the glue with the contract, I found that there are no trades on the glue at all - everything is fine on the contracts - there are quite a lot of trades. I checked on four instruments Si,RTS,GAZR,SBRF and the period 01.01.2015 -24.10.2015.
Hello!
Futures glues appeared in the test window, which in itself is very pleasing, however, when trying to match the glue with the contract, I found that there are no trades on the glue at all - everything is fine on the contracts - there are quite a lot of trades. I checked on four instruments Si,RTS,GAZR,SBRF and the period 01.01.2015 -24.10.2015.