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
User avatar
tonyharmony
Trader
Posts: 148
Joined: Sat Dec 20, 2014 10:54 pm
Location: Ipswich, Queensland Australia

Holy Graily Bob 'n Grid

Post by tonyharmony »

Ooooh! This is very exciting stuff indeed...

We may even be getting closer to V 213995K you mentioned in an earlier post Steve? :lol:

Cheers :xm:
One can't learn from one's success, but one can learn an enormous amount from one's failures! Determination to succeed is the only goal....
Bruster400
Trader
Posts: 192
Joined: Tue Sep 24, 2013 3:19 pm

Holy Graily Bob 'n Grid

Post by Bruster400 »

SteveHopwood » Sun Mar 13, 2016 6:39 pm wrote:V 2k is in post 1.


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



:xm:
Hi,

Can I just check my understanding of the new changes. Yes, I've read everything, hopefully this doesn't get me dropped into the "dimwit" category.....

My question concerns the extra stop orders below the new limit orders. If price reverses on a high semaphore then it should pick up the new buylimits on its way down. I get that. Once through that grid we then go through a new grid of sell stops and pick those up too. By the time the last sell stop is triggered price will be down at least two whole grid gaps from the original semaphore and we'll now be perfectly hedged with that loss locked in. If the two grids (buylimits and sellstops) were the same in number, lot size and gaps then from that point our upl won't change?

So my question is how are these grids released? Do they retain their sl's or does the ea use semaphore to close one set at the appropriate time. Just trying to understand the recovery in this situation, whether these new grids are handled differently or whether I need to watch for this manually.

Thanks

Bruce
k3v1n0s
Trader
Posts: 27
Joined: Mon Jan 13, 2014 8:50 pm
Location: Luxembourg

Holy Graily Bob 'n Grid

Post by k3v1n0s »

Bruster400 » 14 Mar 2016, 14:48 wrote: So my question is how are these grids released? Do they retain their sl's or does the ea use semaphore to close one set at the appropriate time. Just trying to understand the recovery in this situation, whether these new grids are handled differently or whether I need to watch for this manually.
Thanks
Bruce
Hi Bruce,

With default settings, when a high semfor appears, HGB'nG will close buy trades that are in profit. If there are losing sell trades open, it will release a buy stop grid, a buy limit grid and a sell stop grid below the buy limit one. If price makes a full reversal, filling all the buy limit trades and all the buy stop trades, then the position is still umbalanced to the downside, as those grids were only installed because of the initial losing sell trades. If price continues further to the downside, at some point the group of sell trades (the initial losing sell trades + the sell stop trades) will be in profit. If then a signal appears (low semafor, yellow wavy, buy signal), these trades are going to close, and new grids are going to be installed until at some point we are in a situation where the whole position (buy + sell trades) is in profit and everything is closed out at breakeven.

If you decide to leave HGB'nG handsfree, make sure you don't overtrade, as available margin could become an issue if a cycle starts lasting longer. I'm still considering whether it would be better to close all positions for the weekend or every other week. Maybe closing out only those positions whose cycle starts perpetuating would be enough. This because I want to be able to trade many pairs, profiting from several trading signals, without margin to become an issue.

Hope this helps.

Cheers,

Kevin
Bruster400
Trader
Posts: 192
Joined: Tue Sep 24, 2013 3:19 pm

Holy Graily Bob 'n Grid

Post by Bruster400 »

k3v1n0s » Mon Mar 14, 2016 3:46 pm wrote:
Hope this helps.

Cheers,

Kevin
Hi Kevin,

Yes, certainly does - I'd forgotten that the close out at the initial high Semaphore was buy grid only - leaving the original sell grid in addition to the new limits and stops that will now be added.

I agree with your thoughts about having to manually close at some point as the hedging can leave significant positions open for a long time. I need to watch a few more cycles to get a better feel for when a suitable time for that might be.

Thanks again for the quick response

Bruce
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 »

I have updated the user guide and uploaded it to post 1. I updated mostly by copying this post http://www.stevehopwoodforex.com/phpBB3 ... 43#p136943 and noticed a missing input from the descriptions of what they do. Go back to this post if you are slightly confused about any of the semafor inputs.

Impeccable behaviour from HGBnG today. Some buy signals detected but the sell stops triggered first. Later another buy signal, so he closed the sells so long as they were profitable and started again. Clever little bot. :clap: :clap: :clap: Calls for some more super-oil as a reward. :lol:

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

Holy Graily Bob 'n Grid

Post by SteveHopwood »

Spoke too soon. :arrrg: :arrrg: :arrrg: :arrrg: :arrrg:

