Metatrader to Excel and back
Results 1 to 10 of 10

Thread: Metatrader to Excel and back

  1. #1
    It's easy actually.

    1. Put MetatraderToExcel.mqh on your include folder
    2. Put test dll.mq4 on your experts folder
    3. Put the dll contained in the zip file on your own libraries folder (the libraries folder under your MQL4 directory).
    4. Review the test dll.mq4 file.

    There are 3 put functions and 3 get works. Each with 3 overloads. The overloads are on how you need to address each cell.

    The 2 inputs that are used is:

    1. Where's the excel file you are going to be writing to
    2. Where do you wish to compose any errors the DLL generates to

    Some notes:

    1. You will need the full version of the .Net framework 4.6 installed (https://www.microsoft.com/en-us/down....aspx?id=48137)
    2. When you operate the Start function, it will open a new instance of Excel and a new instance of your file when it isn't already open.

    Source code for the DLL can be found here: https://github.com/Nondisclosure/MT4toExcel

    Have fun!
    https://www.forexforum.co.za/trading...nal-245-a.html
    https://www.forexforum.co.za/attachm...8288727088.mq4
    https://www.forexforum.co.za/attachm...0732829035.zip

  2. #2
    Quote Originally Posted by ;
    Hi: Thank you for posting these tools. Very helpful thus far. Got them installed and functioning on Windows 10. The EA writes the information to the excel file just fine provided that the datafile remains untouched. When I mention the cells which are receiving the put values from another tab at the worksheet, the upgrades ceased with the following listed to the log file: Error on PutDouble_Cell: System.Runtime.InteropServices.COMException (0x800AC472): Exception from HRESULT: 0x800AC472 in System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName,...
    Let me answer the questions first
    1. This occurs since, technically, when the DLL is calling excel, it is utilizing the UI thread of excel (except when opening the workbook; there is just 1 thread for excel you'll have when opening the work book). Once I created this, I didn't construct a dll to be used. I had been'in a hurry'. So I left the multi threaded facet out along with error checking.
    2. No. I left it out due time constraints.

    If you're interested in the source code, then have a look at it here: https://github.com/Nondisclosure/MT4toExcel

  3. #3
    Thank you for answering my query and also for the response. I thought it might be something like this but I am not a coder and would not know. I managed to generate a few modifications to the code from the test document so that it loops through each one the MT4 symbols and pulls down the emblem, bid, ask, and spread and write it into the document. I separated the document from the rest of my analysis so it could run/update without throwing the error. When it opens, it always does it read-only mode without any data is actually written to the document (it is all stored in the temp file), until it is manually saved. When it is saved, then it can be queried by me from a different workbook without causing it to throw the error and stop upgrading. I've worked around it for the time being.

    I did have a look at the code on github simply to see if I could understand what is going on in your dll. It was easy to follow. A couple minor modifications could make it useful. . .as you mentioned, the multithreading, conserving it automatically from the temp file into the written document so that the values having it not open duplicate copies of this document if it is already opened, and are accessible/referenceable. I would love being able to do them myself but I am not a developer and would not know where to start.

    I am happy it is functioning at all and that I can pull those values directly into glow from my broker. Thank you for posting it.

  4. #4
    Quote Originally Posted by ;
    Thank you for the timely response and also for answering my question. I thought it may be something like this but I'm not a coder and would not know. I managed to generate a few modifications to the code in the test file so that it loops through all of the MT4 symbols and pulls down the emblem, bid, ask, and spread and write it to the excel file. I separated the file in the rest of my analysis so it can run/update without throwing the error. If it opens, it always does it in read-only mode without any data is actually written to the file (it's...
    I've been really busy recently. But I'll attempt to get to work on it.

  5. #5
    1 Attachment(s) Hi,
    I have been looking for a way to export the information in my chart, and the indicator values to excel for information analysis to construct an EA. A buddy sent me to this connection, and I am using Mt4

    1. Place MetatraderToExcel.mqh on your include folder [ I don't find an Include folder] see attachment
    2. Put test dll.mq4 on your experts folder
    3. Put the dll contained in the zip file on your own libraries folder (the libraries folder under your MQL4 directory). [ I don't find an Include folder] see attachment
    4. Review the evaluation dll.mq4 file.


    PLEASE ADVISE
    https://www.forexforum.co.za/general...appointed.html

  6. #6
    Quote Originally Posted by ;
    Hi, I have been looking for a way to export the information on my chart, and the indicator values to excel for information analysis to construct an EA. A friend sent me to this connection, and I am utilizing Mt4 1. Put MetatraderToExcel.mqh on your include folder [ I don't see an Include folder] see attachment two. Put test dll.mq4 on your specialists folder 3. Put the dll within the zip file on your own libraries folder (the libraries folder beneath your MQL4 directory). [ I don't see an Include folder] see attachment 4. Review the test dll.mq4 file. PLEASE ADVISE file
    within your MQL4 folder.

  7. #7
    MetareaderToExcel Folder just has

    MetatraderToExcel.dll

    is this right

  8. #8
    Interesting work. Thanks and
    Regards

  9. #9
    Quote Originally Posted by ;
    Interesting work. Thank you and Regards
    Thanks.

  10. #10
    Quote Originally Posted by ;
    Interesting function. Thank you and Regards
    Read the instructions again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.