Once a Something basket trading ea

User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Once a Something basket trading ea

Post by SteveHopwood »

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.
    • The Average True Range indicator
THIS IS AN EXPERIMENTAL EA NOT YET BEING USED ON OUR LIVE ACCOUNTS

Once a Something is a joining together of Once a Week at http://www.stevehopwoodforex.com/phpBB3 ... f=5&t=3587 and Once a Day at http://www.stevehopwoodforex.com/phpBB3 ... 551#p93551, plus a new option to trade with straight stop loss and take profit exits.

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 the Once a Week basket trader EA.

It was not long before I was changing the EA inputs so that it opened a basket at 8.00 London time, then closed it at 16.00 every day. Given that I was already trading the EA once a day rather than once a week, and that I needed slightly more effective trade management, I decided to adapt OAW, and so OAD was born.

Once a Something offers three trading options:
  • trade once a week as originally coded (OAW).
  • trade the basket once a day, with a list of inputs to control trading days and times. Trades are viewed as a basket and closed either at a take profit figure or at you chosen closing hour (OAD).
  • open a basket once a day but there is no close hour or basket take profit. Trades are sent with an individual take profit and stop loss, calculated as a percentage of ATR
The three options at the head of the list of inputs that allow you to choose your trading method:
  • TradeOnceaDay: opens and closes the basket within the day.
  • TradeOnceaWeek: opens and closes the basket once a week.
  • TradeOnceaDayTpSl: opens the basket once a day with each trade having an individual stop loss and take profit.
I have deliberately set all three options to 'false' to force users to decide for themselves which method to trade. There are idiot checks in place for <>1 choice made; if the check fails the ea shows a message to warn you, and then removes itself from the chart.

That is all that OAS does. There are no management features apart from a cash take profit - although this is a tad more sophisticated than at inception, so read the inputs details below. You can opt for individual trade management or more advanced basket trading management by using: Other 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 associated information on the chart. The purpose of this is to allow you to check that all the pairs are available via your broker, and to see information to help with your input choices. 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.
  • MinimumTradableMovementPercent: this is the smallest number of pips the market must move away from the weekly open to allow a trade. OAD and its mum, OAW, quickly showed that taking trades when the market was close to the weekly open often resulted in them looking as though they had been taken in the wrong direction after the market quickly reversed. I have no idea whether the default of 10% is any use - we are talking pure guesswork here.
  • MaximumTradableMovementPercent: individual trades are not sent if the market has already moved beyond this percentage of the weekly ATR. The default here is also pure guesswork.
  • anyone who needs Lot or TradeComment explaining needs to spend time with a therapist.
  • CashProfitTarget: you have in your mind the profit in dollars, euros, pounds, martian qqxzzxqq or whatever you want to bank as a profit target. The default represents c. 2% of the balance of my GP demo, so play with this and find a value that suits your account.
  • CashProfitTargetPerTrade: if > 0, this tells OAD to multiply the number of trades on your account by this figure, to create a CashProfitTarget resulting from this calculation.
  • AlwaysOn. If left to the default of 'true', this input tells the ea to loop around its decision code twice a second instead of waiting for the next tick. To see the difference this makes, turn it off and compare the displayed 'Current profit' on the chart with the actual profit displayed by your platform. If 'true', this causes difficulties with accessing the inputs window and platform freezes if you try to do anything at all whilst EA's are enabled, so remember to disable them first. You will see what I mean the first time you forget. OAS ignores this input if TradeOnceaDayTpSl is enabled.
  • These options apply to both versions of trading once a day. Set the xxxCloseHour inputs to anything > 24 if you trade OAD with stop losses and take profits and do not want all the trades closed at a set time.
    • TradeMonday. If left at the default of 'true' OAD will trade on Monday. If set to false, it will sleep for the day.
    • MondayTradeOpenHour is the input that tells you at which time of your trading day to send the trade on Monday. 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.
    • MondayTradeCloseHour tell OAD when to close the basket if it has not hit tp.
    • Subsequent TradeTuesday etc inputs give you day to day control over your trading days and hours.
    • ShowTradingChoices tells OAD to show a list of your trading day/open/close choices.
  • AtrPeriod: this is the period input for the W1 ATR that is the minimum and maximum percent of movement allowable for the ea to send individual trades. Leave it alone unless you know what you are doing.
  • ATR for trade exit inputs:
    • ExitAtrTimeFrame: the time frame for the atr. Default is the D1 chart.
    • ExitAtrPeriod: the number of days for calculating the atr. The default is the default value of the indi.
    • ExitAtrStopLossMultiplier: multiplies the atr by this percentage to create the stop loss.
    • ExitAtrTakeProfitMultiplier: multiplies the atr by this percentage to create the take profit.
  • Trade once a week inputs:
    • 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.
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.

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. Select your trading option, then make any input changes you require, save them as a setfile and leave the bot to do its thingy.

Have fun.

:xm:

dudest variant on Once a Week
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
You do not have the required permissions to view the files attached to this post.
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
bazze

Once a Something basket trading ea

Post by bazze »

Thank you for this too,Steve :good:
But,is it possible to make the info on the chart bigger? :geek:
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Once a Something basket trading ea

Post by SteveHopwood »

bazze » Sun May 25, 2014 11:18 am wrote:Thank you for this too,Steve :good:
But,is it possible to make the info on the chart bigger? :geek:
'fraid not. Comment font size is fixed.

:xm:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
bazze

Once a Something basket trading ea

Post by bazze »

Ok... :)
excalibre30
Trader
Posts: 68
Joined: Sat Mar 08, 2014 7:45 am

Once a Something basket trading ea

Post by excalibre30 »

Great!

Downloaded and ready to test. Woohoo! :yahoo:
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Once a Something basket trading ea

Post by SteveHopwood »

I forgot to add code to tell OAS not to close TradeOnceaDayTpSl trades at the time set in the xxxCloseHour inputs and was about to add it when I realised we can have the best of both worlds.

Set the xxxCloseHour inputs to anything > 24 if you trade OAD with stop losses and take profits and do not want all the trades closed at a set time.

This also gives us the ability to have all our trades closed on Friday, so we can be 'flat' at the weekend.

:xm:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Once a Something basket trading ea

Post by SteveHopwood »

All this has given me an idea. Details at http://www.stevehopwoodforex.com/phpBB3 ... f=5&t=3649

:xm:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
theforexedge
Trader
Posts: 220
Joined: Thu Apr 26, 2012 10:31 pm
Location: Torquay

Once a Something basket trading ea

Post by theforexedge »

Steve

Once a something seems to be off to a good start :good: but can you add trade currency pair once per day or one basket per day to the EA, as OAD will open another basket if closed in profit within the opening hour..i'd like to test the two options if possible :smile:

Thanks, JP
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Once a Something basket trading ea

Post by SteveHopwood »

theforexedge » Thu May 29, 2014 8:15 am wrote:Steve

Once a something seems to be off to a good start :good: but can you add trade currency pair once per day or one basket per day to the EA, as OAD will open another basket if closed in profit within the opening hour..i'd like to test the two options if possible :smile:

Thanks, JP
I was waiting to see if this would happen. I will look into it.

:xm:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
theforexedge
Trader
Posts: 220
Joined: Thu Apr 26, 2012 10:31 pm
Location: Torquay

Once a Something basket trading ea

Post by theforexedge »

Steve

I think that trade pair once per day is best as some of the pairs might not have reached their MinimumTradeableMovementPercent during the hour / basket closure.

Would it also be possible to add Lot as a percentage of trading account?

Looks good so far, but needs some testing to find the optimum movement % vs CashProfit Target.

Thanks, Jason
Post Reply

Return to “Automated trading systems”