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 10-24-2009, 06:34 PM
Member
 
Join Date: Sep 2007
Posts: 35
danielfppps is on a distinguished road
Free Grid Trading, The New Grid EA

Hello Everyone,

I have seen lately that many people have become interested in commercial grid trading systems, such as robominer. Since we seem to lack a general alternative free grid trading EA I decided to program a very short and efficient code that could be used to grid trade any range on any currency pair.The version right now works on four digit brokers only. Of course, this can also be used for long term ranges such as the EUR/CHF and the AUD/NZD. The expert has the following variables :

Lots = 0.1 ; Lot size Traded (advice is to use 0.01 for each 1000 USD traded)
max_trades = 10 ; maximum number of trades
grid_lines = 30 ; Number of lines on the grid
RangeMid = 1.5465 ; Median price of the grid (example for EUR/CHF)
grid_separation = 0.0100 ; Separation between grid lines (in currency points)
TP = 50 ; Take profit

The EA will open a trade on each grid line towards the median price but will only open one trade per grid line until a trade on a separate grid line is opened. That is, if grid line x is touched a trade is opened, if it is touched again, no trade is opened, however, if grid line x+1 is touched and then grid line x is touched again another trade is opened.

... etc, until the number equals grid_lines
+3*gridseparation (open short)
+2*gridseparation (open short)
+1*gridseparation (open short)
median price
-1*gridseparation (open long)
-2*gridseparation (open long)
-3*gridseparation (open long)
... etc, until the number equals grid_lines

This strategy gives good results in wide ranges on several currency pairs like the EUR/CHF or the AUD/NZD. However, this strategy must be used with great care. I attach an image of the 10 year backtest on the EUR/CHF as well as a picture of the trades made. Remember that this EA is NOT meant to be traded in a "set and forget way" but it is more meant to be used as a trading tool to help a trader gather profit from a range. The parameters can be modified to trade any range on any currency pair. The EA is not subject to one minute interpolation errors (due to the 50 pip TP) so backtesting should be reliable.


I hope you like it and modify it to fit all of your needs

Best Regards,

Daniel
Attached Images
File Type: gif newgrid_1999_100move.gif (6.2 KB, 14 views)
File Type: gif newgrid.gif (23.8 KB, 36 views)
Attached Files
File Type: mq4 newgrid.mq4 (2.1 KB, 395 views)
__________________
Visit my reviews at http://fxreviews.blogspot.com
Thanks !

Last edited by danielfppps; 10-25-2009 at 01:39 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
  #2 (permalink)  
Old 10-25-2009, 12:13 AM
dlinggar's Avatar
Junior Member
 
Join Date: Dec 2008
Posts: 1
dlinggar is on a distinguished road
Thanks for sharing your EA.

I'll try on next week.....
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 10-25-2009, 10:37 AM
Member
 
Join Date: Jul 2006
Posts: 53
typhoon_gr9 is on a distinguished road
Looks Good,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
  #4 (permalink)  
Old 10-25-2009, 04:32 PM
Junior Member
 
Join Date: Jul 2008
Posts: 6
galfordgg is on a distinguished road
great EA ,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 10-26-2009, 11:49 PM
Member
 
Join Date: Sep 2007
Posts: 35
danielfppps is on a distinguished road
Thank you !

I am glad you have liked it

I will certainly add ECN support, 5 digit broker support and some good error handling if there is enough interest. Certainly this EA should not be used by novice traders, range trading with grid systems can be very risky because of the absence of a SL, the safest would be to trade the EUR/CHF and AUD/NZD long term ranges, as robominer does, although this is still something that should be done with great care.

Again, I provide this as a tool for traders who want to exploit ranges. The EA's terribly simple code is lightning efficient, very easy to backtest and optimize !
__________________
Visit my reviews at http://fxreviews.blogspot.com
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
  #6 (permalink)  
Old 10-28-2009, 12:15 AM
Junior Member
 
Join Date: Apr 2007
Posts: 2
Rost is on a distinguished road
grid EA

Hi Daniel.

Thank you for this post and grid EA.
Our team are currently working on our own grid based EA.

I have checked RoboMiner (they give it for free to test) and I have 2 questions in this regards:
1. Median always stays around 1.5465 ? If it is so then in 2002 - 2003 EA "knows" that positions should be long. If not, then I do not know where EA in 2002 got value 1.5465 or so.
2. Some positions are opened and stay for 1 or even 2 years long. What would be a swap for this period of time? Does EA deal with this somehow?

Daniel, you mentioned about adding ECN support for EA. Could you please explain what do you mean?

Thank you very much,
Rost
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 10-28-2009, 02:10 AM
Member
 
