Forex



Go Back   Forex Trading > Downloads > Indicators - Metatrader 4
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 03-03-2007, 03:15 PM
emjay's Avatar
Junior Member
 
Join Date: Jul 2006
Posts: 8
emjay is on a distinguished road
Read file for start/stop time? DLL interface or csv/txt?

We're all familiar with the option to start or stop our EA's based on a time frame.

ie:

Code:
extern string StartTradeTime = "07:00";
extern string StopTradeTime = "22:00";
I've read several items in TSD and ForexFisherman relating to open/close files and calling dll's for read and writing to txt and csv's

I've also seen a link that shows how to read from a file and display indicators that show text along lines: http://articles.mql4.com/143

1st question:
How could I modify to have "closing" lines for those indicator lines, such as
a shaded section of time that marks from the "start" to x amount of time after that point (variable 30,60,90 minutes)


What I'm really looking for is a way to read a line from a file like the lines below:

Code:
date;newStopTime;newStartTime;ReasonCode;CountryOfOrigin
15.05.2006;8:55;9:30; Industrial Production M.M ;Japan;
15.05.2006;16:30;16:45; New York Fed Survey ;USA;
15.05.2006;17:00;17:15; Netto Capital Flow ;USA;
16.05.2006;12:30;12:45; HICP Y.Y ;U.K.;
16.05.2006;13:00;13:15; ZEW Economic Sentiment;Germany;
16.05.2006;16:00;16:15; Wal-Mart Stores Report;USA;
16.05.2006;16:30;16:45; PPI M.M ;USA;

And in reading these lines, updating the :
extern string StartTradeTime = "07:00";
extern string StopTradeTime = "22:00";
or possibly just temporarily stopping the automated trading of the EA during the read times.

I understand I have some time zone issues to address, but can always edit the data file with the necessary timezone data as well. I just want to read the file in such a way that it can be aware of when to stop trading while allowing autotrade to be temporaily turned off, then back on unattended.


Any suggestions?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 03-03-2007, 03:35 PM
Senior Member
 
Join Date: Feb 2006
Posts: 1,211
et_phonehome_2 is on a distinguished road
Use the parmonworktime code, it shades teh screen for specific session. You can us ethe code for what you want to do.

====

Here the indicator, it should give you an idea how to mark the charts for a specific time frame.
Attached Files
File Type: mq4 i-ParamonWorkTime.mq4 (5.2 KB, 28 views)

Last edited by et_phonehome_2; 03-04-2007 at 03:23 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 03-04-2007, 04:06 PM
emjay's Avatar
Junior Member
 
Join Date: Jul 2006
Posts: 8
emjay is on a distinguished road
That's great ET!

This will let me be aware of timeframes that I do want to be more wary of trading on the fundamentals.

Only problem is that this is hardcoded time frames as far as I can tell. (Too much Russian for me to fully understand it yet, give me time)

Ideally, I want to read timeframes from a file and pause/disable the auto-trading EA during those times. My EA currently does sufficiently well unattended autotrading when it stays away from those timeframes, but there are hundreds throughout the year and I may add/modify/delete from the data file as I feel some reports have less effect on my EA then expected. It's tough to stay in front of the screen non-stop.

Last edited by emjay; 03-04-2007 at 04:41 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #4 (permalink)  
Old 03-04-2007, 04:57 PM
Senior Member
 
Join Date: Feb 2006
Posts: 1,211
et_phonehome_2 is on a distinguished road
I have some others, will try to locate it, but its tough since I do not recall the name of it. Try this one, it may help...
Attached Files
File Type: mq4 AsianFrankfurtLondonSessions_GMT.mq4 (3.8 KB, 33 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #5 (permalink)  
Old 03-04-2007, 05:10 PM
emjay's Avatar
Junior Member
 
Join Date: Jul 2006
Posts: 8
emjay is on a distinguished road
Quote:
Originally Posted by et_phonehome_2
I have some others, will try to locate it, but its tough since I do not recall the name of it. Try this one, it may help...

Thanks again, ET!

The latest is a modified version of the first, also very useful. Most useful, I think, for those who trade manually since it can alert them to possible fluctuations to look out for.

My main issue is I rarely trade manual and need to read from the file so that I can pull a "Ronco" (That's "Set-it-and-forget-it")

Currently I only check on my EA about 2 times a day, and most of my losses come from those time frames which I am trying to avoid.

I appreciate you looking into these possibilities. Too bad there isn't some sort of naming convention standards that more people adhere too when creating these.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #6 (permalink)  
Old 03-04-2007, 05:29 PM
Senior Member
 
Join Date: Feb 2006
Posts: 1,211
et_phonehome_2 is on a distinguished road
As far as I know, there is no way an EA can call another EA, but you may be able to do it with iCustom. This news file that you are reading, is it the same one as posted in the FF forum?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #7 (permalink)  
Old 03-04-2007, 11:50 PM
emjay's Avatar
Junior Member
 
Join Date: Jul 2006
Posts: 8
emjay is on a distinguished road
Quote:
Originally Posted by et_phonehome_2
As far as I know, there is no way an EA can call another EA, but you may be able to do it with iCustom. This news file that you are reading, is it the same one as posted in the FF forum?

This isn't trying to call on another EA, just trying to read a line item from a file. The previous link http://articles.mql4.com/143 actually reads from a file and displays an indicator for that. I can use that info and combine it with your "shading" iCustom's to get a great effect. I only need 1 EA and I can incorporate almost everything I need in that except for this potentially variable/edited data. I could hardcode the timeframes but that would be less useful to someone else wanting to re-use the coding to pull from an external file.

Essentially though here's the need:

1) Start my EA.
Normal code would be:
Code:
extern string StartTradeTime = "07:00";
extern string StopTradeTime = "22:00";
2) EA reads current time
Time is:
Code:
> StartTradeTime 
< StopTradeTime
3) EA reads external file for next STOP/START time.
File reads:
Code:
15.05.2006;8:55;9:30; Industrial Production M.M ;Japan;
string StopTradeTime = "08:55";
string StartTradeTime = "09:30";
4) Because these are not daily occurences, but one-time occurrences for each week, or month, or quarter, or year, I need only create the data file to have them listed in order by date/time for the code to read each line consecutively (Next START/STOP time after current time
5) Once the new "StartTradeTime triggers again, it will read the next line in the data file:
Code:
string StopTradeTime = "11:25";
string StartTradeTime = "11:55";
I honestly don't care if I visually see the indicator of this or not. I just want the EA autotrading to take a break in those timeframes.

Again, ET, I really appreciate your looking into this. I hope your posted indicators have been helpful to other forum members as well.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can an EA save to and read from a preset file? ZTrader Questions 7 09-13-2009 02:59 AM
MT4 start of new 60-minute bar time jimbil Metatrader 4 1 05-29-2007 12:51 PM
Offsetting Time hour in .hst file? raytracy Metatrader 4 1 02-19-2007 10:26 PM


All times are GMT. The time now is 05:35 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.