Holy Graily Bob 'n Dotty

EA's inspired by nanningbob's work here, especially those based on his 240 Moving Average trend detection filter.
Post Reply
pakeha
Trader
Posts: 78
Joined: Tue Nov 06, 2012 3:20 am
Location: Canada

Holy Graily Bob 'n Dotty

Post by pakeha »

Yes, many thanks. You guys are amazing.

Have a great holiday season!
vsmakkal
Trader
Posts: 56
Joined: Tue Sep 23, 2014 12:50 am

Holy Graily Bob 'n Dotty

Post by vsmakkal »

Merry Christmas to Steve, Tommaso, Bob and the rest of the greats at SHF.. Thank you and wish u guys all the best

Sara
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 Dotty

Post by SteveHopwood »

Christmas pressie for you all - V2i is in post 1.

Thomas has added the code to allow HGBnD to use the hgi_lib.ex4 from post 1 in Bob's thread - yet another wonderful contribution :clap: :clap: :clap: :clap: :clap: :clap: . Download it and store it in either your platform's Experts or Libraries folder - either will do. 2i will not run without it. The bot no longer makes external calls to HGI - a massive saving in cpu resources. There is no need to specify the version of HGI you are using as the EA does not call it.

I have added code to:
  • Allow you to disable full hedging.
  • Use the total of open lots to decide whether the position is 'unbalanced' instead of the number of open trades. It became clear with use that this is a better method - actually Thomas' idea originally but I did not understand what he was getting at until I had used the bot for a while.
  • Close a profitable full hedge trade when there is a yellow range wave line. This is something else whose value became clear with use.
The updated HGI inputs section in the user guide is:
  • The next six inputs are concerned with adding and monitoring a full hedge trade:
    • UseFullHedging: turns this feature on/off.
    • BuysAndSellsUnbalancedAtLots: this is the point at which a position is considered to be 'unbalanced'. For example: the default is 0.1; there are 0.03 buy lots open and 0.18 sell lots open; the difference between the two groups is >0.1, and so is 'unbalanced'. HGBnD will send full hedge buy trade of 0.15 lots following an HGI buy signal.
    • OnlyCloseFullHedgeWhenInProfit: this tells HGBnD only to close a full hedge trade if it is in profit.
    • OffsetOppositeLosersAgainstProfit: if enabled and HGBnD has just closed a profitable full hedge trade, she will use the profit to close as many of the losers as possible, on the other side of the hedge.
    • FullHedgeComment: the order comment that labels the trade as a full hedge trade. HGBnG uses this to identify a full hedge, so you must not change this input once you have a full hedge in place.
    • CloseProfitableFullHedgeOnYellowWave: tells HGBnD to close profitable full hedge trades when there is a yellow range wave signal. She will also offset opposite direction trades is OffsetOppositeLosersAgainstProfit is set to 'true'.
: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.
mntiwana
Trader
Posts: 17
Joined: Fri Aug 16, 2013 11:57 am

Holy Graily Bob 'n Dotty

Post by mntiwana »

Hi Steve
First,Happy New Year in advance,to all of you,
and a lot of appreciations to you along with your whole cabinet (coders team) for the status art work (coding) you made during 2016,especially full figured EAs/MPTMs by adding all possible accessories/snippets,then thanks for this current gift.
regards
trader689
Trader
Posts: 674
Joined: Thu Nov 17, 2011 12:53 am

Holy Graily Bob 'n Dotty

Post by trader689 »

Thanks Steve for this Xmas present and for everything else you and the team do for us retail guys!

here's looking forward to another prosperous year bring on 2017!

:party:
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 Dotty

Post by SteveHopwood »

V 2k is in post 1. Thomas has been bug squishing again. :clap: :clap: :clap: :clap: :clap: :clap:

Here is the pm he sent with explanations:
tomele wrote:Hello Steve

I found a little time for bug hunting today and was able to solve 3 problems. All line numbers refer to HGBnD.

