Hello,
I wish to program a MC custom indicator using the Encog3 DLL (Encog3 is a neural net platform). Since Encog3 will ONLY accept CSV input data files, I need a module or indicator to convert a MC array to a CSV file in real time.
Varying Encog3 DLL source code or going through an outside Excel CSV conversion in real time would be most difficult. I have thought about using php script to write the array to CSV conversion in the MC indicator.
Any direction or help would be much appreciated.
Thanks,
Rick
Conversion of MC Array to CSV file
-
- Posts: 60
- Joined: 28 Dec 2007
- Has thanked: 9 times
- Been thanked: 1 time
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Re: Conversion of MC Array to CSV file
There is a "FileAppend" function in EasyLanguage that you could use here.
It takes the following form:
FileAppend("PathFilename","StringExpression")
Where: PathFilename - a string expression specifying the path and filename
StringExpression - the string expression to be appended to a file
Example
FileAppend("C:\test.txt","Appended Text");
In the case of the array, you'd have to build your string expression so that it looks something like:
Note that this function appends the data, so you're going to want to make sure it's empty before you run it for the first time. You can use the FileDelete(filename) command to make sure this happens, but note that each time you run the indicator or system, you're going to be overwriting your data file (so you'd want to make a copy of any good data before you try running it again).
Does that help, or do you need more information?
It takes the following form:
FileAppend("PathFilename","StringExpression")
Where: PathFilename - a string expression specifying the path and filename
StringExpression - the string expression to be appended to a file
Example
FileAppend("C:\test.txt","Appended Text");
In the case of the array, you'd have to build your string expression so that it looks something like:
Code: Select all
string = array(1) + "," + array(2) + "," + array(3) ... ;
FileAppend(filename, string);
Does that help, or do you need more information?