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. The expert has the following variables:. 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.
However, this strategy must be used with great care. 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.
I will certainly add ECN support, 5 digit broker support and some good error handling if there is enough interest. 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!
Median always stays around 1. If it is so then in - EA "knows" that positions should be long. If not, then I do not know where EA in got value 1. 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?
Could you please explain what do you mean? You are very right. The EA knows the median price since the start of the backtesting period in 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 This is one of the dangers of grid trading, if you had to define a range in you would have probably wiped your account in 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.
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. 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: Each mode triggers different behavior of the Grid EA.
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. To add comments, please log in or register. Hello Everyone, I have seen lately that many people have become interested in commercial grid trading systems, such as robominer.
The expert has the following variables: I hope you like it and modify it to fit all of your needs Best Regards, Daniel. Thanks for sharing your EA. I'll try on next week 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. 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: Thank you very much, Rost. Hello Rost, You are very right. Thank you thank you Daniel for detailed explanations.More...