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

Holy Graily Bob 'n Grid
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4525
Page 40 of 99
Author:  tonyharmony [ Mon Mar 14, 2016 10:20 am ]
Post subject:  Holy Graily Bob 'n Grid

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:
Author:  Bruster400 [ Mon Mar 14, 2016 1:48 pm ]
Post subject:  Holy Graily Bob 'n Grid

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
Author:  k3v1n0s [ Mon Mar 14, 2016 2:46 pm ]
Post subject:  Holy Graily Bob 'n Grid

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
Author:  Bruster400 [ Mon Mar 14, 2016 3:14 pm ]
Post subject:  Holy Graily Bob 'n Grid

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
Author:  SteveHopwood [ Mon Mar 14, 2016 6:27 pm ]
Post subject:  Holy Graily Bob 'n Grid

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:
Author:  SteveHopwood [ Mon Mar 14, 2016 6:45 pm ]
Post subject:  Holy Graily Bob 'n Grid

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:
Author:  SteveHopwood [ Mon Mar 14, 2016 7:06 pm ]
Post subject:  Holy Graily Bob 'n Grid

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:
Author:  krzysiekqq2 [ Mon Mar 14, 2016 10:19 pm ]
Post subject:  Holy Graily Bob 'n Grid

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
Author:  SteveHopwood [ Mon Mar 14, 2016 11:57 pm ]
Post subject:  Holy Graily Bob 'n Grid

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:
Author:  Bruster400 [ Tue Mar 15, 2016 9:51 am ]
Post subject:  Holy Graily Bob 'n Grid

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.....
All times are UTC Page 40 of 99