Results 1 to 4 of 4
 0 Attachment(s)    

Thread: Function Call from MQL to Excel fields

  1. #1

    Default Function Call from MQL to Excel fields

    Funyoo and others:

    Do you know if we can (in MQL) code some way to call the data from an excel sheet (DDE is scraping this data every 5 minutes into the same cell in excel from another source program) back into MQL for a EA formula ?

    Any resources available on how to achieve this ? Would a library have to be built ?

    Thanks !

    D.

  2. #2
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by Dutchess View Post
    Funyoo and others:

    Do you know if we can (in MQL) code some way to call the data from an excel sheet (DDE is scraping this data every 5 minutes into the same cell in excel from another source program) back into MQL for a EA formula ?

    Any resources available on how to achieve this ? Would a library have to be built ?

    Thanks !

    D.
    Hi Dutchess,

    Yes, you can find an example here : Correlation strategy backtesting

  3. #3

    Default

    Thanks Funyoo, but what if the data in the filed being called is not even related to price ? Ie: it is just a random number in a cell like A34...........?

    Thanks !

    D

  4. #4
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by Dutchess View Post
    Thanks Funyoo, but what if the data in the filed being called is not even related to price ? Ie: it is just a random number in a cell like A34...........?

    Thanks !

    D
    Hi Dutchess,

    If you have only one line written, it would be something like that :

    Code:
    if(time0!=Time[0]){
       while(!FileIsEnding(handle)){
          A1=FileReadNumber(handle);
          A2=FileReadNumber(handle);
          A3=FileReadNumber(handle);
          A4=FileReadNumber(handle);
          A5=FileReadNumber(handle);
          ...
          A34=FileReadNumber(handle);
       }
       time0=Time[0];
    }
    You can find more informations here : FileReadNumber - MQL4 Documentation

Similar Threads

  1. What’s a Margin Call and Should I be Afraid of one?
    By painofhell in forum Trading discussion
    Replies: 5
    Last Post: 11-27-2014, 15:14
  2. Replies: 8
    Last Post: 04-12-2011, 18:28
  3. Function call problem
    By jeandl in forum MQL programming
    Replies: 3
    Last Post: 02-28-2009, 10:01

Tags for this Thread

backtesting, correlation, funyoo, how to, mql, programming, source, strategy, time

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •