I am software tweaker. I am struggling with Empty4 coding. Wish to export data from one Empty4 and receive in another Empty4 for processing.
Any Generic I/O indicator or EA is welcome.
Struggling with Empty4 Export and another Empty4 Import routine.
-
Fxrichie
- Trader
- Posts: 15
- Joined: Sun Dec 11, 2011 9:05 am
- gaheitman
- Trader
- Posts: 655
- Joined: Tue Nov 15, 2011 10:55 pm
- Location: Richmond, VA, US
Re: Struggling with Empty4 Export and another Empty4 Import routin
What kind of data are you trying to export and are you trying to act on it in real-time?Fxrichie wrote:I am software tweaker. I am struggling with Empty4 coding. Wish to export data from one Empty4 and receive in another Empty4 for processing.
Any Generic I/O indicator or EA is welcome.
-
Fxrichie
- Trader
- Posts: 15
- Joined: Sun Dec 11, 2011 9:05 am
Re: Struggling with Empty4 Export and another Empty4 Import routin
gaheitman wrote:What kind of data are you trying to export and are you trying to act on it in real-time?Fxrichie wrote:I am software tweaker. I am struggling with Empty4 coding. Wish to export data from one Empty4 and receive in another Empty4 for processing.
Any Generic I/O indicator or EA is welcome.
I wish to Export Results of Lawgirl-RSI MTF Multicurrency from one Empty4 and importing into my Brokers Empty4. My broker is not providing Index data. Recent Strength Indicator is CPU consuming.
Exporting data will be like
M1, M5, M15, M30, H1, H4,D1,Wy, MN
AUD UP UP UP UP DN DN DN UP DN
CAD
CHF
Real time data will be imported into another Empty4 and then we perform further calculation.
- gaheitman
- Trader
- Posts: 655
- Joined: Tue Nov 15, 2011 10:55 pm
- Location: Richmond, VA, US
Re: Struggling with Empty4 Export and another Empty4 Import routin
Here's a link to read up on what Empty4 has to offer out of the box: http://book.mql4.com/functions/filesFxrichie wrote:gaheitman wrote:What kind of data are you trying to export and are you trying to act on it in real-time?Fxrichie wrote:I am software tweaker. I am struggling with Empty4 coding. Wish to export data from one Empty4 and receive in another Empty4 for processing.
Any Generic I/O indicator or EA is welcome.
I wish to Export Results of Lawgirl-RSI MTF Multicurrency from one Empty4 and importing into my criminals Empty4. My criminal is not providing Index data. Recent Strength Indicator is CPU consuming.
Exporting data will be like
M1, M5, M15, M30, H1, H4,D1,Wy, MN
AUD UP UP UP UP DN DN DN UP DN
CAD
CHF
Real time data will be imported into another Empty4 and then we perform further calculation.
One tricky thing is that Empty4 will only let you write to files under your install\experts directory. You could either use windows api calls from within your code to get around this or use a utility to copy the file. There is a fine utility that is being used to copy files in this manner from the Hanover Recent Strength Indicator that you can read about and download here.
Finally, as a down and dirty example, the pricetrap indicator here writes to a csv on each refresh of the indicator. It shows how to see if a file already exists and update it if does (instead of overwriting).
George
-
Fxrichie
- Trader
- Posts: 15
- Joined: Sun Dec 11, 2011 9:05 am
Re: Struggling with Empty4 Export and another Empty4 Import routin
Gaheitman Thanks for your reply. It seems little tricky.
I think for Havoner's Recent Strength Indicator I have to buy new high spec PC.
Can we tweak Hanover Recent Strength Indicator to present data in following format.
etc
Index UP and DN are rate of change of index. Which is base on same TF but previous candle information.
If we can receive above information in Recent Strength Indicator, Then I will use it on my New PC.
I think for Havoner's Recent Strength Indicator I have to buy new high spec PC.
Can we tweak Hanover Recent Strength Indicator to present data in following format.
| ------ | M1, M5, M15, M30, H1, H4, D1, Wy, MN |
|---|---|
| AUD | UP UP UP UP DN DN DN UP DN |
| CAD | UP DN UP UP DN DN DN UP DN |
| CHF | DN DN UP UP DN DN DN UP DN |
Index UP and DN are rate of change of index. Which is base on same TF but previous candle information.
If we can receive above information in Recent Strength Indicator, Then I will use it on my New PC.
- gaheitman
- Trader
- Posts: 655
- Joined: Tue Nov 15, 2011 10:55 pm
- Location: Richmond, VA, US
Re: Struggling with Empty4 Export and another Empty4 Import routin
My intent with pointing you to the hanover thread was to show you the copy file routine. I don't think we'll be changing the hanover recent strength indicator. I think we're all pretty happy with it.Fxrichie wrote:Gaheitman Thanks for your reply. It seems little tricky.
I think for Havoner's Recent Strength Indicator I have to buy new high spec PC.
Can we tweak Hanover Recent Strength Indicator to present data in following format.
etc
------ M1, M5, M15, M30, H1, H4, D1, Wy, MN AUD UP UP UP UP DN DN DN UP DN CAD UP DN UP UP DN DN DN UP DN CHF DN DN UP UP DN DN DN UP DN
Index UP and DN are rate of change of index. Which is base on same TF but previous candle information.
If we can receive above information in Recent Strength Indicator, Then I will use it on my New PC.
Can you upload your original indicator so I can take a look at what it's currently doing?
-
Fxrichie
- Trader
- Posts: 15
- Joined: Sun Dec 11, 2011 9:05 am
Re: Struggling with Empty4 Export and another Empty4 Import routin
gaheitman wrote:My intent with pointing you to the hanover thread was to show you the copy file routine. I don't think we'll be changing the hanover recent strength indicator. I think we're all pretty happy with it.Fxrichie wrote:Gaheitman Thanks for your reply. It seems little tricky.
I think for Havoner's Recent Strength Indicator I have to buy new high spec PC.
Can we tweak Hanover Recent Strength Indicator to present data in following format.
etc
------ M1, M5, M15, M30, H1, H4, D1, Wy, MN AUD UP UP UP UP DN DN DN UP DN CAD UP DN UP UP DN DN DN UP DN CHF DN DN UP UP DN DN DN UP DN
Index UP and DN are rate of change of index. Which is base on same TF but previous candle information.
If we can receive above information in Recent Strength Indicator, Then I will use it on my New PC.![]()
Can you upload your original indicator so I can take a look at what it's currently doing?
Sorry for delay, my EA coding is from one of a recently Closed forum. (restriction on distribution.)
I am attaching my File writing Routine( I modified David's coding).
***********************************************************************
int Write_in_File()
{ int i, j;
string fname = "Index_Values" + ".csv"; // Same folder for each TF (...\experts\files)
int handle = FileOpen(fname, FILE_CSV|FILE_WRITE, ","); // "," means that output data will be separated by commas; change if necessary
if(handle>0)
{
FileWrite(handle,"Date,Time,Pair", TradePeriod, TradePeriod[i+1], TradePeriod[i+2], TradePeriod[i+3], TradePeriod[i+4]); // This writes the Header record to the file (change or remove to suit)
string date1 = TimeToStr(iTime("EURUSD",0,i),TIME_DATE);
date1 = StringSubstr(date1,5,2) + "-" + StringSubstr(date1,8,2) + "-" + StringSubstr(date1,0,4);
string time1 = TimeToStr(iTime("EURUSD",0,i),TIME_MINUTES);
for(i=0; i< NoOfPairs; i++)
{
FileWrite(handle, date1, time1, TradePair, TradeTrendSymbol[0], TradeTrendSymbol[+1], TradeTrendSymbol[+2], TradeTrendSymbol[+3], TradeTrendSymbol[+4] );
}
}
FileClose(handle);
Comment("Output complete"); // Display a comment in the upper left corner of the chart to advise that process is complete
return(0);
}
*************************************************************************
Watch and copy is good for copy.
==============================================================
==============================================================
I did File Write and Read Logic, Please check following very helpful link.
http://forum.mql4.com/24258
Thanks Gaheitman for your guidance.
-
magft
- Trader
- Posts: 195
- Joined: Tue Nov 15, 2011 9:59 pm
- Location: East Midlands, UK
Re: Struggling with Empty4 Export and another Empty4 Import routin
If you want to do copying using a EA have a look at the attached, i wrote it the same time as the executable was being wrote.
I can write across network as well if the file paths are correct.
Hope this helps
Mike
I can write across network as well if the file paths are correct.
Hope this helps
Mike
You do not have the required permissions to view the files attached to this post.