Not the bot's fault though. He obediently does everything he is told to do.

There is cpu saving code that tells him to read HGI once a minute - trust me guys, you really don't want 24 instances of the bot reading HGI every second. This can cause him to think that a signal from the previous candle can be a new one on this one, and so close trades prematurely if the initial read was not dead on the 0.00 start of the candle - and how likely is that?

V 2m in post 1 solves this. Kevin again. :clap: :clap: :clap:

For the unfainthearted, go to line 2170 and replace this:

Code: Select all

if (TimeCurrent() >= NextReadTime)
{
   TrendArrowStatus = Trendnoarrow;
   WaveStatus = Wavenone;
   RadArrowStatus = Radnoarrow;
   HgiSignalStatus = hginosignal;
   NextReadTime = TimeCurrent() + HgiReadDelaySeconds;
with

Code: Select all

static datetime OldBarHgiReadTime = 0;
static bool IsNewHgiBar = false;
      
//Forces the EA to read HGI at the opening of a new candle even if HgiReadDelaySeconds haven't expired
if (OldBarHgiReadTime != iTime(Symbol(), TradingTimeFrame, 0) )
{
   OldBarHgiReadTime = iTime(Symbol(), TradingTimeFrame, 0);
   IsNewHgiBar = true;
} else
   IsNewHgiBar = false;
      
if (TimeCurrent() >= NextReadTime || IsNewHgiBar)
{
   TrendArrowStatus = Trendnoarrow;
   WaveStatus = Wavenone;
   RadArrowStatus = Radnoarrow;
   HgiSignalStatus = hginosignal;
   NextReadTime = TimeCurrent() + HgiReadDelaySeconds;
The same applies to him and his ma lurking in a hedge, but I will do the update now and post the relevant line numbers over there.

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

Holy Graily Bob 'n Grid

Post by SteveHopwood »

Coders, HGBnG has morphed into a shell EA that can respond to any of the HGI signals apart from range arrows (and they would take seconds to add). It allows US citizens to trade purely in the direction of the signal. For the rest of us, it handles multi-directional trade entry and closure using hedging to gracefully exit what would otherwise have been losing positions.

I have not doubt that there will be a few more tweaks to come - LUC is very persistent. :arrrg: It is easy to add your favorite filters and play to your hearts' content. There is a document in my code shells thread that describes how to add extra filters to my shells; the process is the same when adding them to HGBnG. Play around with the code and see what you can come up with.

: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
krzysiekqq2
Trader
Posts: 69
Joined: Sun Oct 11, 2015 11:59 am
Location: Gdynia, town at Baltic sea cost

Holy Graily Bob 'n Grid

Post by krzysiekqq2 »

Thanks Steve and Kevin for latest update.

Just loud thought on Kevin idea to trade stop and limit pending orders on Semaphor signal.

Imagine situation like below in pic 1:

ADX is above 20 and we can consider market is Trending. Then, we should send Buy/Sell Limit orders with high probability on Semaphor signal, trend will continue. Also, we can consider opposite orders and add more orders to continue trend.

Imagine situation like below in pic 2:

ADX is below 20 and we can consider market is Randing. Thus, for signal at Seaphor we send Sell and Buy Stop orders as it is likely we have reverse.

I will practice this manually with options Steve just created in Semaphor Section and compare to first MK2 version with Stop Orders only on real account and report in 4 weeks.
What you thing about such approach?
Cheers,
Krzysztof
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 »

krzysiekqq2 » Mon Mar 14, 2016 10:19 pm wrote:Thanks Steve and Kevin for latest update.

Just loud thought on Kevin idea to trade stop and limit pending orders on Semaphor signal.

Imagine situation like below in pic 1:

ADX is above 20 and we can consider market is Trending. Then, we should send Buy/Sell Limit orders with high probability on Semaphor signal, trend will continue. Also, we can consider opposite orders and add more orders to continue trend.

Imagine situation like below in pic 2:

ADX is below 20 and we can consider market is Randing. Thus, for signal at Seaphor we send Sell and Buy Stop orders as it is likely we have reverse.

I will practice this manually with options Steve just created in Semaphor Section and compare to first MK2 version with Stop Orders only on real account and report in 4 weeks.
What you thing about such approach?
Cheers,
Krzysztof
Please do that. We look forward to your conclusions.

: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.
Bruster400
Trader
Posts: 192
Joined: Tue Sep 24, 2013 3:19 pm

Holy Graily Bob 'n Grid

Post by Bruster400 »

Looks like yesterday morning was a good time to go live with this EA on GBPUSD!! :smile:

Now I just need the discipline to let it run.....
Post Reply

Return to “Thingy Bob EA's”