Download MetaTrader 5
To add comments, please log in or register
Do you want to write a technical indicator? Find solution in MQL5 Reference!
TT_FX1
145
TT_FX1 2008.12.31 11:22 

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

rv
462
rv 2008.12.31 17:42  
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 :-)

TT_FX1
145
TT_FX1 2008.12.31 23:21  

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

rv
462
rv 2009.01.01 22:11  
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

TT_FX1
145
TT_FX1 2009.01.02 01:18  

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

rv
462
rv 2009.01.05 15:20  
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

TT_FX1
145
TT_FX1 2009.01.19 19:00  
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

/
To add comments, please log in or register