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
  #1 (permalink)  
Old 11-07-2007, 09:50 PM
Senior Member
 
Join Date: Feb 2007
Posts: 176
lcfxtrader is on a distinguished road
EA request for trading 4 majors

Hello,

Can a programmer please write the following EA:

Open trade at XX:XX GMT
Close trade at XX:XX GMT
Take profit
Stop Loss
Trade direction (long or short)
MM (switch to turn off & on)
Fixed lot size

The idea is from another thread here on this forum. It opens trades at 00:00 GMT all the same direction for the GBP/USD, EUR/USD, USD/CHF, & USD/JPY with fixed take profit and stop loss (60 & 40 respectively). The position will be closed at 23:59 if still opened regardless of profit or loss. Thank you and please let me know if you have questions. Attached is trading since 10/18/07.
Attached Files
File Type: htm DetailedStatement.htm (28.7 KB, 92 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
  #2 (permalink)  
Old 11-08-2007, 06:16 AM
Junior Member
 
Join Date: Sep 2007
Posts: 28
yohanip is on a distinguished road
trying to code

Hi there,

been trying to code your requirement, but you didn't mention on the MoneyManagement things..how should the EA performs money management..

i've attached the EA bellow, please feel free to ask for any improvement it should have..

here are the input :
  • OpenPosHour=0;
    This is the time in HOUR you want to open for a positition
  • OpenPosMinute=0;
    This is the time in MINUTES you want to open for a position
    so combining the OpenPosHour and OpenPosMinute should resemble HH:MM
  • ClosePosHour=23;
  • ClosePosMinute=59;
  • TP=60;
  • SL=40;
  • TradeDir=1; //1 =Buy, 0=Sell, 2=Both direction
  • LotSize=0.1;

****updates 9-Nov-07
  • MM=5
    This is where you would like to set your risk acceptance (in percent), the default is 5 means : you are willing to put 5% of your equity for one trade
  • CarryWeekend=false;
    This where you specify should the EA close all trades when the market ends for the week
regards,
Attached Files
File Type: mq4 icfxtrader-4major-1.1.mq4 (5.7 KB, 63 views)

Last edited by yohanip; 11-09-2007 at 01:43 PM. Reason: updating the EA to ver 1.1
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 11-08-2007, 03:16 PM
Senior Member
 
Join Date: Feb 2007
Posts: 176
lcfxtrader is on a distinguished road
Thank you very much for programming the EA. I will load this evening and report back any problems. As far as MM, we could set X% (ex: 5%) of the account to risk and have a switch to turn it off and on. If turned on, it would override the fixed lots.

Update statement:
Attached Files
File Type: htm DetailedStatement.htm (36.4 KB, 49 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
  #4 (permalink)  
Old 11-08-2007, 03:46 PM
Senior Member
 
Join Date: Feb 2007
Posts: 176
lcfxtrader is on a distinguished road
Could you please also add a feature to close all open orders for Friday before the market closes so we don't carry any trades into the weekend. Thank you.
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 11-08-2007, 04:25 PM
matrixebiz's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,218
matrixebiz is on a distinguished road
Quote:
Originally Posted by lcfxtrader View Post
Could you please also add a feature to close all open orders for Friday before the market closes so we don't carry any trades into the weekend. Thank you.
Could you not just manually change the close Hours in the EA on Friday so they close just before market close? How long have you been using this system? Does it matter if you select Buy for the day or Sell? So open and close hours are GMT, correct? So for me IBFX use GMT hours so I wont need any GMT shift in the EA, correct? but others might need a GMT shift for their broker if their broker time is different than GMT. Can that be added to the EA as well?

EDIT: also what about selecting TradeDir=2, does that mean the EA decide what direction to trade in?
extern int TradeDir=1; //1 =Buy, 0=Sell, 2=Both direction

and if all trades close from hitting take profit or stoploss, do we open more trades. or only open ONE trade per currency per day?

Last edited by matrixebiz; 11-08-2007 at 04:33 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
  #6 (permalink)  
Old 11-08-2007, 08:52 PM
Senior Member
 
Join Date: Feb 2007
Posts: 176
lcfxtrader is on a distinguished road
Could you not just manually change the close Hours in the EA on Friday so they close just before market close? Yes, but I prefer a "hands off" approach if possible.

How long have you been using this system? Started on 10/18/07 (see statement).

Does it matter if you select Buy for the day or Sell? I prefer going long for all pairs, but it's not written in stone. It would be up to the trader to decide.

So open and close hours are GMT, correct? Correct, I try to open all positions at 00:00GMT (start of a new daily candle). This is one reason I requested the EA for consistancy day in and day out.

So for me IBFX use GMT hours so I wont need any GMT shift in the EA, correct? but others might need a GMT shift for their broker if their broker time is different than GMT. Can that be added to the EA as well? Answer would come from the programmer.

EDIT: also what about selecting TradeDir=2, does that mean the EA decide what direction to trade in?
extern int TradeDir=1; //1 =Buy, 0=Sell, 2=Both direction
Answer would come from the programmer.

and if all trades close from hitting take profit or stoploss, do we open more trades. or only open ONE trade per currency per day? One trade per day.
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 11-09-2007, 04:23 AM
wolfe's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 818
wolfe is on a distinguished road
Interesting approach. How long has this method been forward tested?
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
  #8 (permalink)  
Old 11-09-2007, 01:04 PM
matrixebiz's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,218
matrixebiz is on a distinguished road
So you wouldn't start on Sunday open, correct? You'd wait until Monday 0:00GMT

Maybe we could have a feature in the EA that can check the close candle of the previous day so if going up then place Long trade and if going down place Short trade.
Thanks
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
  #9 (permalink)  
Old 11-09-2007, 01:37 PM
Junior Member
 
Join Date: Sep 2007
Posts: 28
yohanip is on a distinguished road
EA upgrades

Quote:
Originally Posted by lcfxtrader View Post
Thank you very much for programming the EA. I will load this evening and report back any problems. As far as MM, we could set X% (ex: 5%) of the account to risk and have a switch to turn it off and on. If turned on, it would override the fixed lots.

Update statement:
Awright
Thank you for sharing such a simple yet powerfull method,
i've attached the EA at the #2 post, edited the post to see the history of the creation

Please feel free if you need to ask / adjust anything again..
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
  #10 (permalink)  
Old 11-09-2007, 02:07 PM
matrixebiz's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,218
matrixebiz is on a distinguished road
Quote:
Originally Posted by yohanip View Post
Awright
Thank you for sharing such a simple yet powerfull method,
i've attached the EA at the #2 post, edited the post to see the history of the creation

Please feel free if you need to ask / adjust anything again..
Thank you for the update, but what time in GMT is you EA set to close all trades on Friday? IBFX closes at 19:56 GMT. Do all brokers close for the weekend at this time? I think StrategyBuilder FX closes at different times ??

What does select option 2 mean?;
TradeDir=1; //1 =Buy, 0=Sell, 2=Both direction

Can your EA be programed for what I mentioned in my previous post? Might help it determine if it should select Long or Short for the day.

EDIT2: IBFX closes just before 20GMT so should I change;
Code:
if(TimeHour(TimeCurrent())==20)//asuming that every server time will be at end when the time reaches 20:00
to
Code:
if(TimeHour(TimeCurrent())==19:50) //asuming that every server time will be at end when the time reaches 20:00
also, can you make MM optional True/False. Thanks

Last edited by matrixebiz; 11-09-2007 at 02:25 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
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
EA request Alex.Piech.FinGeR Suggestions for Trading Systems 34 08-27-2007 06:30 PM
EA with MM request? 4xtrend Expert Advisors - Metatrader 4 2 07-14-2007 09:19 AM
New EA request FX-Hedger Expert Advisors - Metatrader 4 35 06-20-2006 05:44 AM


All times are GMT. The time now is 11:41 AM.



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