Running a program from MetaTrader is not a hard thing anymore! - page 2

 
codersguru:
Well, another question!

Is the program you want to monitor (running/ not running) has a window?

A window means it's a visable program and it's window is shown not a system tray or a hidden program.

Why i'm asking? Because if the program has a window it will be easier to find and if it hidden it will be PC resource consuming to make this dll!

It would be visible. Although it could be minimized, is that a problem? But isn't it possible to check somehow the windowhandle I get from the shell? If it gives these resource problems, I could just before the end of the program save a file with a special name and let MT4 check whether that file exists.

BTW: another question, totally unrelated. If I notice during the init() that something is wrong with the inputs, is there a possibility to break off the indicator/EA, so that it doesn't load? Or unload itsself? A special returnvalue different from 0? Or should I call deinit()?

 

I'm not able to download this library

Many Thanks to Coder's Guru for all his great work; i am not able to download this library , could anybody please be so kind in provide me with the apppropiate link?.

Thanks a Lot

 

Where is the library?

I'm trying to find the library mentioned in this post. Where can I get it?

 
 
codersguru:
Hi folks,

Scenario 1:

The EURUSD went up, I want to tell the boss. What if the MetaTrader can open my email client!

Scenario 1:

The EURUSD went down. Could MetaTrader open the notepad to write a piece of note.

If you are a lazy person like me, or you have more useful ideas (scenarios) about running applications from MetaTrader!

Running a program from MetaTrader is not a hard thing anymore.

Just you this library.

And enjoy with the Shell function:

Usage:

use this function to run any program you want from your MQL code.

Parameters:

FullPath (string) the full path and the file name

Parameters (string) any parameters you want to pass to the program

Return vale:

(int) the handle of the program in success and -1 in error

Example:

int res = Shell ("c:\\window\\notepad.exe", "");

Tools - Shell script! | www.metatrader.info

thankz dan info masta...

please check your PM masta...

i have one request to develop 1 indicator..

thankz masta

 

Program/Indicator/Expert Management

Do anyone have any Program/Indicator/Expert Management tools?

A program that reads the directory and creates a text file of the file names and dates modified would be a nice start.

 

ShellExecute problem

codersguru:
Hi folks,

Scenario 1:

The EURUSD went up, I want to tell the boss. What if the MetaTrader can open my email client!

Scenario 1:

The EURUSD went down. Could MetaTrader open the notepad to write a piece of note.

If you are a lazy person like me, or you have more useful ideas (scenarios) about running applications from MetaTrader!

Running a program from MetaTrader is not a hard thing anymore.

Just you this library.

And enjoy with the Shell function:

Usage:

use this function to run any program you want from your MQL code.

Parameters:

FullPath (string) the full path and the file name

Parameters (string) any parameters you want to pass to the program

Return vale:

(int) the handle of the program in success and -1 in error

Example:

int res = Shell ("c:\\window\\notepad.exe", "");

Tools - Shell script! | www.metatrader.info

Hi,

I could not get this work with xcopy command "xcopy c:\\text1.txt c:\\text2.txt". It did not work at all. I tried first to test it from OS's run line without double '\'. It went ok if text2 did not exist. If text2.txt exists you have to confirm whether this is a file or directory. There is no effect on putting "F" as a parameter to to this ShellExecuteA function call. Hope you understand what I am after. I could also use "ren text1.txt text2.txt" if it works too, but could get it work either.

Any workarounds?

Thanks,

Nchosen

 

Looking for a library cglib.mq4

Forex Community,

Does anyone have by chance library cglib.mq4? Please upload or send to me directly since I can't find it on a site where it was published originally. I will appreciate it very much

 

Database help please

Hey there does anyone know how a Expert Adviser can read and write to a Microsoft access document? It does not necessarily need to be Microsoft access but excel could also work... The extension for an access document is .accdb..

Thanks a lot !

 

You can very easily read and write from a MySQL database, there are code examples on this forum, although IIRC its limited to scalar variables only.

If you really have to use Aceess, then I assume you could store the data in the MySQL tables, and then link these to Access, assuming there's a suitable driver available. Using MySQL is definately the easiest option.

An easy solution is to use a text file, writing data import and export functions in Access, thats the approach that I used for years, its a bit clunky, but it works.

Alternativey you could write a dll, or use a webservice, I've seen examples of both on various forums generally using SQLServer as the db, but it should be simple enough to modify these. Theres certainly an example on the metaquotes forum of writing tick and bar data to SQL Server.

Reason: