| New signals service! | |
|
|||||||
| 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 |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Quote:
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()? |
|
|||
|
run external application problem
Hi,
I found this script which make possible to run external application from mql4. There in no problem to run notepad but when I want to run my own application which is written in visual basic i can't. Can you help me? //+------------------------------------------------------------------+ //| ShellExecuteTest.mq4 | //| Copyright © 2006, MetaQuotes Software Corp. | //| Forex Trading Software: Forex Trading Platform MetaTrader 4 | //+------------------------------------------------------------------+ #property copyright "Copyright © 2006, MetaQuotes Software Corp." #property link "http://www.metaquotes.net" /* ShellExecute defined in MSDN as HINSTANCE ShellExecute(HWND hwnd, LPCTSTR lpVerb,LPCTSTR lpFile, LPCTSTR lpParameters, LPCTSTR lpDirectory,INT nShowCmd); Look Welcome to the MSDN Library for detailed information.*/ //---- let's define nShowCmd values #define SW_HIDE 0 #define SW_SHOWNORMAL 1 #define SW_NORMAL 1 #define SW_SHOWMINIMIZED 2 #define SW_SHOWMAXIMIZED 3 #define SW_MAXIMIZE 3 #define SW_SHOWNOACTIVATE 4 #define SW_SHOW 5 #define SW_MINIMIZE 6 #define SW_SHOWMINNOACTIVE 7 #define SW_SHOWNA 8 #define SW_RESTORE 9 #define SW_SHOWDEFAULT 10 #define SW_FORCEMINIMIZE 11 #define SW_MAX 11 //---- we need to define import of SHELL32 DLL #import "shell32.dll" //---- defining ShellExecute /* Normally we should define ShellExecute like this: int ShellExecuteA(int hWnd,string lpVerb,string lpFile,string lpParameters,string lpDirectory,int nCmdShow); But, we need to keep lpVerb,lpParameters and lpDirectory as NULL pointer to this function*/ //---- So we need to define it as (look: "string" parameters defined as "int" to keep them NULL): int ShellExecuteA(int hWnd,int lpVerb,string lpFile,int lpParameters,int lpDirectory,int nCmdShow); //---- we need to close import definition here #import //+------------------------------------------------------------------+ //| script program start function | //+------------------------------------------------------------------+ int start() { //---- let's do it! string open; ShellExecuteA(0,open,"notepad.exe",0,0,SW_SHOWNA); //---- return(0); } //+------------------------------------------------------------------+ |
|
||||
|
Quote:
thankz dan info masta... please check your PM masta... i have one request to develop 1 indicator.. thankz masta
__________________
Technical Trader ![]() please teach me how to trade like you ![]() [center] |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
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 |