Forex
Google
New signals service!

Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-13-2006, 08:19 PM
Junior Member
 
Join Date: Dec 2005
Posts: 22
Kent is on a distinguished road
Qstn on EA fundamentals TIA for your reply/answers.

Is there any FAQ for EA/Strategy tester?

Please provide the link if any.

I am trying to write/test an EA where the logic will be tested at close of each 4 hour bar.

Is there any facility like this on EA?

Does EA checks for each tick only?

Or it can be modified to check some parameters only after a close of 4 hour bar. For example I am trying to buy/sell based on a EMA cross of 5/21 but I want to do that only at the closing of a 4 hour bar and not for the every tick as being done in EA/Indicator.

Thanks in advance for your time/replies.

Kent
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-15-2006, 02:47 AM
Member
 
Join Date: Sep 2006
Posts: 68
ra300z is on a distinguished road
In order to trade on the beginning of an open bar only, add the following code:

static datetime timeprev; // at top of program


if(timeprev==Time[0]) { //at beginnign of start()
return(0); //only execute on new bar
} else if (timeprev==0) {
timeprev=Time[0]; //prevents execution when loading EA onto chart
} else {
timeprev=Time[0];
H4Processing();
SendMail();
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-15-2006, 03:04 AM
Member
 
Join Date: Sep 2006
Posts: 68
ra300z is on a distinguished road
One more thing. A moving average cross will not work by itself. Even on an h4 graph.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

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 On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fundamentals superman Analytics 8 10-25-2006 04:14 PM
MT4 problem..need answers... hosam Metatrader 4 1 02-03-2006 02:11 AM


All times are GMT. The time now is 11:19 PM.



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