Holy Graily Bob 'n Grid

EA's inspired by nanningbob's work here, especially those based on his 240 Moving Average trend detection filter.
Post Reply
bazze

Holy Graily Bob 'n Grid

Post by bazze »

Thanks for this....Maybe???
You do not have the required permissions to view the files attached to this post.
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.

Holy Graily Bob 'n Grid

Post by SteveHopwood »

V 2k is in post 1.

I have not updated the user guide, so in case any of you do not fully understand the improvements made to the bot and the related inputs, in the 3 level semafor section:
  • CloseTradesOnRelevantSemafor: closes buy trades if the previous candle closed with a high semafor. Closes sell trades if the previous candle closed with a low semafor.
  • CloseImmediatelySemaforAppears: as above but closes immediately the signal appears. You can have both CloseTradesOnRelevantSemafor and CloseImmediatelySemaforAppears.
  • CloseOnlyInPositivePips: this tells HGBnG only to close a group of trades if they are in pips profit as a group.
  • DeleteAndReplaceLosersGrid: Losing hedged trades will be a long way away, so delete outstanding stop orders and replace them closer to the market.
  • The remaining inputs tell HGBnG how to behave with regard to replacing a grid after a semafor-signalled group of trades are closed. For the purpose of this description, imagine a high semafor has closed a group of buys (mentally turn everything upside down for sell closure):
    • ReplaceWinnersGrid: tells HGBnG to send a new group of buy stops to catch the trend resumption.
    • ReplaceWinnersByLimitGrid: if the closed buys were a part of a hedged position, this tells HGBnG to send a group of buy limit trades at DistanceBetweenTradesPips below the market. This was Kevin's idea for dealing with the situation where the market retraces briefly after the new high is reached, then resumes its upward climb. It cuts the DD created by the existing market sells.
    • AddStopOrdersToLimitGrid: there will come a point where the uptrend will end. The market will fall, filling all those limit orders leaving market buys in a selling market. This tells HGBnG to adopt Pat's idea of adding a grid of sell stops below the buy limit grid. This will add more sell trades to the basket as the markets fall, eventually allowing the position to close at breakeven and banking all the pips made whilst the market rose.
These cycles could last a substantial period of time but will never get into the sort of mess that Griddy Wotsit creates, with hundreds of trades open. The markets will always move far enough in one direction eventually, to allow groups of trades to be closed in profit. The grids will always be in place to catch the movement in whatever direction the market goes post-closure.

I have taken care to ensure that the default inputs represent my setfile I shall be trading on my live account from tomorrow morning. You guys just make sure your trading day restrictions are correct for where you live. Hour inputs remember, are in 24 hour local time.

I am blown away by ideas that have come around this week. This is high octane stuff that has the potential to change a lot of lives. Well done folks. :clap:

: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.
Peepaws
Trader
Posts: 121
Joined: Thu Nov 27, 2014 11:19 pm

Holy Graily Bob 'n Grid

Post by Peepaws »

Thank you guys for all your hard work and for sharing it with all of us, many of whom have done nothing for you in return!
User avatar
patmontes
Trader
Posts: 367
Joined: Wed Apr 23, 2014 10:42 pm

Holy Graily Bob 'n Grid

Post by patmontes »

k3v1n0s » Mon Mar 14, 2016 12:20 am wrote:
patmontes » 13 Mar 2016, 14:50 wrote:Just thinking out loud... (and willing to be shot down :lol: )
Is it worth sending at the same time already the sell stop orders, X pips away below the buy limit orders so that when it goes wrong, we already are on our way closer to the target Global profit given that the trend is reversing and the semafor high did not repaint?
Excellent idea Pat! :clap: This could make HGB'nG a hands-free EA again. :clap:

Seems like Steve is already making the changes to the code. ;)

Can't wait for tomorrow. :yahoo:

Thank you very much Pat!

Cheers,

Kevin
I'm glad to be able to contribute just by a little bit.. Hopefully it really helps down the line when faced with that situatuon
:hi:
Peepaws
Trader
Posts: 121
Joined: Thu Nov 27, 2014 11:19 pm

Holy Graily Bob 'n Grid

Post by Peepaws »

I have HGBnG and HGBnG and his MA running on brand new demos, mirror images of each other. I will let both run handsfree and report on how they go. Thanks again guys, excited to take at least one of them live! :hi:
User avatar
patmontes
Trader
Posts: 367
Joined: Wed Apr 23, 2014 10:42 pm

Holy Graily Bob 'n Grid

Post by patmontes »

Buy Limits were sent on AUDUSD as designed...
Nice! :good:
User avatar
cyberevil
Trader
Posts: 95
Joined: Mon Oct 26, 2015 5:55 pm
Location: Vancouver, BC

Holy Graily Bob 'n Grid

Post by cyberevil »

Anyone seen my socks?

I was thinking about this problem on Friday night after couple of tequila shots. I was aware of the draw down issue but did not have a solution. I'm glad you two were cooking this up over the weekend!

What a pleasant surprise! Thanks again for joining forces with Steve to make this happen for all of us. Very much appreciate it!

SteveHopwood » March 12th, 2016, 10:15 am wrote:Courtesy of Kevin, V 2j is in post 1. What astonished me is that he appears not to need a bath before doing useful thinking. :lol:

Hang on to your socks folks, 'cos this is going to blow them off. I am going to let him explain in his own words, so here is the pm he sent me. Take your time reading it:

-------------------------------------------
"Hi Steve,

What amazing results we had with HGB'nG this week. :yahoo:

There's no doubt that HGB'nG has the potential to be one of the most profitable EA's.

