Forex
Google

Go Back   Forex Trading > Downloads > Tools and utilities
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-21-2006, 05:29 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Arrow Running a program from MetaTrader is not a hard thing anymore!

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", "");

http://www.metatrader.info/node/89
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-21-2006, 06:58 PM
hapalkos hapalkos is offline
Junior Member
 
Join Date: Dec 2005
Posts: 14
hapalkos is on a distinguished road
cglib

It is nice to have this capability.
I noticed the download file is named cglib.mq4
I change it to cglib.mqh and placed it in the include file.
Works great!
As a test of the Shell function, I opened a .csv file in ...\experts\files with a text editor.
Thanks for the good work.
hap
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-22-2006, 12:13 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Talking You're welcome!

Quote:
Originally Posted by hapalkos
It is nice to have this capability.
I noticed the download file is named cglib.mq4
I change it to cglib.mqh and placed it in the include file.
Works great!
As a test of the Shell function, I opened a .csv file in ...\experts\files with a text editor.
Thanks for the good work.
hap
You're welcome!
hap, do you have any tools request?
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-22-2006, 06:13 PM
hapalkos hapalkos is offline
Junior Member
 
Join Date: Dec 2005
Posts: 14
hapalkos is on a distinguished road
scheduling utility

codersguru,

This is in response to your request for tools. Look it over and see if you think that it is reasonable and useful. You may have a ready alternative.

I am currently working on a project using EXCEL. By utilizing the MT4 DDE addressing (=MT4|BID!GBPUSD, etc.) for real time price values, I have created a dynamic display (real time display of price changes, percentages, probabilities, moving bars, highlighted targets, etc.). I also utilize data extracted to a .csv file by means of an MT4 script. The .csv data is read by EXCEL with Database Query. The time frame of interest for this worksheet is daily and the values that I extract from MT4 change very little during the course of a day. So I need to run the script once or twice a day. Currently I just drag and drop the script into any chart. The script is written so that it extracts current values and ArrayCopyRates data with set Symbols and Time Periods so that there is no need for the script to read any values in the chart. This updating procedure is simple and straight forward but I would like it to occur automatically on a scheduled basis. If this were possible then I would consider constructing the display for lower time frames.

I modified the script to run as an EA with a Sleep command. This works fine as long as the Expert Advisors is active and the EA is installed on a chart in the active profile. If I change to a different profile the updating stops. I would rather drag and drop than rely on an EA for this procedure.

I also modifed the script to run as an indicator but burdening the process thread with this type of demand seems unnecesary. Also if the indicator is not in an active profile, no update.

What I would like is a utility that could set a fixed schedule (once a day, once an hour, etc.) for the running of a script automatically without being dependent on an EA or active profile.

This project started with just the desire to automate some of the process of doing some very basic spreadsheet calculations. It has now grow into a dynamic indicator. One of the challenges has been the data transfer. Primarily how to best accomplish this with Excel. Any insight you have in working with Excel would be much appreciated.

hap
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-20-2006, 10:15 AM
sx ted sx ted is offline
Junior Member
 
Join Date: Nov 2005
Posts: 5
sx ted is on a distinguished road
Amazing Shell()

Real cool, thank u CodersGuru, keep up the good work, take care.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-24-2006, 11:36 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Quote:
Originally Posted by sx ted
Real cool, thank u CodersGuru, keep up the good work, take care.
sx ted,
You're welcome!
Hope it helps!
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 08-10-2006, 07:34 PM
TimeFreedom's Avatar
TimeFreedom TimeFreedom is offline
Senior Member
 
Join Date: Oct 2005
Posts: 481
TimeFreedom is on a distinguished road
Dde

CodersGuru,

Hopefully you can help me with the following task. I would like to capture live or import historical data using DDE. Do you know of the santax to import data from a certain bar. Let's say for example I want the OHLC for August 10, 2006: 14:30 bar, M1 chart?

Thanks in advance,

TimeFreedom

Quote:
Originally Posted by 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", "");

http://www.metatrader.info/node/89
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 10-30-2006, 03:32 PM
JosTheelen JosTheelen is offline
Member
 
Join Date: Aug 2006
Posts: 56
JosTheelen is on a distinguished road
Quote:
Originally Posted by codersguru
You're welcome!
hap, do you have any tools request?
Thanks. I am not hap, but could you add some function that checks if the extern program is still running.
So I can let MT4 save some file. Then I shell a function to read that file and do some weird calculations and save the results. If i can check that my calculations are finished, I can let MT4 read the results and work with them.

An example is BrainMaker.exe, a neural network that can be called in that way from MT4.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 10-30-2006, 03:38 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Question

Quote:
Originally Posted by JosTheelen
Thanks. I am not hap, but could you add some function that checks if the extern program is still running.
So I can let MT4 save some file. Then I shell a function to read that file and do some weird calculations and save the results. If i can check that my calculations are finished, I can let MT4 read the results and work with them.

An example is BrainMaker.exe, a neural network that can be called in that way from MT4.
Do you mean you want a tool (dll - function ) that tells you if a specific program is running or not?
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 10-30-2006, 03:41 PM
JosTheelen JosTheelen is offline
Member
 
Join Date: Aug 2006
Posts: 56
JosTheelen is on a distinguished road
Quote:
Originally Posted by codersguru
Do you mean you want a tool (dll - function ) that tells you if a specific program is running or not?
Yes, that's it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
there is any script/program to create walk forward test data for metatrader???? giraia_br Metatrader 4 1 03-26-2007 12:44 AM
Can I restart my pc while running EA fabrimf Setup Questions 3 11-17-2006 02:32 PM
Easy or Hard to do? creative Metatrader 4 11 03-03-2006 11:06 PM
How hard to convert to Easy Language (Tradestation) srbtop General Discussion 1 01-17-2006 02:53 PM


All times are GMT. The time now is 12:27 PM.