Forex



Go Back   Forex Trading > Downloads > Expert Advisors - 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
  #11 (permalink)  
Old 06-13-2007, 06:19 PM
Senior Member
 
Join Date: Mar 2006
Location: La Verne,CA
Posts: 560
MrPip is on a distinguished road
time setting

Time input should be chart time.

The error is caused by TakeProfit being less than 10. You can remove the check by deleting the lines at the beginning of the start function.

Robert
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
  #12 (permalink)  
Old 06-13-2007, 08:15 PM
Junior Member
 
Join Date: Jan 2007
Posts: 15
jack2 is on a distinguished road
I am sorry, I do not know which line to delete.

Even I set the profit target > 10, and when the time comes, the robot can't open any positions.

Anything wrong?
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
  #13 (permalink)  
Old 06-14-2007, 06:12 AM
Senior Member
 
Join Date: Mar 2006
Location: La Verne,CA
Posts: 560
MrPip is on a distinguished road
New version

Quote:
Originally Posted by jack2
I am sorry, I do not know which line to delete.

Even I set the profit target > 10, and when the time comes, the robot can't open any positions.

Anything wrong?
I commented out the lines that check for TakeProfit.

It does check for the exact time to the minute so if there is no tick for the minute entered it will not place the trade.

Time must be entered as an integer.

For example 13:30 would be entered as 1330.

If there is no tick until 1331 the trade will not be entered.
I would be useful to have a time range begin and end for the trade to be placed so I added that as well. The default is a two minute window for trade to be entered.

Robert
Attached Files
File Type: mq4 TimeBasedEA.mq4 (3.1 KB, 266 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
  #14 (permalink)  
Old 06-14-2007, 07:37 AM
Junior Member
 
Join Date: Jan 2007
Posts: 15
jack2 is on a distinguished road
Quote:
Originally Posted by MrPip
I commented out the lines that check for TakeProfit.

It does check for the exact time to the minute so if there is no tick for the minute entered it will not place the trade.

Time must be entered as an integer.

For example 13:30 would be entered as 1330.

If there is no tick until 1331 the trade will not be entered.
I would be useful to have a time range begin and end for the trade to be placed so I added that as well. The default is a two minute window for trade to be entered.

Robert
I downloaded the latest EA here and the time format is correct but there were no trades opened also.

MrPips, mind to look into it?
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
  #15 (permalink)  
Old 06-14-2007, 07:49 AM
proverbs's Avatar
Member
 
Join Date: Jan 2007
Posts: 73
proverbs is on a distinguished road
This one will do what I think your looking for.

Hope this helps.
GBP9AM.mq4
__________________
Proverbs [James]
Faith in Jesus helps me to see the invisible, believe the incredible and receive the impossible!
He makes all things new in my life.
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
  #16 (permalink)  
Old 06-14-2007, 08:05 AM
Junior Member
 
Join Date: Jan 2007
Posts: 15
jack2 is on a distinguished road
Quote:
Originally Posted by proverbs
This one will do what I think your looking for.

Hope this helps.
Attachment 35938
Thanks. It helps.

However, if I change the setting as follows (not using the default)

2007.06.14 15:30:35 GBP9AM EURUSD,M1 inputs: look_price_hour=7; look_price_min=31; close_hour=17; use_close_hour=true; take_profit=5; open_long=0; open_short=0; stop_long=0; stop_short=0; slippage=0; lots=0.1; magic=20051016;

None of the trades were opened. Why?

Last edited by jack2; 06-14-2007 at 08:32 AM.
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
  #17 (permalink)  
Old 06-14-2007, 08:45 AM
Junior Member
 
Join Date: Jan 2007
Posts: 15
jack2 is on a distinguished road
I noted that this EA could not open at current market price. It must be on Stop.

Then if one of the trade executed, the other side will be closed.

Can it be modified not to close and to maintain there?

I need to open 3 Buy positions and 3 Sell positions at the same time at market price.
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
  #18 (permalink)  
Old 06-14-2007, 10:16 AM
Senior Member
 
Join Date: Feb 2006
Posts: 1,211
et_phonehome_2 is on a distinguished road
If you want to open a trade at specific time, you either have to have the EA put in a market order or your pending order must be the a minimum number of PIPs away from the current price as dictated by your broker. You may want to look at one of those news EA.
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
  #19 (permalink)  
Old 06-14-2007, 10:19 AM
Junior Member
 
Join Date: Jan 2007
Posts: 15
jack2 is on a distinguished road
Quote:
Originally Posted by et_phonehome_2
If you want to open a trade at specific time, you either have to have the EA put in a market order or your pending order must be the a minimum number of PIPs away from the current price as dictated by your broker. You may want to look at one of those news EA.
If the order should base on the market price at the time specified and must be executed. Thus, there is no number of pips away from the price.

The minimum exit target as required by broker is 5.
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
  #20 (permalink)  
Old 07-03-2007, 03:52 PM
WNW's Avatar
WNW WNW is offline
Senior Member
 
Join Date: Feb 2006
Location: Motown, USA
Posts: 394
WNW is on a distinguished road
Can someone please create a version that will specify a long and short entry price ("1.1234", "1.4321") instead of a trigger?
I basically want to place 2 specific pending orders at a specific start time with an expiration, based on the "Daily 20 Pips" strategy.
Thanks for any help.
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

Tags
buy sell ea, correlation, currenttime(), grid ea, how to write an ea, how to write an EA for metatrader, how to write EA, how to write forex ea, orderclosetime(), straddle ea, time ea, timebasedea, wait time, WNV EA


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
Buy/sell EA excite2 Expert Advisors - Metatrader 4 84 08-17-2009 09:47 PM
Detecting price trend independent of a specific time frame gee Metatrader 4 4 02-24-2007 05:53 PM
Anyone want to write a simple EA? Kaper Suggestions for Trading Systems 6 10-29-2006 11:36 PM
Simple question of determining the time of day Fishtank Metatrader 4 2 04-04-2006 05:12 AM


All times are GMT. The time now is 08:42 AM.



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