stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Once a week basket trading EA
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3587
Page 1 of 4
Author:  SteveHopwood [ Fri Apr 25, 2014 9:16 pm ]
Post subject:  Once a week basket trading EA

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.
THIS IS AN EXPERIMENTAL EA NOT YET BEING USED ON OUR LIVE ACCOUNTS

Bob pointed out in his 10.7 thread that weekly candles tend to have full bodies - not always but a strong tendency. Look at a few W1 charts and you will see this.

This suggests that once the weekly trading direction is established, there is every likelihood it is going to continue in that direction. This gave me the idea for this EA. Here is how it works:
  • you choose a day and hour by which you think the weekly trading direction will be established.
  • you choose a basket of pairs to trade.
  • during the trading day and hour, you send a trade for each pair in the direction established by the W1 movement so far.
  • you choose a day and hour at which to close the basket of trades.
That is all that OAW does. There are no management features at all - not even stop loss and take profit inputs. You can opt for individual trade management or more advanced basket trading management by using: We will find features to add to the bot if it looks as though it has some legs. To be honest, it sounds like one of those proposals that members sometimes send to me for coding into an EA, and I reply, "Well, if trading were that simple, then we would all have made gazillions of dollars by now. It isn't, so we haven't."

On the other hand, I had not noticed the W1 candle body thingy before Bob pointed it out. We shall see.

The inputs:
  • PairsToTrade: this is the list of comma-separated pairs you want to include in your basket. Linked to this and much further down is ShowPairInfo. If ShowPairInfo is set to true, OAW will display a list of your pairs and their Bid on the chart. The purpose of this is to allow you to check that all the pairs are available via your broker. The pair is not available to you if the Bid shows up as zero. Once you have deleted unwanted pairs, set ShowPairInfo to false to cut down on processor use. Forget about pair suffixes - anything I code automatically takes care of these.
  • anyone who needs Lot, MagicNumber or TradeComment explaining needs to spend time with a therapist.
  • DayToOpenTrades. In CrapQlx, days of the week are numbered 0 (Sunday) to 6 (Saturday). This input allows you to specify the day to send the trades. 1 = Monday; 2 = Tuesday.
  • HourToOpenTrades is the input that tells you at which time of your trading day to send the trades. This input works on your own local computer clock time, so it you want trades sending at 10.00 am then enter 10. Forget about broker time etc.
  • DayToCloseTrades and HourToCloseTrades tell OAW when to close the basket.
So, on my machine, using default inputs in my own local time:
  • at 8.00 AM on Tuesday morning, OAW sends trades in the direction already established by the current W1 direction. W1 has risen, it buys the pair. W1 has fallen, it sells the pair.
  • at 4.00 PM on Friday afternoon, OAW closes all open trades owned by the bot.
Questions about telling the time are banned. Work it out for yourselves. Old stagers know to take me seriously when I say this. Newcomers will learn to their cost that I am serious should they ignore this.

I knocked this ea together in a few minutes this Friday morning and manipulated the basket opening times so it would send the trades. It executed closure perfectly at the required time - and at a few dollars profit. :clap:

Pop the ea on a demo in time for next week. It is a basket trader, so you only need it on one chart - I suggest GJ. I will start two demos, one to send the trades at London open on Monday and the other on Tuesday and leave both the baskets to run until they close. Perhaps by next weekend we will start to have a feel for whether this has possible legs or not. We shall see.

Have fun.

:xm:

dudest variant on all this
dudest has posted an ea that works along the same lines, but is an interesting looking variant. Try it out.
Link: http://www.stevehopwoodforex.com/phpBB3 ... f=5&t=3612

Brief description:
1. Currently applied on 10 pairs only
( AUDUSD, CADCHF, CADJPY, EURNZD, EURSEK, GBPJPY, GBPNZD, NZDUSD, USDSGD, XAUUSD )
2. Apart from CADJPY, CADCHF and GBPJPY, the others assume that the Monday candle is telling a lie; so on Tuesday, the trade that is opened is opposite the Monday close
3. StopLossPips and JumpingStopPips are provided by half the 5-day ATR.
JS only moves SL to BreakEven ( +2 pips BEP default )
4. This one uses the Broker's time, not the local computer 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
Author:  milanese [ Fri Apr 25, 2014 10:03 pm ]
Post subject:  Once a week basket trading EA

