|
|||
|
|||||||
| Notices |
| 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 |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|||
|
Well, I haven't tested it. But if it works..that is AWESOME!!
I checked out the demo .mq4 file, and it is so simple and elegant. Good work. The only issue I have is what to do about new lines. How do I use gFile to write a new line? Last edited by fivewhy; 11-21-2005 at 01:58 PM. |
|
||||
|
Quote:
Thank you very much for your comment. ![]() I think the new line printing issue needs some work from me, Thanks for the notice. |
|
||||
|
well done
, but file functions (as well as many other) may be used directly from windows API dlls.example of file copy function import: #import "Kernel32.dll" bool CopyFileA (string source_file, string destination_file, bool if_exist); with DLLs you can do a lot of things, like SQL database access and so on. |
|
||||
|
Quote:
That's right , but could you give me .mql demo shows me how to use the kernel32 functions CreateFile, OpenFile,WriteFile and ReadFile in MQL4Code:
HANDLE CreateFile( LPCTSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile ); HFILE OpenFile( LPCSTR lpFileName, LPOFSTRUCT lpReOpenBuff, UINT uStyle ); BOOL WriteFile( HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite, LPDWORD lpNumberOfBytesWritten, LPOVERLAPPED lpOverlapped ); BOOL ReadFile( HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped ); |
|
||||
|
gFiles.mqh
Quote:
I'm sorry, I meant "gFiles.mqh" ![]() To run FilesDemo: 1- Extract the "mtguru1.dll" to "MetaTrader 4\experts\libraries" path. 2- Extract "FilesDemo.mq4" to "MetaTrader 4\experts\indicators" path and compile it. 3- Extract "gFiles.mqh" to "MetaTrader 4\experts\include". 4- Load FilesDemo from your Indicators - don't forget to enbable "Allow DLL Import" |
![]() |
| Bookmarks |
| Tags |
| awesome, metatrader kernel32.dll, MT4 FILES, mtguru1.dll, mtguru1.zip |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| File Functions | intelligent_14 | Questions | 6 | 07-11-2006 08:37 PM |
| Unusual Functions | intelligent_14 | Questions | 3 | 06-23-2006 11:20 PM |
| Appendix 2 - Trading functions | codersguru | Lessons | 8 | 12-26-2005 01:46 PM |
| Lesson 7 - Functions | codersguru | Lessons | 2 | 11-02-2005 03:32 PM |