Once a Day 'n Bob

EA's inspired by nanningbob's work here, especially those based on his 240 Moving Average trend detection filter.
Locked
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 Day 'n Bob

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 meaning of the term 'trading sessions' and their timing.
    • The Average True Range indicator you will find in the Indicators folder of you Navigator window.
THIS IS AN EXPERIMENTAL EA NOT YET BEING USED ON OUR LIVE ACCOUNTS

Newcomers to this forum
Newcomers here may not yet be familiar with Bob's (user name Nanningbob) work here. Even if familiar, you might have missed or not yet read, some of the principles he has taught us. OAD depends upon adhering to these principles, so go now to post 2 here for a precis of them. It will help you understand how OAD works.

Introduction
Once a Day 'n Bob has arisen from our experiments with Once a Month at http://www.stevehopwoodforex.com/phpBB3 ... 861#p93861. Once a Month was coded to trade in the direction of the monthly candle, on days identified as those that had led to the greatest profits over the previous couple of years. OAM is a multi-trade ea but the trades were intended to be viewed as individual trades with their own take profit.

I noticed that difficult and ultimately losing trades were usually taken in opposition to the trend identified by Bob's H4 240 period Moving Average. I added this filter to OAM and quickly found that trades could be taken daily and profitably closed as a basket later in the day, rather than waiting for a set close day later in the month - a kind of rinse-and-repeat cycle of trading. Others have enjoyed similar success and we have had a lot of fun.

Once a Day 'n Bob is a daily implementation of how a lot of us ended up trading OAM.

Trading method
  • open a basket of trades daily, at a time of our own choice.
  • ascertain the overall trend for each pair by referring to Bob's moving average.
  • trade each pair in the direction of the current monthly candle, so long as this is in agreement with the overall trend:
    • the trades can have their own individual take profit.
    • the whole position can be treated as a basket and closed at a basket take profit.
    • both individual tp and basket tp can operate at the same time.
    • the remains of the original position can be closed at a time of our choice, or left to run.
So, to take an imaginary sequence of events. We want to open our basket at 8.00 in the morning and close at 4.00 in the afternoon. We set up our inputs accordingly. OAD sends the trades at 8.00 AM. They gradually close as individual trades hit their tp. The basket tp reduces as each individual trade closes. The basket closes at the basket tp if we are lucky. If not, the remainder of the position closes at 4.00 PM.

OAM calculated individual trades' take profits as a percentage of the average move from the chosen trading day until the end of the month. This is not relevant to OAD, so I have replaced it with ATR, the Average True Range indi you will find in your Indicators folder.

Inputs
I am not going to describe the first four inputs; anyone unable to work them out for themselves should not be here, so go away and learn the rock-bottom basics.
  • AlwaysOn tells OAD not to wait for a fresh tick before calculating the basket balance etc. Instead, it loops around the code twice a second in order to keep up with the changing upl of he basket. If you enable AlwaysOn, remember to disable AutoTrading on your platform before attempting to change your inputs of load up new versions of the bot; you will learn why the first time you forget and your platform freezes for about half a minute. It does no harm, but is bloody irritating and is yet another in the myriad reasons why I describe this ludicrous platform as CrapTx.
  • ATR for Take Profit
    • AtrPeriod: the period over which you want the indi to calculate atr. The default equates to roughly one month of trading. A zero value for this input turns off ATR and results in OAD treating the trades entirely as basket trades.
    • AtrTimeFrame: the chart time frame for the calculation, expressed in minutes so the D1 would be 1440. The default of the H4 is pure guesswork; I have no idea which one is best.
    • AtrTpMultiplier: OAD multiplies the result of the ATR call by this value to create multiples of atr. These are added to a buy open price, or subtracted from a sell open price, to calculate individual trades' take profits.
  • Basket trade management:
    • CashProfitTarget: OAD will close the entire basket when the upl in cash reaches this target. A zero value disables this.
    • CashProfitTargetPerTrade: this is the dynamic basket take profit. OAD multiplies the number of open trades by this figure to give the basket take profit. This figure reduces as trades close after hitting their individual take profit.
    • CombinedOpenCloseTargetPips: trades close at TP, leaving behind the losers. OAD will close the remainder of the basket when Closed_pips - Open_pips reaches this value. A zero input turns off this feature.
  • Trading days and times.
    • these should be pretty obvious, so I am not going to explain them. You enter trade send and close hours in the relevant inputs. Note that OAD will only send and close trades during the actual hour in the inputs; you have to restart the ea with different values in these inputs if you want to send/close trades at different times. UseBrokerTime allows you to use your broker's time for the inputs; UseLocalTime allows you to use your own local time as shown as the time on your computer's clock. Whichever one you use, I suggest you pick the open hour that equates to the London session open time, then close about 8 hours later. How you work out what this is should be is up to you. As usual, questions about how to tell the time are banned and will be deleted, along with any replies.
  • Moving average: this is Bob's sma filter. Leave it alone unless you know what you are doing.
  • Swap filters: these allow you to disable trading against the high-swap currencies and is probably irrelevant here, but I leave them in just in case they are needed.
Related links
These EA's preceded Once a Day 'n Bob and were part of the process that led to his development. Explore them to see if there is anything to suit you: Conclusion
Bearing in mind the stuff about the difficulties trading Monday and Friday, we may disable these in live trading. On demo for now, leave the enabled to see what happens. That apart, experiment and see if you can find settings that work consistently for you.

Have fun.

:xm:


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
list][*]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[/list][/list]

-
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.
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 Day 'n Bob

Post by SteveHopwood »

The fundamentals I describe here are screamingly obvious, but only once you know them. I did not know them until Nanningbob arrived and started developing his theories and passing them on.

The very best pearl I have gained from Bob so far is: use the H4, 240 period Simple Moving Average (sma) applied to the Open price to define the market's current trend.

This sma derives from a period 2 sma on the monthly chart. Here is a picture of the UC monthly. I suggest you view it in a separate pane so you can zoom in on the detail:
USDCHFMonthly.png
The yellow vertical lines mark the start of each new year. This chart covers the period from 2001. The thing to notice is how rarely the candles cross the sma.
  • above the sma: market is trending up so buying is the order of the day.
  • below the sma: market is trending down so selling is the order of the day.
I suggest you spend a few happy minutes loading up monthly charts on your demo and adding the sma to it. Study the relationship of the candles to the sma.

We could probably do a lot worse than trading the MN1 chart, buying when the market is trending long and selling when trending short. The problem with this is it is long-term trading and we need deep pockets and a lot of nerve for that. Just because a candle is a rising candle, does not mean it rose consistently throughout the month. Within that MN1 candle, the W1 can have fallen a long way before rising and ending up green. The H1 can have screamed up and down like a drunken elevator on acid. M15 - let's not go there. :D A trade based on the MN1 chart could go several hundred pips into the hole before recovering.

Most of us look for trade triggers of different kinds on a lower time frame, so we need to adapt the MN1 sma. A lot of us use the H4, 240 period sma that equates to the 2 period on the MN1. Here is how we arrive at the period on the lower time frames:
  • 2 period on the MN1 becomes 8 period on the W1 (4 trading weeks per month).
  • 8 period on the W1 becomes 40 period on the D1 (5 trading weeks per week).
  • 40 period on the D1 becomes 240 period on the H4 (6 H4 candles per day).
  • 240 period on the D1 becomes 960 period on the H1 (4 H1 candles per H4 candle).
Carry on the arithmetic if you want the sma on ltf charts. They may not be visible if the market is already far away from the H4 240. Attached is a template that will display the sma calculated for each tf down to M15, and set to only display the one relevant to the chart.

Bob has taught us a few more basics, so copy out this table and emblazon in upon your heart. It is invaluable information:
  • use the 2 period Simple Moving Average applied to the Open on the monthly chart to define the overall trend. Use calculated sma's to see the same trend reflected on ltf charts.
    • the market is trending long if it is above the sma.
    • the market is trending short if it is below the sma.
  • the monthly candle will tend to continue in the same direction once it has moved appreciably in that direction. Trading against this direction can be hard.
  • the weekly candle will tend to continue in the same direction once it has moved appreciably in that direction. Trading against that direction can be hard but bear in mind:
    • Monday is unreliable and often takes off in a direction it will not maintain. Mistrust the Monday candle.
    • Friday often sees a reversal of the direction established during the week.
  • The market tends to reverse about half way through a session. Bob often takes his profits at this point. If you are in doubt during the session mid-point and you have profitable trades, then close them.
Apply your understanding of all this as you read about Once a Day 'n Bob and you will understand the reasoning behind it much better.

:xm:
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.
User avatar
patmontes
Trader
Posts: 367
Joined: Wed Apr 23, 2014 10:42 pm

Once a Day 'n Bob

Post by patmontes »

Will test once I get a new demo going. Looks nice.
User avatar
Aussiedoc
Trader
Posts: 270
Joined: Tue Dec 13, 2011 8:10 am
Location: Western District. Victoria. Australia

Once a Day 'n Bob

Post by Aussiedoc »

Thanks Steve. I'll get it loaded later today and report back. Cheers :good: :good:
If you can never exceed your own expectations - why expect second-best?
User avatar
pacinvest
Trader
Posts: 150
Joined: Tue May 15, 2012 10:24 am
Location: Whangarei, New Zealand

Once a Day 'n Bob

Post by pacinvest »