Join Date: Sep 2007
Posts: 35
danielfppps is on a distinguished road
Hello Rost,

You are very right. The EA knows the median price since the start of the backtesting period in 2000 and therefore the EA is designed with the benefit of hindsight. It is the same for the robominer system, the EA has the median price preprogrammed so it "knew" it had to trade long or short before the range actually established itself in late 2007. This is one of the dangers of grid trading, if you had to define a range in 2002 you would have probably wiped your account in 2006-08 due to the range extension. Therefore, the backtesting results actually depend on the fact that we are using a range we know is effective "in advance". The system will work as long as this range is kept, however, if it is not, an account wipeout is imminent. Risk can be diminished by only trading when price is near the ends of the grid, that would mean only trading 1 or 2 out of every 10 years.

Of course, if positions are open during 1 or 2 years with negative swap this will strongly affect the profits with some positions even closing with loses in the long term. I would advice to only trade this on swap free accounts in which such long holding of positions won't matter. The EA (my EA) does not deal with swap in any way, again, trading with a swap free, also called "muslim friendly account" would be best (these are offered by several brokers). Robominer does claim to deal with swap but my ten year backtests still show significant loses from swap accumulation which suggests that the code to deal with this is inefficient.

However I must stress that my EA can be used for general range trading, not only in long term ranges on the EUR/CHF and AUD/NZD but on sporadic smaller ranges that may develop on other currency pairs.

Regarding ECN support, you must remember that ECN brokers do not accept the submission of the takeprofit with the actual order but orders need to be modified after being placed to include the TP. ECN support can be effectively incorporated by order modifications after placement or by using an internal mechanism that handles the TP. The first is the safest choice. I will however only do this if there is enough interest for this trading tool.

Again, I do NOT support grid trading as a "set and forget" trading methodology. Grid trading seriously exposes people's equity and must be done with great care in order to avoid excessive draw downs with possible account wipeouts. Such risks are taken with every grid system, including the robominer and other commercial experts.

I hope this answers all your questions. Feel free to ask any more questions or post any additional comments/suggestions,

Best Regards,

Daniel
__________________
Visit my reviews at http://fxreviews.blogspot.com
Thanks !

Last edited by danielfppps; 10-28-2009 at 03:11 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 10-28-2009, 05:06 PM
Junior Member
 
Join Date: Apr 2007
Posts: 2
Rost is on a distinguished road
Thank you

thank you Daniel for detailed explanations.
Grid trading is very interesting approach, it should be very "smart" to profit heavily on trending moves and not to lose much on sideway market.
I am thinking to find most appropriate method to define different state of the market: trend, flat and pull back in time of trend. Each mode triggers different behavior of the Grid EA.

Rost

Last edited by Rost; 10-28-2009 at 05:20 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
  #9 (permalink)  
Old 10-28-2009, 07:49 PM
Member
 
Join Date: Sep 2007
Posts: 35
danielfppps is on a distinguished road
What you want to do is very hard. It is extremely difficult to use different trading techniques depending on market conditions. Most of the time the wisest approach to long term profits is to build a trend following system that stops loses quickly and lets profits run. Like most successful traders have advised for a few decades.

However, the approach you want to do with grid trading plus other techniques has been implemented in a few commercial experts, the most popular being pointbreak and the dreambuilder FX which use grid trading, pyramiding and averaging to tackle different faces of the market. Its approach is somewhat successful although draw downs are still pretty significant.

I hope you have good luck with your approach, you are free to use my newgrid code as you see fit.
__________________
Visit my reviews at http://fxreviews.blogspot.com
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
  #10 (permalink)  
Old 10-29-2009, 03:43 PM
Junior Member
 
Join Date: Nov 2005
Posts: 27
waleed9091 is on a distinguished road
we appreciate your goodwillness...thanks for expert.
i trade forex for 7 yrs....grid trading is very useful IF it used with technical analysis...and risk mgmt.
so...keep good work....good luck.
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
expert advisor, GRID TRADING


Currently Active Users Viewing This Thread: 2 (1 members and 1 guests)
piet411
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
grid trading teldon Post and compare Trades 11 04-10-2009 10:24 AM
Grid with values spiritbreezer Indicators - Metatrader 4 3 08-15-2007 07:20 PM
Grid Trading! 400396 General Discussion 1 05-20-2007 09:48 AM
Grid Ea GRIDMAKER Expert Advisors - Metatrader 4 7 04-15-2007 09:33 PM
Grid Trading EA qwer1234 Suggestions for Trading Systems 3 05-09-2006 05:24 PM


All times are GMT. The time now is 12:12 AM.



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