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.
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?
The EURUSD went up, I want to tell the boss. What if the MetaTrader can open my email client!
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:
use this function to run any program you want from your MQL code.
FullPath (string) the full path and the file name
Parameters (string) any parameters you want to pass to the program
(int) the handle of the program in success and -1 in error
int res = Shell ("c:\\window\\notepad.exe", "");
thankz dan info masta...
please check your PM masta...
i have one request to develop 1 indicator..
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.
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.
Looking for a library cglib.mq4
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.