Thanks Steve

Would like to take this for a spin on Demo.
Hey you did a nice job of writing Post 2. For me it reads very clearly. As for Bob's clarity of thinking on this subject well it speaks for itself, but most of us continue to ignore it. In my case I keep coming back to how fundamental it really is.

Imagine if we had some of the DreamTeamShell features as entry controls for this basket, surely this could fine tune entries and help filter the pairs to trade that day. Possibly only need a stoch entrance as you have incorporated the 10.x MA already.

In my manual trading I am using a basic TurboJRSX -StochHTF entry strategy once I am happy with 10.7-10.6 & CSS entry requirements.

For anyone interested it goes like this:

TurboJRSX Len=9 turns above or below 50 for Sell or Buy (Usually on H1) Note using this instead of stoch main TF because it is a bit smoother and sharper on the signal but quite similar to Stoch 9-2-5
& Stoch NextHigherTF 9-2-5 is in agreement with trade direction (so on H4 usually)
& Stpch NextNextHigherTF 5-2-2 (so on Day usually) Note faster higher TF direction as in 10.7 - it works!)

So once a Day'n Bob picks probable direction and if we used a sharp H1 entry to create the Day basket seems like that would work out well.

Didn't mean to pollute direction of this thread and EA with ideas, if deemed inappropriate here please nuke these comments.

As always much appreciate the efforts from you and the programming team Steve.
User avatar
retireme
Trader
Posts: 131
Joined: Fri May 11, 2012 6:37 am

Once a Day 'n Bob

Post by retireme »

Simply amazing start... just for shits and giggles I did this:

OOTB except
set start time to 0800, close to 2200 GMT +8

started cleaning (Monday is cleaning day)
checked back 2 hours later

108 pips banked all done and dusted :o

so now:

OOTB except
set start time to 1200, close to 2200 GMT +8
and back to cleaning :uff:

Rgds
RM
To raise new questions, new possibilities, to regard old problems from a new angle, requires creative imagination and marks real advance in science. - Albert Einstein
User avatar
patmontes
Trader
Posts: 367
Joined: Wed Apr 23, 2014 10:42 pm

Once a Day 'n Bob

Post by patmontes »

retireme » Mon Sep 01, 2014 3:34 am wrote:Simply amazing start... just for shits and giggles I did this:

OOTB except
set start time to 0800, close to 2200 GMT +8

started cleaning (Monday is cleaning day)
checked back 2 hours later

108 pips banked all done and dusted :o

so now:

OOTB except
set start time to 1200, close to 2200 GMT +8
and back to cleaning :uff:

Rgds
RM
GMT+8 here as well and I have mine at 15:00 start to 23:00 let's see what will happen
spotdespot
Trader
Posts: 768
Joined: Sun Jan 22, 2012 11:38 pm

Once a Day 'n Bob

Post by spotdespot »

Hi Steve - Looks like fun - will load a couple of different settings up.

A couple of things I noticed - by default the EA trades positive swaps only for the usual candidates but it makes no difference if the trades are intraday (unless we are just using the positive swap as a general bias I guess - only just thought of that as I wrote it).

You also refer to Bob's 240 MA as the SMA - has he changed it as it used to be the LWMA? Sorry if I am out of date on this one - haven't had time to keep up with everything but the last formal iteration of Bob's stuff was LWMA.

Looking forward to it!

Cheers,
Dave.
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 Day 'n Bob

Post by SteveHopwood »

spotdespot » Mon Sep 01, 2014 9:29 am wrote: A couple of things I noticed - by default the EA trades positive swaps only for the usual candidates but it makes no difference if the trades are intraday (unless we are just using the positive swap as a general bias I guess - only just thought of that as I wrote it).
Thanks Dave; that was accidental. The swap feature is irrelevant to intra-day trading and I only left the feature in for those wanting to run their baskets over more than one day. Every one else wants to turn the filter off - best to do it by changing the code and recompiling.
You also refer to Bob's 240 MA as the SMA - has he changed it as it used to be the LWMA? Sorry if I am out of date on this one - haven't had time to keep up with everything but the last formal iteration of Bob's stuff was LWMA.
I do not know the answer to this as I am not up to speed with Bob's latest work either. I took my MA values from the trend detection filter that has been part of my shell code for a long time. Can anyone confirm the MA applied price that Bob is using these days? There is not a lot of difference between sma and lwma, but there is a difference.

: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.
parkhead
Trader
Posts: 16
Joined: Tue Oct 29, 2013 3:28 pm

Once a Day 'n Bob

Post by parkhead »

As it is the first trading day of the month and the system trades in the direction of the current monthly candle, is it advisable to wait a while before trading, say 7 or 15 days?
Locked

Return to “Thingy Bob EA's”