Can MetaTrader Read Txt Files using the include statement and import variables from the text file?

 

I've got external programs that collect market data for me. I then have them put out to a simple txt file. Is it possible to have the EA check the text file to update variables that it is using to calculate each time it runs, or do I had to deal with DLLs, etc?


If I could simply import variables from a text file at each tick (during the start() function), it would make this whole thing incredibly easy.


Thanks

 

use the file I/O functions for reading files at runtime.

#include is a preprocessor directive and only executed once at compile time.

 

Can you give me an example?


I'm not sure what the I/O function is. I understand what you are saying about the #include statement only running on start up though.

 
Calpurnia:

Can you give me an example?


I'm not sure what the I/O function is. I understand what you are saying about the #include statement only running on start up though.

have you ever heard the term BIOS ?

it means Basic Input Output System

the Term I/O refers to the same: Input/Output

file reading, file writing ...

 

Can you give me an example of how I would pull a variable value from the .txt file into the EA to use in its calculations?

 
Calpurnia:

Can you give me an example of how I would pull a variable value from the .txt file into the EA to use in its calculations?





if i would know the structure of the file, i guess i could.

but i dont code for others without payment, sorry.

 

I'm just asking how to call a variable from the .txt file and pull it into the EA.


I've found FileOpen & FileReadDouble functions but can't seem to get them to work.

 

Sorry, I am Programing since 1980, and all i know i have learned by myself.

programming is more than asking in a forum for an answer.

if you are not willing or not able to do such things at your own, you are simply no programmer.

i like to help beginners of MQL4 in some case, but i dont teach how to programm.

there are a lot of websites out there, which help you to become a programmer.

i havent this option in 1980. feel lucky, you have an easier way to learn programming than me.

 

So you respond in a forum for people LOOKING FOR ADVICE ON HOW TO PROGRAM, by giving them the equivalent of "I am the greatest programmer in the world, peons such as you must never ask for advice from great programming overlords such as myself. Despite being god's greatest gift to the computer, I am a martyr to the programming class, as i originally learned to program by climbing mount everest and assembling my first computer from scratch with vaccum tubes and my erector set"...


ps...yo engrix sux


::rolleyes::


Any non-self-righteous programmers want to help out a beginner overcome something he's never done before? Not all of us are programming god's like meikel, and need to ask for advice every once in a while. So....is there a way to isolate/assign a variable in a .txt file, and then have an EA look at that file, and pull in specific variables from the .txt file to use in the EA's calculations?

 

i have never said, that i am the god of programming.

but let me say know, that you are the opposite of this.

dont worry, you are not alone here....

bye

 

I'm the devil of programming?


pss...yo engrish still suxs

Reason: