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-10-2007, 09:34 PM
arsenic786's Avatar
Senior Member
 
Join Date: Mar 2007
Posts: 156
arsenic786 is on a distinguished road
Thumbs up Can anyone code this simple EA?

Hello All Traders and MQL coders,

I have no knowledge of MQL programming, so if anyone can code this simple EA then I will be really very very thankful to him and this will be counted as very kind Help! What I actually need is:

1) Note the price of GBP/USD at 7am (GMT 0)
2) And put two orders at the same time, one long and one short. Long should be open when price goes 40 points up when it was noted at 7am. And put a short order when price comes 40 points down from the price of 7am.
3) Triggered order should be closed with +5 only. I mean if price goes up then it should be open after 40 points up and then close after just +5 points. And same for short position.

I know my english is bad, so lets understand this with an example:

If at 7am GMT, the price of pair is 1.2050 then put two orders: long from 1.2090 with target 1.2095 and stoploss to 1.2070. And short order from 1.2010 with target 1.2005 with stoploss 1.2030.

I think the things is much clear now! And I think this is really very easy for pros. so please give me few of your valued minutes and just code this EA for me. I dont care how this will work for backtest, I just need it to make something clear

Thanks so much in advance for all who code this or read and reply

Sorry again for my bad English if you bother by it.

Best Regards.
Arsenic.
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-10-2007, 11:55 PM
ralph.ronnquist's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 297
ralph.ronnquist is on a distinguished road
The attached EA might do what you expect (?).
Drop it on GBPUSD,H1

Parameters:

* SAMPLE_HOUR is the hour at which to sample the price (bid price)
* EXPIRES is the number of hours past SAMPLE_HOUR to expire
* OP is the pips offset off sample price required to trigger trade
* TP is the takeprofit pips offset off open price
* SL is the stoploss pips offset off open price
* lots is the trade size
Attached Files
File Type: mq4 Arsenic.mq4 (3.6 KB, 63 views)

Last edited by ralph.ronnquist; 11-14-2007 at 12:32 PM. Reason: Bug fix
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-11-2007, 01:02 AM
matrixebiz's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,218
matrixebiz is on a distinguished road
Quote:
Originally Posted by ralph.ronnquist View Post
The attached EA might do what you expect (?).
Drop it on GBPUSD,H1
Can you add in the SL target also as mentioned above. So, I guess if my broker is GMT-2 then I just need to put -2 in the TimeZone field, correct?

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
  #4 (permalink)  
Old 11-11-2007, 02:00 AM
ElectricSavant's Avatar
Senior Member
 
Join Date: Jun 2007
Posts: 3,354
ElectricSavant is on a distinguished road
soooo..this is a 5 pip possible profit to a 20 pip stop...so does this mean that it must win 4 out of 5 trades? just to breakeven...?

Maybe if traded on 4 pair it would work out....

This is scary, but I am not forced to test it I know..

ES
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-11-2007, 02:11 AM
Senior Member
 
Join Date: Oct 2007
Posts: 103
codybear is on a distinguished road
LOL If you please post yolur results

Quote:
Originally Posted by ElectricSavant View Post
soooo..this is a 5 pip possible profit to a 20 pip stop...so does this mean that it must win 4 out of 5 trades? just to breakeven...?

Maybe if traded on 4 pair it would work out....

This is scary, but I am not forced to test it I know..

ES
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-11-2007, 02:33 AM
ralph.ronnquist's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 297
ralph.ronnquist is on a distinguished road
I added a "hidden stoploss" function to it; updated the previous attachment.

And, yes, you set the timezone of your broker: the offset off GMT.

Last edited by ralph.ronnquist; 11-11-2007 at 02:36 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
  #7 (permalink)  
Old 11-11-2007, 03:49 AM
matrixebiz's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,218
matrixebiz is on a distinguished road
Ok, thanks

So I'm to assume that at 07:00 GMT a currency moves at least 40 pips, it will move 45 and 'arsenic786' has tested this theory for months.

EDIT: @ralph.ronnquist - can you make the settings a little more user friendly so we can change TP, the pip values that the Buy/Sell Limit trades are made, SL, etc. Thank you

Last edited by matrixebiz; 11-11-2007 at 03:56 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
  #8 (permalink)  
Old 11-11-2007, 04:15 AM
ElectricSavant's Avatar
Senior Member
 
Join Date: Jun 2007
Posts: 3,354
ElectricSavant is on a distinguished road
I was thinking maybe these three pair...not four :

GBP/USD
AUD/CAD
NZD/JPY



ES

Quote:
Originally Posted by codybear View Post
LOL If you please post yolur results

Last edited by ElectricSavant; 11-11-2007 at 04:21 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
  #9 (permalink)  
Old 11-11-2007, 04:24 AM
ElectricSavant's Avatar
Senior Member
 
Join Date: Jun 2007
Posts: 3,354
ElectricSavant is on a distinguished road
late edit...I have that bad habit...

The reason I want to test those three pair at the same time is that they represent different currencies. Usually if I can get those to work...It can be fairly consistent.

..but everything can go terribly bad with IBFX and their "smoothing-of-the-feed" habits...we need breakouts to work and to work often with this sort of SL.

These three pair have similar or higher ATR's...

Also ralph.ronnquist has wisely hidden the SL...

ES

Last edited by ElectricSavant; 11-11-2007 at 04:26 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
  #10 (permalink)  
Old 11-11-2007, 04:29 AM
ElectricSavant's Avatar
Senior Member
 
Join Date: Jun 2007
Posts: 3,354
ElectricSavant is on a distinguished road
do these orders cancel after one is hit for one trade a day?

ES
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)
 

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
How to code? samahdi MetaTrader 2177 Yesterday 11:13 PM
SIMPLE-MACD-EA : An extremely simple EA based on 2 channels of MACD. Try it! investor_me Expert Advisors - Metatrader 4 37 08-29-2009 03:57 PM
Can someone please code this simple EA. takechance Suggestions for Trading Systems 8 02-23-2007 04:30 AM
Let's code this simple indicator....need programmer canados Indicators - Metatrader 4 3 02-19-2007 03:53 PM
Simple indicator needed, can some1 plz code it? kevmcfoster Indicators - Metatrader 4 3 01-14-2007 10:29 PM


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



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