- Most Forex traders lose all their money.
- Using the robot posted here in trading Forex does not guarantee success.
- Trading this robot could lead to serious financial loss.
- Trading this robot without understanding its underlying trading strategy guarantees traders will lose their money.
Welcome to Going Home - a multi-pair auto-trader for Dreamliner's strategy, coded by Steve Hopwood.
I cannot take much credit for the code. smjones and roundrock have supplied most of it in their indicators and EA's. All I have done is adapt the code to create a single robot capable of trading all the pairs listed in Scott's indi code. All our thanks are due to these highly talented individuals.
Pride of place goes to Dreamliner, whose remarkable mind came up with the trading strategy in the first place. To learn about it, you need to go to DL's thread at http://www.forexfactory.com/showthread.php?t=160912. Read post 1 thoroughly, then skip to page 100 as instructed. The thread is the single best one I have read at FF. The strategy is simple; the instructions clear and concise. Learn to use Scott's indi and trade the system manually before using this robot. Do not bother reading all of this thread; make sure you understand the trading strategy and take on board everything in this post and you can happily cut to the end of this thread.
Ok, to the robot. Do not use this on a live account yet. I have only just coded it and testing has only just begun. There could still be bugs in the undergrowth; the strategy itself is experimental.
One further word of caution: read the post at http://www.forexfactory.com/showpost...postcount=1826
Once debugged, GH will trade my understanding of the strategy. Bearing in mind that I may be misunderstanding elements of it:
- only trade pairs with a positive correlation of > 75
- sends a sell trade when the difference between the Stochastic values is > 80, selling the pair with the highest Stoch.
- closes the trade when Stoch difference falls back to < 50
- if SendHedgeTrade is 'true', buys the correlating pair and closes this trade when the sell is closed
Each trade in a hedged pair will have the same unique magic number.
Close, Stop and Start labels
Drag the robot onto any chart - you only need one instance of the robot running, so any chart will do. I have left out my usual screen feedback so that we can load it onto a chart that already hosts Scott's latest indi (those of you who can, change all the values of yy=0 and yy = 0 to either 1 or 2 to create some space for GH to show the computer's local time).
Once loaded onto the chart, GH goes into an endless loop that checks for trade open/close conditions once a second. To temporarily stop GH, double-click the 'Stop the robot' label and move it somewhere else; it will continue to monitor open trades for closure. To re-start GH, repeat the process with the Start label.
Use the 'Close all trades' label with care. I have included this so that we have the facility to rapidly close all open trades if we feel the need to. It is designed to work immediately, and so has no 'idiot' checks or demands for confirmation.
I have included an input that allows you to place the labels at any level on the chart you want, in case they are clashing with Scott's display label - ButtonY. This defaults to quite low down the screen, so play with the setting to suit yourselves.
Inputs
Most of the inputs are familiar to those of us using DL's strategy and Scott's indi. The remaining inputs are:
- EmergencyTakeProfit & EmergencyStopLoss: these are purely for those occasions when GH becomes disconnected from the internet. Something will close a trade sooner or later if GH is unable to. Enter these values in 'proper' pips, not 'piplets'; GH adapts these inputs to x digit criminals.
- SeedMagicNumber: each trade needs an individual magic number because an individual pair can be involved with correlation calculations with a number of of different pairs. GH increments the seed magic number each time it iterates through the pairs loops, so each trade will acquire a unique magic number that the bot can use to recognise the trades it 'owns'. If this bot turns out to have legs, then I will add Beastie-style Stealth Technology to hide our activities from the crims.
- CriminalIsECN: set this to 'true' (the default) if your crim will not allow you to send stops with your trade, and you have to add them subsequently. Note that IBFX are ECN, even though they do not mention this anywhere that I have seen.
- MaxTradesAllowed: this is the maximum number of trades you will allow to be open on your account, regardless of their source. Once this level is reached, GH will send no more trades.
- MaxSpreadAllowed: this filter is intended to prevent GH sending trades during spikes caused by major news releases, when the crims characteristically increase their spreads dramatically. When the spread exceeds your input, GH will abort a potential trade. The default reflects my crim being a 5 digit crim. If yours is 4 digits, then reduce this by a factor of 10.
- SendHedgeTrade: tells GH to buy the second pair in the correlation.
- TrendTradeOnly: tells GH to send the buy trade only if that pair's trend is up, and the sell trade only if that pair's trend is down. To work, both this and SendPairTrade need to be enabled. Read http://www.forexfactory.com/showpost...&postcount=100 to see why I included this input. To determine the trend, I use my favourite trend filter, offered by scoobs many moons ago; it has become a great standby:
- RSI(20) D1 time frame
- Rsi > 55: trend is up
- Rsi < 45: trend is down
- in between these values, the market is ranging
- AllowClosureInLoss:if set to 'false' this will prevent GH from closing individual trades at a loss, or paired trades if you are using the hedging options. Be warned: this could lead to huge dd and really bad trades will eventually hit their emergency stop loss; ouch.
- ShowUserFeedback: turn this off if you want to show Scott's indi on screen at the same time as running GH.
- AllowDuplicateTrades: the same pair often occurs in a number of different correlation diffs that trigger trades, causing duplicate trades to expose us to a much higher risk on the duplicate pairs than we would take if only sending a single trade. Leaving this at the default of 'false' will prevent this. Triples and quads will not be sent.
- Hedged pairs:
- SendPairTrade: tells GV to buy the pair with the lowest Stoch.
- UseScottHedgeFilter: tells GV to send the second pair only if it is a hedge for the first trade - read http://www.forexfactory.com/showpost...&postcount=129 for the rationale behind this filter. smjones provided the code, hence the name of the input.
- To expand on this:
- SendPairTrade turns hedging on.
- If enabled, UseScottHedgeFilter will only send the hedge trade if it is part of a triple, e.g. eurusd, gbpusd
- If enabled, UseScottHedgeFilter will not allow sending the hedge if it is part of a quad e.g. eurusd, gbpjpy
- Trade exit strategies: you can set any combination of these
- CloseAtCloseTradeStoch: the original trade closure strategy
- CloseAtCombinedPipsProfit: gives you a pips target
- CloseAtCombinedCashProfit: gives you a cash target
- Trading hours: go on. Be brave. Take a guess.
Check the default inputs. They tend to represent whatever I am testing at the time of coding extra functions and can change radically from the previous update.
Changing inputs whilst GH is running
You cannot do this because of the way that GV works. The only way to change inputs is to re-drag GV onto the chart and make the changes you want.
Mixing different EA's on the same account
This is a huge no-no. Just don't do it, ok? Only trade 1 EA per account. Even then, remember my oft-repeated mantra:
- An EA is only 90% as good as the strategy it trades, at best. At best, remember.
- If the strategy is rubbish, so is the EA.
- If you do not understand the underlying trading strategy, you cannot trade with the EA. You will panic when trades appear to be going horribly wrong even though they are well within the trade plan, and close them prematurely – usually just before the market reverses in your favour.
GH's local time display
You do not need this and we all have clocks. The function of this display is to show that the robot is still up and running. MT4 is crap and will crash an EA at the drop of a hat without telling us. If GH's time display is not updating, then it has stopped running and needs re-dragging onto the chart.
Backtesting in Strategy Tester
Multi-pair EA's cannot be backtested in Strategy Tester.
And finally
This is an auto-trader for a developing manual strategy. Please:
- discuss the manual trading in Dreamliner's thread, unless the subject of discussion impacts on Going Home.
- refrain from discussing GH in Dreamliner's thread. Few things drive manual traders nuts more quickly than having their thread hijacked by robot enthusiasts.
Let's see if this puppy has a tail to wag.
http://cdn.forexfactory.com/images/s...m/big_grin.gif
___________________________________ ____________________________
Traders familiar with my work need read no further.
A little note to newbie traders
My approach to some contributors may leave you a little confused. It will appear to you that some contributors can say whatever they want, whilst others will get blasted to perdition. It will look as though there is some sort of 'club' here. There is. I have been on quite a journey since discovering that any old so-and-so can trade Forex - including me. At around the same time I joined FF, so did a number of others. As I learned to code mql4, so others started to help and contribute to my learning process. We are old friends now, and understand each other so yes, we are a club and the club members can indeed say whatever they want. They have earned the right to do so. It does not take much to join the club; be useful, intelligent and positive and you too can join.
Posting restrictions
I have restricted the ability to post in this thread to: traders with at least 1 voucher; and traders on my 'buddy' list. I have done this because I do not want the thread cluttered with 'newbie' questions about the basics. New/inexperienced traders, this is not intended as a direct insult. What I want here is discussion with traders who fully understand what it is they are doing; when you newbs have been around a while, you will come to understand what a difference experience makes to the posts a member writes and shudder at the recollection of some of the questions you asked. I do. http://cdn.forexfactory.com/images/s..._the_floor.gif Go to your profile page; there is a link to the FF page that describes the voucher process.
Do not attempt to get around this by sending me pm's asking for help with your basic problems. Doing so will earn you an automatic ban from all of my threads.
I have set up a partner thread to this one and Nanningbob's at http://www.forexfactory.com/showthre...66#post3948666
There, you can post the questions that you cannot post here, about anything you need to know. Someone with the knowledge and experience you need will answer - just not necessarily me.
Traders/coders with experience who have not yet been vouched for, can get around this restriction be being added to my 'buddy' list; all you have to do is pm me to ask me to do this.