1. Invalid stop errors. They happened only in times of very high spreads and only for buy stops. I have seen situations where the spread was 3 times the grid distance. This lead to situations where the bots tried to send buy stops below the current ask price. I have added code at line 1204 in SendSingleTrade() to reject such requests.

2. Strategies without hedging caused problems with CloseAllPossible...(). As an example, if there were no buy orders and the signal changed to sell, CloseAllPossibleBuys() and from there CloseAllTrades() were called repeatedly without ever coming to an end. The quick fix was adding conditions in lines 5312 and 5320.

3. While debugging the above, I noticed that FifoTicket[] always was one element to large with the last ticket number being 0. The OpenTrades++ statement in CountOpenTrades() was not at the position it normally is for your coding style. I moved it from above the FifoTicket block to line 3389.

The modifications seem to work fine. Attached are HGBnD and HGBnDnS j versions.

Cheers
Dead obvious when they are spotted and fixed, but a bugger to find in the first place. Thanks again Thomas :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap:
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.
mntiwana
Trader
Posts: 17
Joined: Fri Aug 16, 2013 11:57 am

Holy Graily Bob 'n Dotty

Post by mntiwana »

SteveHopwood » Thu Jan 05, 2017 2:27 am wrote:V 2k is in post 1. Thomas has been bug squishing again. :clap: :clap: :clap: :clap: :clap: :clap:

Here is the pm he sent with explanations:

Dead obvious when they are spotted and fixed, but a bugger to find in the first place. Thanks again Thomas :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap:
Hi Steve
Thanks for updating.
regards
ratonchjes
Posts: 1
Joined: Thu Jun 18, 2015 4:34 pm

Holy Graily Bob 'n Dotty

Post by ratonchjes »

Wonderful Thread! :clap: :clap: :clap: I'm reading it slowly for not making any question that other users have already done! I wish a happy new year for all!

Regards from Portugal
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.

We need some creative thinking

Post by SteveHopwood »

I am only trading GJ at the mo, so I can watch the bot in action more easily. I just sat and watched the rapid opening and closing of trades at a minimal profit that others have mentioned. As explanation, here is the PM I sent to Thomas:
SteveHopwood wrote:Hi Thomas

I have seen this happen three times today:
  • GJ is in a downtrend on HTF HGI (H4).
  • There was a sell signal on the LTF (M5), and the bot sent the full pending grid. From there:
    • the market rose and filled a pending buy.
    • the market continued to rise, the trade moved into profit and the bot closed it because I have CloseOnOppositeSignalOrTrendChange enabled.
The closure happens in the block starting at 5308. This would have happened before you added to the code, because your addition is intended to avoid the bot trying to close a trade that does not exist.

This happens whether the market initially fell to fill a pending sell or not, and explains the rapid opening and closing of trades at a tiny profit..

<Yes. Just watched it happen twice, so I was left with three unprotected sells. I assume this will continue to happen for as long as the market continues, so I have disabled CloseOnOppositeSignalOrTrendChange.>

I am thinking that we need to stipulate that trades only close if they are not part of a hedged position. What do you think?


Cheers
That final idea of mine (last para in pm) is only useful to those of us who are hedging. Those of use just gridding will only have traded in the direction of the prevailing trend, and need trades to close on a trend change.

We are looking for solutions. Let the creative juices flow.

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

Post by SteveHopwood »

I have re-uploaded 2k to post 1 with a fix for a tiny but incredibly important bloop. This would have prevented the trading time frame HGI from sending blue wave sell trades, so the update is vital.

DIYers, the fix is as simple as could be. Line 2588:
TradingTimeFrameStatus = Raddownarrow;

should be:
TradingTimeFrameStatus = Waveselltrend;

----------------------------------

Re the rapid opening and closing of trades at the minimal profit, I spotted the problem. Thomas is working on a brilliant solution that he came up with, so forget about it for now.

Only enable CloseOnOppositeSignalOrTrendChange if you are NOT hedging, for the time being.

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

Return to “Thingy Bob EA's”