Compile EA on the fly?? possible

 

Hi All

Is there a way to compile a EA on the fly. The reason is I want to embedded the Expiry date to the EA when someone make a purchase of a EA or indicator through a internet payment gateway

Thanks

 
TT_FX1 wrote >>

Hi All

Is there a way to compile a EA on the fly. The reason is I want to embedded the Expiry date to the EA when someone make a purchase of a EA or indicator through a internet payment gateway

Thanks

use metalang.exe in the root directory of your metatrader-installation.

if i remember u set the parameters for input and outputfile like

c:\....\metalang.exe "c:\test.mq4" "c:\test.ex4"

.. but i am not shure in moment. google will help you more.

welcome :-)

 

Hi EADeveloper

Thanks for your advice.

Let say below is the code I use to check the expiry date (eg. D'30.1.2009 01:00' ) of the EA and I would like to update this paramter from the purchased date plus 1 mth when it compiles, do you have any idea how to automate this process

TimeCurrent() > D'30.1.2009 01:00'

Thank You

Tom

 
TT_FX1 wrote >>

Hi EADeveloper

Thanks for your advice.

Let say below is the code I use to check the expiry date (eg. D'30.1.2009 01:00' ) of the EA and I would like to update this paramter from the purchased date plus 1 mth when it compiles, do you have any idea how to automate this process

TimeCurrent() > D'30.1.2009 01:00'

Thank You

Tom

yes, have some ideas :-)

Depending on the Tools you use for developing you have to find something similar ... i was making like this :

i make a EA, in the file i insert a string on the beginning like <%date%> (TimeCurrent() > D'<%date%>')

then i use some script to open the mq4 - file, replace the <%date%> with what ever you need like (f.e. 3943422423, the time in seconds).

then compile "on the fly" and finished

 

Hi EADeveloper

Thanks again for your advice

So far I only have a solution likes this, whenever it compiles, the EX4 file will have a modification time. So I built a small rountie in the EA by using the kernel32.dll to reterive this modification time with the subscription period ( let say 1 mth) added on, then I used this time to counter checking with the broker time. But I found your method is better.

When you mention you have used some script to open the MQL file to replace the <%date%>, then compile it on the fly. Would you mind sharing with me what kind of script you are using, isn't it a MQL4 script and how to implement it.

Thanks Much

Tom

 
TT_FX1 wrote >>

Hi EADeveloper

Thanks again for your advice

So far I only have a solution likes this, whenever it compiles, the EX4 file will have a modification time. So I built a small rountie in the EA by using the kernel32.dll to reterive this modification time with the subscription period ( let say 1 mth) added on, then I used this time to counter checking with the broker time. But I found your method is better.

When you mention you have used some script to open the MQL file to replace the <%date%>, then compile it on the fly. Would you mind sharing with me what kind of script you are using, isn't it a MQL4 script and how to implement it.

Thanks Much

Tom

Hi,

no,was not in MQl, i was using Borland Delphi for a small exe-File to solve this. but is also possible in a CGI Script or else.

If u write me exact what you need i try to create for you.

forex.trading@gmx.at

brgds

 
EADeveloper wrote >>

Hi,

no,was not in MQl, i was using Borland Delphi for a small exe-File to solve this. but is also possible in a CGI Script or else.

If u write me exact what you need i try to create for you.

forex.trading@gmx.at

brgds

Hi EADeveloper

I will send email to you to describe what I m looking for. Really appreciated your help

Best Regards

Tom

Reason: