Holy Graily Bob's Candle Power

EA's inspired by nanningbob's work here, especially those based on his 240 Moving Average trend detection filter.
Post Reply
SWG123
Trader
Posts: 565
Joined: Wed Nov 16, 2011 3:02 pm
Location: Cape Town

Holy Graily Bob's Candle Power

Post by SWG123 »

SteveHopwood » Sat Sep 23, 2017 3:17 pm wrote:Ye Gods folks. I have the intellect of a low-flying dumpling. The code to enforce a minimum distance between trades is the simplest in the world. I cannot even begin to work out why I made it so complicated.

Here is the really worrying thingy: I was sober at the time. :oops:

:xm:
Oh dear....best keep imbibing.

And taking baths :lol:
ArtVandelay
Posts: 2
Joined: Sun Sep 11, 2016 10:13 am

Holy Graily Bob's Candle Power

Post by ArtVandelay »

Draw down got as high as -$900. Currently at -$415.
Using TJF's set file in post one.
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's Candle Power

Post by SteveHopwood »

V 1d is in post 1. I have worked a lot on the bot this weekend and the details are in the new user guide. I have:
  • added simple and complex offsetting as a trade closure option.
  • added features to deal with the potential leaky toilet (noobs, you will read about this in the UG):
    • added a way to define a position as unbalanced.
    • added simple and complex offsetting to help CP return to a balanced position.
    • added two 'nuclear option' closure functions when the position becomes unbalanced.
I have tested the code in Crapergy Tester and it appears to be fine but bugs sometimes emerge when an EA is loaded onto demo when the markets open. We shall see. Maybe hold off using the new features live until we have run them on demo for a day? They are disabled by default.

:xm:


I have just had an idea. If you want to leave 1c running on your live accounts whilst we test the new features, copy this over the top of the existing bool EnoughDistance(int type, double price):

Code: Select all

bool EnoughDistance(int type, double price)
{
   //Returns false if the is < MinDistanceBetweenTradesPips
   //between the price and the nearest order open prices.
   
   double pips = 0;
   
   //No market order yet
   if (type == OP_BUY)
      if (!BuyOpen)
         return(true);
      
   if (type == OP_SELL)
      if (!SellOpen)
         return(true);
      
   for (int cc = OrdersTotal() - 1; cc >= 0; cc--)
   {
      if (!BetterOrderSelect(cc, SELECT_BY_POS, MODE_TRADES) ) continue;
      if (OrderSymbol() != Symbol() ) continue;
      if (OrderMagicNumber() != MagicNumber) continue;
      if (OrderType() != type) continue;

      pips = MathAbs(price - OrderOpenPrice() ) * factor;
      if (pips < MinDistanceBetweenTrades)
         return(false);
   }//for (int cc = OrdersTotal() - 1; cc >= 0; cc--)

 
   //Got here, so OK to trade
   return(true);

   
   
}//End bool EnoughDistance(int type, double price)
This is accurate code to calculate that there is sufficient distance between the proposed new trade and the nearest existing ones.
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
TraderJoeForex
Trader
Posts: 1157
Joined: Fri Mar 08, 2013 10:29 pm
Location: South London

Holy Graily Bob's Candle Power

Post by TraderJoeForex »

This is great. Thanks Steve :good:
szfxtrader
Trader
Posts: 377
Joined: Sun Feb 10, 2013 9:36 am

Holy Graily Bob's Candle Power

Post by szfxtrader »

Thanks so much, Steve! Really appreciate your effort!
User avatar
rapple
Trader
Posts: 277
Joined: Fri Feb 21, 2014 10:56 pm
Location: Sydney, Australia

Holy Graily Bob's Candle Power

Post by rapple »

Thanks for the update Steve

I nuked all my trades at the end of last week and now the EA is making rapid gains again.

I have set the new version so that TJF setfile 'Nukes' all trades when the BUY:SELL unbalance hits 10.

Lets see how it goes

Thanks Richard
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's Candle Power

Post by SteveHopwood »

rapple » Sun Sep 24, 2017 11:13 pm wrote:Thanks for the update Steve

I nuked all my trades at the end of last week and now the EA is making rapid gains again.
Excellent. Just the sort of thingy I love to hear.

I forgot to explain folks, that I still have not solved the 'invalid stops' thingy. I have quietened it down a little by telling CP to sleep for 10 seconds after generating the error. Eventually it goes away. The problem is in the jumping stop function. Buggered if I know where. :arrrg:

Let's try a few more in case it knocks some sense in: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: ..............................


Nope. Hasn't helped.


: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.
firewight
Trader
Posts: 17
Joined: Wed Oct 21, 2015 7:39 am

Holy Graily Bob's Candle Power

Post by firewight »

Awesome, thanks for the new update!

This week I have decided to run some fresh tests on M15 and H1, just to see how they compare.
firewight
Trader
Posts: 17
Joined: Wed Oct 21, 2015 7:39 am

Holy Graily Bob's Candle Power

Post by firewight »

Hi Steve, a question if I may regarding the anti bunching distances.

Does that nullify any differences between timeframes? As 20 pips is 20 pips, regardless of M5 or H1, etc.

Just curious.

Cheers!

EDIT: I guess the candle opens could be vastly different, and the anti bunching only prevents a new trade if it is too close (most probably effecting the lower timeframes) but has no effect if candle opens farther than 20 pips away...
Last edited by firewight on Mon Sep 25, 2017 2:14 pm, edited 1 time in total.
User avatar
Wavegarrick
Trader
Posts: 1172
Joined: Sun Dec 30, 2012 11:21 am
Location: South Africa

Holy Graily Bob's Candle Power

Post by Wavegarrick »

Hi Steve,

I have much faith in the latest additions and especially with the offsetting functions.
Besides, my ambition is to create an EA that friends and relatives can open a $500 account, load up the EA and watch the account grow.
These words mean alot to me and speak volumes of the things you are trying to create for the greater community here at SHF. Never an easy task, I know, and will not be achieved easily, but sure as hell, an edge. :hi: :good:

Thanks Steve and Tjf.

Cheers
Leon
Post Reply

Return to “Thingy Bob EA's”