Errors, bugs, questions - page 2411
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
Please run this code:Multicurrency iMA Trend 2.
Specify "EURUSD,GBPUSD" in the settings ( Symbols parameter).
On my configuration
all SLs closed at their symbol prices. That is, there is no price overlap error.
Please run this code:Multicurrency iMA Trend 2.
Specify "EURUSD,GBPUSD" in the settings ( Symbols parameter).
On my configuration
all SLs closed at their symbol prices. That is, there is no price overlap error.
Thank you, the error has been localized. Post below.
there are two mistakes.
№1. Your mistake. Somewhere in the code. You are setting SL for EURUSD position using GBPUSD price. The terminal should have nothing against it.
№2. Bug in the terminal. If this SL is triggered at a price that does not exist at the time in the EURUSD flow, using the GBPUSD price.
https://www.mql5.com/ru/docs/constants/structures/mqltraderequest
Apparently when sending a modification request, the position field has priority over symbol. Printreq.position
Yes, you turned out to be right, my mistake is logical:
in the structure:
MqlTradeRequest m_request;
m_request.position = #3
m_request.symbol = GBPUSD
m_request.sl = 1.60704
actual position number for GBPUSD #4
when OrderSend is executed, the tester sets a stop for the symbol corresponding to position #3, which is eurusd.
Tester bugs:
- fails to check if m_request.position and m_request.symbol match;
- sets a stop at 1.60704 for the buy position, the symbol eurusd, which has a current price of 1.30935;
- on the next tick sets a stop at 1.60704, although the actual price is 1.30935.
Thank you all. I hope the platform developers will see the post.
Yes, you turned out to be right, my mistake is logical:
In the structure:
MqlTradeRequest m_request;
m_request.position = #3
m_request.symbol = GBPUSD
m_request.sl = 1.60704
actual position number for GBPUSD #4
when OrderSend is executed, the tester sets a stop for the symbol corresponding to position #3, which is eurusd.
Tester bugs:
- fails to check if m_request.position and m_request.symbol match;
- sets a stop at 1.60704 for the buy position, the symbol eurusd, which has a current price of 1.30935;
- on the next tick sets a stop at 1.60704, although the actual price is 1.30935.
Thank you all. I hope the platform developers will see the post.
Execution of a stop for a buy position at 1.60704 at the current price 1.30935 is not an error. But setting a buy stop to the level of 1.60704 at the current price of 1.30935 is an error.
Build 2007
Function:
is supposed to output the financial result of the transaction into the profit variable, but it always turns out to be 0.0, and the value in the lot variable is always correct.
Is there an error? - Or I'm doing something wrong?
Build 2007
Function:
is supposed to output the financial result of the transaction into the profit variable, but it always turns out to be 0.0, and the value in the lot variable is always correct.
Is there an error? - Or I'm doing something wrong?
DEAL_ENTRY_OUT or INOUT should be checked. The _IN trades have a profit of 0
DEAL_ENTRY_OUT or INOUT should be watched. The _IN trades have a profit of 0
Well, the first from the end of the list is taken, it should be OUT
Well it's the first from the end of the list, it should be OUT
If you pass TimeCurrent() in the endDate, replace it with TimeCurrent()+60 or something like that. That should help.
If you pass TimeCurrent() in endDate, replace it with TimeCurrent()+60 or something like that. This should help.
No, it's still 0.0.
No, it's still 0.0.
Then debug it. Print transaction tickets and see in the tester what is actually selected there. Add a filter by trade type.