Still, after this week's events, I noticed a dangerous downside to the way we are running HGB'nG at the moment. I'll explain why, and trust me, I got a potential solution to it (already coded).

After Thursday's events, I was very euphoric as I saw that my balance was growing rapidly and my equity was following closely with low drawdown (< 10%). But on Friday, as my balance kept growing, my equity fell to a drawdown of 25%, eating on my all time HGB'nG's profits. I investigated why this was happening, and found out that most of that loss is caused by my 10 open GJ sell trades. As high semafor signals were appearing, my buy trades were being closed out, new sell stop trades were placed, some of them filled, then price headed north again, this cycle repeated, creating a ever growing drawdown.

This is not dramatic, as we are intelligent beings and so I started to think of a way to get out of that big drawdown. What I noticed is, that although semafor signals are very good areas to close our trades out, they almost never (in real-time, not in hindsight) act as good reversal signals. You already know it, but plotting the Quantum on a chart shows us that these signals keep appearing in a downtrend as well as in a uptrend :





So my rhetorical question is : Why the heck do we want to be sellers in an uptrend and buyers in a downtrend? If we know that high semafor signals are more an indication of an uptrend than a downtrend, then placing sell orders on that signals, is just going to act as a silent (but fast) death on our equity. If this GJ uptrend continues with the same momentum as has been since wednesday, then if nothing changes in the way I am trading HGB'nG, my real account will be wiped out by end of next week. :smile:

Now comes my suggestion. 8-) Why don't we add an option, that when a high semafor signal appears, makes HGB'nG simply close out our buy trades that are in profit and sends a new grid of buy stop orders and a new grid of buy limit orders? This would allow us to catch the retrace if there is one, profit from the uptrend, and if the retrace is deep enough and we catch enough buy limit orders, it possibly would close out our whole position when "HedgeProfitPips/Cash" is attained, ending the cycle.

If it still goes wrong, and the retrace is in reality a reversal (so the high semafor was really a 3 level high semafor which won't repaint), then we end up with a position that has to be closed out manually, but hopefully with a global profit. Looking back on many charts, real semafor signals are very rare compared to quantum signals. I strongly believe that this strategy would work better then adding to our losing position and accumulating drawdown, but whoever wants can turn the limit order option off. We can also later as we see how the EA performs on this, work out a good way to handle those buy orders that happen to open on the last semafor signal.

Steve, what do you think of this? As this text is getting pretty long, I'll write another PM with the changes I've made on the code.

Cheers,

Kevin"
-------------------------------------------

Stunning, or what? You will find the relevant inputs in the "3 semafor inputs" section:
  • ReplaceWinnersByLimitGrid tells HGB to behave as described.
  • DeleteAndReplaceLosersGrid tells HGB to behave as it did previously.
Default inputs are effectively my set file.

This does move us a step away from having the holy grail of an ea that can be left alone, but anyone here seriously thinks that Kevin will not come up with ideas to improve the bot still more once the markets reopen and we start trading again.

Fantastic stuff Kevin. Absolutely brain-blowing. :clap: :clap: :clap: :clap: :clap: :clap: :clap: :party: :party: :party: :party: :!!: :!!: :!!: :!!: :!!: :!!:

I bloody hate weekends. :arrrg:

:xm:
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.

Holy Graily Bob 'n Grid

Post by SteveHopwood »

V 2l is in post 1, with two teensy but important changes that you can make for yourselves if you want.

Line 3919
SendSellGrid(Symbol(), OP_SELLSTOP, NormalizeDouble(Bid - ((DistanceBetweenTrades / factor) * GridSize), Digits), Lot);
becomes
SendSellGrid(Symbol(), OP_SELLSTOP, NormalizeDouble(Bid - ((DistanceBetweenTrades / factor) * (GridSize + 1)), Digits), Lot);

Line 3968
SendBuyGrid(Symbol(), OP_BUYSTOP, NormalizeDouble(Ask + ((DistanceBetweenTrades / factor) * GridSize), Digits), Lot);
becomes
SendBuyGrid(Symbol(), OP_BUYSTOP, NormalizeDouble(Ask + ((DistanceBetweenTrades / factor) * (GridSize + 1)), Digits), Lot);

Then line 8 to #define version "Version 2l" if you want the chart displaying the correct version no.

: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.
szfxtrader
Trader
Posts: 377
Joined: Sun Feb 10, 2013 9:36 am

Holy Graily Bob 'n Grid

Post by szfxtrader »

SteveHopwood » Mon Mar 14, 2016 9:38 am wrote:V 2l is in post 1, with two teensy but important changes that you can make for yourselves if you want.

Line 3919
SendSellGrid(Symbol(), OP_SELLSTOP, NormalizeDouble(Bid - ((DistanceBetweenTrades / factor) * GridSize), Digits), Lot);
becomes
SendSellGrid(Symbol(), OP_SELLSTOP, NormalizeDouble(Bid - ((DistanceBetweenTrades / factor) * (GridSize + 1)), Digits), Lot);

Line 3968
SendBuyGrid(Symbol(), OP_BUYSTOP, NormalizeDouble(Ask + ((DistanceBetweenTrades / factor) * GridSize), Digits), Lot);
becomes
SendBuyGrid(Symbol(), OP_BUYSTOP, NormalizeDouble(Ask + ((DistanceBetweenTrades / factor) * (GridSize + 1)), Digits), Lot);

Then line 8 to #define version "Version 2l" if you want the chart displaying the correct version no.

:xm:
Thanks a lot!
zaguy
Trader
Posts: 43
Joined: Wed Feb 03, 2016 7:42 am

Holy Graily Bob 'n Grid

Post by zaguy »

Thank you Steve. Appreciated.
Post Reply

Return to “Thingy Bob EA's”