dev v 1 127
Just added this problem here. As i understand it was not fixed or there is a still problem.All files and description you could find in email.
Ticket [VAW-TVLOD-440]
Attachment Strategy 0160.mq5 added
Attachment Strategy 02443.mq5 added
0.2443 use market orders
Attachment Strategy 0160_modified.mq5 added
Attachment Strategy 02443_modified.mq5 added
On another symbol it seems to be working fine. Maybe this problem is symbol-related.
Please try these modified EA's I am attaching, it may solve the problem.
I have added log file
https://www.dropbox.com/s/8sow9iurmt6ompi/20200423.log?dl=0
Status changed from Waiting for information to In progress
Status changed from In progress to Waiting for information
could you create a demo account of your broker for me?
I was trying to create it myself so I could make tests directly on the SBER symbol, but the broker has refused my request, because they don't support clients from EU.
Thank you
Best regards,
Tomas
I have just generated a strategy for Brent futures which has quite the same setting as Sber stocks. And it works correctly. However, the same strategy does not work on Sber. Something particular wrong with symbol or share.
Unfortunately, Demo account has only futures and not stocks. We can arrange TeamViewer session, so you can check a problem on my non-demo account.
Please let me know what the option will be best for you.
Attachment Strategy 02443_modified2.mq5 added
thank you very much for your willingness. I was going through another metatrader forum posts and I found another possible solution.
Could you try one more version of the original strategy? It is attached.
If it doesn't help neither, then we can set up some TeamViewer session tomorrow and I will try directly on your account.
Best regards,
Tomas
We need to double-check that the bag with entering at stop or at limit is fixed.
Status changed from Waiting for information to Fixed
This one is a market stategy, it doesn't use pending orders.
I will add a new parameter ExpirationTime into MQL code so that expiration (which was the problem in this case) can be set for stock symbols.
It will be in minutes and set to 0 by default as trading on most of the symbols will be working fine without it.
If trading SBER, you would need to set this parameter to some value higher than zero in the EA.
The change will be present in the upcoming release of build 129.
Thank you very much for your cooperation.
Attachment Strategy 01313.mq5 added
Also how to determine the correct expiration time ?
Attachment Strategy 01313_modified.mq5 added
You can try to set expiration time to 1440 (one day)
Status changed from Fixed to In progress
Attachment screen.png added
Please set it to 1440 in Expert input parameters and let me know if it helped.
Attachment exptime.png added
Attachment screen.png added
The MQL code variable value gets overwritten by EA settings during backtest.
Please check the attached screenshot.
Attachment 20200525.log added
Attachment exptime2.png added
Thank you for the attached log. Can we make the TeamViewer session so I could test it directly on your broker?
If so please send your TV ID to support email and let me know what time is good for you.
Status changed from In progress to Fixed
Ok, the strategy backtests are working both with market and stop orders, but the correct expiration type must be used.
One of the strategies that did not work contains a weird source code, so that's probably the problem.
We could add some kind of automatic expiration type detection into the MQL code, I created a new feature task for this - https://roadmap.strategyquant.com/tasks/sq4_6530
For market orders, it is enough to set ExpirationTime to 60 in EA parameters. (Available from B129)
For stop/limit orders you must manually modify the EA's code to make it work on problematic symbols. You must do these changes in the MQL code:
const ENUM_ORDER_TYPE_FILLING preferredFillingType = ORDER_FILLING_FOK; //preferred filling type - will be applied if available const bool forceFillingType = false; //if set to true, it will force using preferredFillingType when opening orders
with this:
const ENUM_ORDER_TYPE_FILLING preferredFillingType = ORDER_FILLING_RETURN; //preferred filling type - will be applied if available const bool forceFillingType = true;
if(expiration > 0){ mrequest.type_time = ORDER_TIME_SPECIFIED; mrequest.expiration = TimeCurrent() + expiration * 60; } else { mrequest.expiration = 0; }
with this:
mrequest.type_time= ORDER_TIME_DAY; mrequest.expiration = TimeCurrent()+PERIOD_M30*60;
have you sent us the right strategy? In this task you are writing about a limit strategy, but the Strategy 06242 - Optimized 03023.sqx provided uses market orders.
Best regards,
Tomas