| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Struggling with Empty4 Export and another Empty4 Import routine. https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=150 |
Page 1 of 1 |
| Author: | Fxrichie [ Sun Dec 11, 2011 10:33 am ] |
| Post subject: | Struggling with Empty4 Export and another Empty4 Import routine. |
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. |
|
| Author: | gaheitman [ Sun Dec 11, 2011 11:02 am ] |
| Post subject: | 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? |
|
| Author: | Fxrichie [ Sun Dec 11, 2011 1:01 pm ] |
| Post subject: | Re: Struggling with Empty4 Export and another Empty4 Import routin |
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. |
|
| Author: | gaheitman [ Sun Dec 11, 2011 8:55 pm ] |
| Post subject: | 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/files 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 |
|
| Author: | Fxrichie [ Mon Dec 12, 2011 1:47 pm ] | ||||||||
| Post subject: | 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.
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. |
|||||||||
| Author: | gaheitman [ Wed Dec 14, 2011 8:06 am ] | ||||||||
| Post subject: | 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. Can you upload your original indicator so I can take a look at what it's currently doing? |
|||||||||
| Author: | Fxrichie [ Tue Jan 24, 2012 12:07 pm ] | ||||||||
| Post subject: | Re: Struggling with Empty4 Export and another Empty4 Import routin | ||||||||
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. |
|||||||||
| Author: | magft [ Tue Jan 24, 2012 4:58 pm ] |
| Post subject: | 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 |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|