- Your order close loop does not.
- If it doesn't work for the first or second time, why do you think it would work the 20th?
- Why doesn't it work? You have no idea! What are Function return values ? How do I use them ? - MQL4 forum
- Your order close loop does not.
- If it doesn't work for the first or second time, why do you think it would work the 20th?
- Why doesn't it work? You have no idea! What are Function return values ? How do I use them ? - MQL4 forum
1. I did not understand what you mean? You mean the close loop doesnt exit?
2. The trade context may be busy or there mught be network issues. I have tested my EA on around 20 different brokers and some are really problematic. Thus the 20 time retry was added.
3. I am quie experienced with MQL4, and i had read that article when i first started development on MQL4 :) My code had all sorts of logging in place in the testing phase. But now that it had been working perfectly and we had gone live with this i had to trim down logging statements.
Thanks for your response.
Best Regards,
Umer
3. I am quie experienced with MQL4, and i had read that article when i first started development on MQL4 :) My code had all sorts of logging in place in the testing phase. But now that it had been working perfectly and we had gone live with this i had to trim down logging statements.
Why ? ? just turn them Off when you don't need them and On when you do need them, there is minute overhead in checking a bool.
Haha i absolutely agree with you on this. BUT, the issue is not with the overead, its with the statements that get printed on a client's system. The system runs 24/5. Being a dev i really do not have any issues but the clients start complaining.
I guess i would need to put those statements back in and hope to find out the issue.
Thanks Anyways.
Master.Aurora:
1. I did not understand what you mean? You mean the close loop doesnt exit?
BUT, the issue is not with the overead, its with the statements that get printed on a client's system
- Your close loop will not exit for 20 * (1000ms plus however long orderClose takes)= 20 seconds. An EA must exit within 2 seconds when shut down. Your loop doesn't use IsStopped().
- What part of turning them OFF was not clear?
Haha i absolutely agree with you on this. BUT, the issue is not with the overead, its with the statements that get printed on a client's system. The system runs 24/5. Being a dev i really do not have any issues but the clients start complaining.
I guess i would need to put those statements back in and hope to find out the issue.
Thanks Anyways.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello guys,
I am getting very peculier behaviour from my code. The following snippet is where the problem occurs:
This code has been working perfectly for the past few weeks but today something really strange happened. In my logs, the last statement that got printed was "Lots to close =". I didn't get anything in the journal logs against OrderClose command so it seems that the the ocntrol never got to OrderClose Statement. After a couple of minutes, when i figured out there was an issue, i removed the EA from the chart and it closed with the following messages:
My start function uses a while loop with IsStopped().
Can anyone shed light on what might have happened here? I would really appreciate any positive feedback.
Thanks.
Umer