SERIOUS WARNING
- 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 strategies guarantees traders will lose their money.
- This is not a set-and-forget ea; there is no such thing and anyone who tries to claim there is, is either stupid or lying. This ea requires frequent manual intervention.
- At best, a trading robot is only 90% as good as the manual strategy it trades. At best. At worst, it can be much less effective. If the strategy is rubbish, so is the robot.
- To trade this robot, you have to understand:
- How to use EA's.
- The concept of basket trading.
Bob in his 10.7 thread, taught us that once a W1 trade direction is established, the market tends to continue in that direction for most of the week. This led to my developing Once a Week, then Once a Day, then Once a Something - find them all in the Automated trading systems sub-forum.
I was musing on this early one morning after the deafening dawn chorus did its thingy at about 5.00 am. I wondered if this might also apply to the Weekly, so I sat at my screen to have a look.
Before reading on, try this guys.
- go to one of your demo platforms and load up a spare chart.
- change to the monthly time frame and look at the candles.
- here is what you will see:
- most candles are full bodied.
- many have a small wick in the direction the candle moved, indicating that the market reached a high or low before the end of the month, then retraced.
- even those with a wick at both ends usually have a large body and a much longer wick at the end that reflects the up or down movement of the candle, indicating a strong movement in that direction followed by a retrace before the end of the candle.
- 'spinning tops' etc tend to have very small bodies, indicating large movements in both directions, each followed by a retrace.
Now find a 'spinning top' and repeat this process. Amazing how often the first week is a surge in the direction of the smaller wick followed by a retrace, then a bigger surge in the opposite direction followed by a retrace back towards the MN1 open price.
Do the above first for a few minutes. It will whet your appetite.
...........................................................................................
Welcome back.
Posts 2 and 3 contain an indi and an analysis ea that you might care to play with. Read the posts and see.
Moving on, Once a Month attempts to take advantage of the movement on the MN1 chart once it is established. It will look at the market during your chosen order opening period, and buy if the market is > MN1 open, or sell if below. OAM is a multi-pair trader, so you only need to load it onto one chart and it matters not a jot which chart or time frame you use. The attached template allows you to quickly set up a chart that has no candles to get in the way of the information display.
The inputs
- PairsToTrade is a comma-separated list of the pairs you wish to trade.
- Average simulated profit calculation. This is the average profit that would be made by trading in the direction that the MN1 candle traveled and closing at the furthest extent of the move. This is a hypothetical figure and it remains to be seen how useful this is.
- AverageTpMonths: the number of months over which to calculate the average.
- DayOfMonthStart: the trading day of the month to start measuring the average. See 'Day inputs calculation' below.
- TakeProfitMultiplierPercent: OAM multiplies the average profit by this percentage to create an individual TP for each trade. A zero value stops OAM from sending a take profit.
- Trading time inputs:
- SendTradesDay: this is the trading day the OAM will use to decide when to open our trades. See 'Day inputs calculation' below. The default of 10 is roughly half way through the month, so the market direction is usually established by then. It remains to be seen how accurate this is, so play with the simulator in post 3 to decide the value of your input.
- SendTradesHour: come our trading day, AOM will wait for SendTradeHour to arrive and then start sending the trades. This input value in your broker time, so use the time of day displays at the to of the chart to calculate the broker time that equates to the hour of day you wish to start trading. OAM will continue to attempt to send new trades for as long as it takes to send them - hours if necessary. It detects a trade closed at take profit and will not send another.
- CloseTradesDay and CloseTradesHour: go on, take a guess.
- Trade stacking inputs. Ignore this. I cannot make the code work and have removed it. These implement an idea by Spiderx; instead of entering the whole trade immediately, enter bit by bit as the market moves in our favour. The exposure is limited to the initial lot size when the market immediately moves against the trade - as it often does. OAM sends one market trade at a smaller lot size than that of a full trade, and then pending orders to make up the full trade if conditions work out for us.
- MaxStackTrades: the number of pendings to be sent. A zero value turns off stacking.
- DistancePerStackPips: the number of pips between each pending trade.
- LotPerStack: the trade size for the pendings.
- Bob's 240 H4 moving average trend filter. We have been trading OAM for 3 months at the time of making this edit and have learned the futility of fighting the overall trend. Read about how Bob's filter detects the market's overall trend in any of the umpteen Shell User Guides littered all over this forum, or in Bob's 10.x threads. The filter is enabled by default. Disable it by setting MaPeriod to zero.
- Swap filter: look at the AUD, NZD and CAD swap display on the chart. Selling these currencies attracts terrifying swap costs that will mount quickly if a trade runs for a couple of weeks.
- Odds and ends:
- DisplayGapSize is the chart display offset from the left margin so that a trade notification does not interfere with the information.
- ShowPairInfo; set this to false to stop OAM showing the individual pair data.
There are three inputs that refer to days (DayOfMonthStart, SendTradesDay, CloseTradesDay) and it is crucial that you get your head around how to calculate them.
They have nothing to do with dates. They are concerned with the number of trading days in the month. OAM counts the first day of the month as day 1, regardless of the day of the week this is. It ignores Saturday or Sunday candles and counts only the D1 candles that open Monday to Friday.
Take SendTradesDay as an example, with the default of 10. Suppose the first of the month falls on Thursday. Ten trading days would take us to the 14th of the month, and OAM will send the trades then. This avoids the situation where we forget that any actual date the bot had to work with comes during the weekend.
The chart display
There are two inputs at the bottom of the inputs window that allow you to control the information displayed on the chart:
- ShowPairInfo:
- Each pair shows information to help you decide whether to trade individual pairs:
- the current Bid. Remove the pair if this is zero because it means your broker does not offer it for trading.
- MA is Bob's moving average value, followed by the trend direction this indicates.
- the pair's spread so you can decide whether this allows sensible trading of the pair.
- 'Av prof' is the average profit calculated by OAM at the start of each month.
- Long and Short swap. Just look at those high swap pairs negative swaps. Ouch.
- The pair's movement up or down relative to the MN1 open, and by how many pips.
- Each pair shows information to help you decide whether to trade individual pairs:
- ShowTradesInfo:
- This display shows details of open trades:
- Ticket number.
- Pair.
- 'Current' is the current direction of the MN1 chart and the size of the movement as in, "Up/down x pips".
- MN1 open price.
- The trade's open price.
- The direction of the MN1 candle at the time the trade was sent, and the size of the movement.
- The order type in brackets.
- Whether the trades is 'winning' or 'losing' and by how many pips.
- The trades display information is intended to help us answer some key questions:
- do we need a minimum pips movement before allowing a trade?
- do we need a maximum pips movement and refuse the trade if the market has already moved by more than this extent?
- should we be trading on a set day and from a set time, or should we be allowing OAM to enter a trade as soon as the market has moved x pips in one direction?
- what do we do about losing trades? Hedge them? Close them and open in the opposite direction? If so, when?
- can we evolve a system of adding to winners? If so, do we trade without a take profit and simply close the entire basket towards the end of the month?
- This display shows details of open trades:
Each trade will be sent with its own take profit; OAM takes no further part in money management, so use these for more detailed trade management:
- my MPTM (Multi-Purpose Trade Manager) available at http://www.stevehopwoodforex.com/phpBB3 ... ?f=21&t=64 to add trailing/jumping stops etc to individual trades.
- Paul's MPBM (Multi-Purpose Basket Manager) at http://www.stevehopwoodforex.com/phpBB3 ... he%20post. for managing the position as a self-contained basket.
The attached iHistory indi is the indi I use to keep track of my progress and generate the pictures I post here. Copy it in your platform's Indicators folder. Open a chart you do not trade, add the Blank template to it and drag iHistory onto the chart. It works with the information you have in your History tab. Sometimes it needs reloading before showing any information, especially at the weekends.
Conclusion
We will have to see what extra features will be helpful. For now, use the analysis ea in post 3 to see which combination of order opening days and take profit figures would have worked best over the last year or so, and make these your inputs.
Thingies for us to consider:
- dealing with losing trades.
- adding to winning trades.
- do we need OAS-style minimum and maximum market movement at order sending time?
Matters of general interest
Go here to download and run the script that will fill your platform's missing chart history: http://www.stevehopwoodforex.com/phpBB3 ... f=15&t=254
Read this post:
http://www.stevehopwoodforex.com/phpBB3 ... p?f=6&t=78 Newbie traders, read this for inspiration and warning. Those of you who have suffered losses, read it for inspiration.
Masterly summary of hedging: http://www.forexfactory.com/showthread. ... ost4977179
EA coding
I receive may requests to code EA's. Traders, if I code your EA for free, then I will share it here. If you want me to code your EA without sharing, then my fee is $100 payable into my paypal account. I explain why at http://www.stevehopwoodforex.com/phpBB3 ... ?f=15&t=79, at the bottom of the post.
Useful utilities/EA's/scripts
- MaryJane has posted a fabulous utility to allow us to resize EA input windows: http://www.stevehopwoodforex.com/phpBB3 ... f=5&t=3427
- Multi purpose trade manager: http://www.stevehopwoodforex.com/phpBB3 ... ?f=21&t=64
- Account equity analyser: http://www.forexfactory.com/showthread. ... ost4709098, which includes a template for both USD and the Euro.
- Past-trades display indi by squalou; shows a graphical display of the success/failure of trades in your History tab. Breathtaking piece of work. http://www.forexfactory.com/showthread. ... ost3830610
- My shell EA – the code I use to produce EA's so quickly. http://www.stevehopwoodforex.com/phpBB3 ... ?f=15&t=79