Download MetaTrader 5
To add comments, please log in or register
Write articles and earn money. We pay 200 USD for them!
Trevhib
184
Trevhib 2014.03.20 10:17 

I wondered if anyone could point me in the right direction as regards the likely problem with the following behaviour:

We wanted to demonstrate a bot to a potential customer without releasing the source code to them, so in the usual way we gave them an EX4 file but not the MQL source file. However, despite doing everything as normal, the EX4 would not execute live trades until the MQL had been placed in the experts folder alongside it, and then MT4 restarted. We were then able to delete the MQL file and then the EX4 worked fine on its own (as it should have from the beginning).

It's almost as if the EX4 needed a jump-start. What was strange, was that before going round the loop of putting the MQL file in there, the EX4 would back-test just fine in the tester (and there was a smiley face on the chart etc), it would just not execute a live trade. I guess the only thing to note was that the expert advisor icon for that bot in the Navigator was grey initially, then turned bright after the MQL had been added.

We used to have this problem a long time ago when we first started out and had thought it had been resolved but in this instance it seems to have reappeared. Can anyone give me a clue?

Cheers,

Trev

whroeder1
13627
whroeder1 2014.03.20 13:50  
Trevhib: the Navigator was grey initially, then turned bright after the MQL had been added.
Of course it did. Grey means you have only an ex4 (can't edit.) Colored means you have both (can edit.) Has nothing to do with your problem.
Toast
220
Toast 2014.03.20 14:01  

Sounds to me that there is a problem with your original .ex4 file.

When you add the MQL file and restart, MT4 will automatically recompile from source and replace your original .ex4 with a freshly compiled one... which works.

Different build numbers?

Trevhib
184
Trevhib 2014.03.20 18:23  
WHRoeder:
Of course it did. Grey means you have only an ex4 (can't edit.) Colored means you have both (can edit.) Has nothing to do with your problem.


Since we always have our MQL files in our experts folders along with the EX4's, we never experience the icons greyed out. It's been such a long time since I saw that, I thought I'd mention it on the off chance it was of some use to the discussion. The bit of information amongst the sarcasm is useful, thanks.

Trevhib
184
Trevhib 2014.03.20 18:26  
toast:

Sounds to me that there is a problem with your original .ex4 file.

When you add the MQL file and restart, MT4 will automatically recompile from source and replace your original .ex4 with a freshly compiled one... which works.

Different build numbers?


Thanks toast. I imagine this is indeed the problem. I'm sure we looked at this back in the day and I don't remember it being the reason, but I'll have another look in this new instance.

I can't understand why it would back-test fine, attached to the chart fine but would not execute live trades though. Anyway, thanks for the steer.

Trevhib
184
Trevhib 2014.03.21 09:47  

Well, my I'm told we used the Meta Editor that came with MT4 build610 to code and compile the EX4 at our and end and then it went onto the customer's machine that has the same MT4 b610 that comes with the same version of the editor.

Any more ideas gents, this is a right pain the butt :(

Toast
220
Toast 2014.03.21 10:17  
Sounds like you're going to have to start putting in print statements and find out what is stopping the live trades. Do you use IsDemo() and IsTesting() in your EA? What do the logs show?
Trevhib
184
Trevhib 2014.03.21 10:53  
Yeah, we're going to do some testing to see if we can pinpoint why this is happening, I've noted the suggestions, thanks Toast. I'll come back on this thread if we discover the issue.
Trevhib
184
Trevhib 2014.03.21 12:28  
toast:
Do you use IsDemo() and IsTesting() in your EA? What do the logs show?

No we don't use them. The logs don't show anything.
Alain Verleyen
Moderator
28627
Alain Verleyen 2014.03.21 15:23  
Trevhib:

Well, my I'm told we used the Meta Editor that came with MT4 build610 to code and compile the EX4 at our and end and then it went onto the customer's machine that has the same MT4 b610 that comes with the same version of the editor.

Any more ideas gents, this is a right pain the butt :(

Did you check that the customer's terminal has not been updated in the meantime ?
Trevhib
184
Trevhib 2014.03.24 10:03  
angevoyageur:
Did you check that the customer's terminal has not been updated in the meantime ?


Yes, both are b610.

Edit - I do think it's probably something to do with builds/editor versions but we're certainly not seeing a discrepancy at the moment.

/
To add comments, please log in or register