:xm: looks interesting , thanks Steve :cheer:

Cheers :)

Tommaso
Author:  dudest [ Sun Apr 27, 2014 7:01 am ]
Post subject:  Once a week basket trading EA

Brilliant observation!

Bob and Steve: kudos!, and thanks

Cheers
Author:  SteveHopwood [ Sun Apr 27, 2014 9:29 am ]
Post subject:  Once a week basket trading EA

I see from the number of downloads that there is a bit of interest in trying this out. You guys might care to re-download, because I had a bath yesterday. :lol:

It occurred to me during the bath that it might be useful for the EA to display a record of the highest upl the basket reaches, and the time and date of the high point. OAD will show silly default values when first loaded, and will adjust them as soon as it launches a basket.

:xm:
Author:  mobthehop [ Sun Apr 27, 2014 4:07 pm ]
Post subject:  Once a week basket trading EA

Steve, at the time writing this, there are two EA files in post 1... Guess only one of them is the latest version.....

Cheers
Author:  cherno99 [ Sun Apr 27, 2014 8:28 pm ]
Post subject:  Once a week basket trading EA

nice! love the variable names too TradeReturnedFromCriminal :lol:
Author:  SteveHopwood [ Sun Apr 27, 2014 8:37 pm ]
Post subject:  Once a week basket trading EA

mobthehop » Sun Apr 27, 2014 4:07 pm wrote:Steve, at the time writing this, there are two EA files in post 1... Guess only one of them is the latest version.....

Cheers
Yep. Previous one removed. Thanks.

:xm:
Author:  SteveHopwood [ Sun Apr 27, 2014 10:17 pm ]
Post subject:  Once a week basket trading EA

cherno99 » Sun Apr 27, 2014 8:28 pm wrote:nice! love the variable names too TradeReturnedFromCriminal :lol:
Hehe. My opinion of non - Global Prime so-called 'brokers' is well known here. I am not sure if the variable was one I named or whether Matt was joining in the fun at the time, but the general gist holds true. Basically, if your broker is not GP then you are stuffed. There was another potential broker at http://www.stevehopwoodforex.com/phpBB3 ... =17&t=2631 but they have not been seen around here since August so I do not even know if they are still trading.

:xm:
Author:  hiredwhip [ Sun Apr 27, 2014 10:52 pm ]
Post subject:  Once a week basket trading EA

SteveHopwood » Sun Apr 27, 2014 5:17 pm wrote:
cherno99 » Sun Apr 27, 2014 8:28 pm wrote:nice! love the variable names too TradeReturnedFromCriminal :lol:
Hehe. My opinion of non - Global Prime so-called 'brokers' is well known here. I am not sure if the variable was one I named or whether Matt was joining in the fun at the time, but the general gist holds true. Basically, if your broker is not GP then you are stuffed. There was another potential broker at http://www.stevehopwoodforex.com/phpBB3 ... =17&t=2631 but they have not been seen around here since August so I do not even know if they are still trading.

:xm:
Hi Steve,
Caught this bot on my Sat night reading, and it looks to be right up my alley.....Will try it out and post results...

Have a great weekend

Whip
Author:  hiredwhip [ Fri May 02, 2014 2:13 pm ]
Post subject:  Once a week basket trading EA

hiredwhip » Sun Apr 27, 2014 5:52 pm wrote:
SteveHopwood » Sun Apr 27, 2014 5:17 pm wrote:
cherno99 » Sun Apr 27, 2014 8:28 pm wrote:nice! love the variable names too TradeReturnedFromCriminal :lol:
Hehe. My opinion of non - Global Prime so-called 'brokers' is well known here. I am not sure if the variable was one I named or whether Matt was joining in the fun at the time, but the general gist holds true. Basically, if your broker is not GP then you are stuffed. There was another potential broker at http://www.stevehopwoodforex.com/phpBB3 ... =17&t=2631 but they have not been seen around here since August so I do not even know if they are still trading.

:xm:
Hi Steve,
Caught this bot on my Sat night reading, and it looks to be right up my alley.....Will try it out and post results...

Have a great weekend

Whip

Excellent first week Steve, $26.00 profit.......Thanks for this, will try it again next week and add a second one...

Have a great weekend

Whip
All times are UTC Page 1 of 4