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
Reamasesa
Trader
Posts: 14
Joined: Sun Aug 31, 2014 2:55 pm

Holy Graily Bob 'n Grid

Post by Reamasesa »

Cayrema » Mon May 09, 2016 5:57 am wrote:Hello family.
I want to thank Steve and the others who have been involved in the creation of this great EA. I have been using v1w with success the last few days and when Steve came up with the experimental version I threw it on my demo. This morning I have been receiving errors from the experimental version. The bot places pending stops, then a few minutes later it deletes them. Is anybody else having the same error or am I the only one?
Am using Global Prime demo.
Hi,

I had something like that too with nearly all versions. Try disabling the equity/margin check, I'm not in front of my charts so I don't remember but it's "kiwi" something.
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 »

Ehup folks.

You may as well take the Experimental version off demo for now - I have. I will sort out the problem later.

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

I did not have to look for the solution myself - Heraclees had already sent it in a pm. :clap: :clap: :clap: :clap: :clap:

line 5860:
if (PendingTradesTotal < (GridSize * 2) )//There should be up to GridSize * 2

should be:
if (PendingTradesTotal < GridSize)

The grid is GridSize * 2 when trading the original systems; this one only has GridSize trades. It just needs a teensy bit of footwork to accommodate all three systems and I will do that later.

Peasant's fix in 1a in post 1.

1a send a whole bunch of pendings as soon as I made the fix, and they have remained in place.

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

Experimental version 1b is in post one, with an enhancement inspired by Heraclees.

Taking a buy signal, the ea will only add pending buys if the market falls, when none of the originals have filled.

Copy this over the top of void CanWeAddAnotherPendingTrade() to make the changes yourself.

:xm:

Code: Select all

void CanWeAddAnotherPendingTrade()
{

   //This function adds more pending trades if the market initially moves in the opposite direction 
   //of the signal.
   
   double price = 0;
   bool result = false;
   double stop = 0, take = 0;
   
   //Another buy stop?
   if (!BuyOpen)//Only if the trading sequence has not already started
      if (BuyStopOpen)
      {
         price = NormalizeDouble(LowestBuyStopPrice - ((DistanceBetweenTrades * 2) / factor), Digits);
         if (Bid <= price)
            if (!DoesTradeExist(OP_BUYSTOP, price))
            {
               take = CalculateTakeProfit(OP_BUY, price);
               stop = CalculateStopLoss(OP_BUY, price);
               result = SendSingleTrade(Symbol(), OP_BUYSTOP, TradeCommentCOT, Lot, price, stop, take);
            }//if (!DoesTradeExist(OP_BUYSTOP, price))
      }//if (BuyStopOpen)


   //Another sell stop?
   if (!SellOpen)
      if (SellStopOpen)
      {
         price = NormalizeDouble(HighestSellStopPrice + ((DistanceBetweenTrades * 2) / factor), Digits);
         if (Bid >= price)
            if (!DoesTradeExist(OP_SELLSTOP, price))
            {
               take = CalculateTakeProfit(OP_SELL, price);
               stop = CalculateStopLoss(OP_SELL, price);
               result = SendSingleTrade(Symbol(), OP_SELLSTOP, TradeCommentCOT, Lot, price, stop, take);
            }//if (!DoesTradeExist(OP_BUYSTOP, price))
      }//if (SellStopOpen)


}//End void CanWeAddAnotherPendingTrade()
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.
Reamasesa
Trader
Posts: 14
Joined: Sun Aug 31, 2014 2:55 pm

Holy Graily Bob 'n Grid

Post by Reamasesa »

Hi,

Getting tons of "invalid stops" all of a sudden from the experimental version. I can't attach my set file, it used to work perfectly with the regular version and the first experimental version.
Not sure what had changed.

Grid size is 5, distance is 20, no ATR for grid or anything.

Thanks.
piter44
Trader
Posts: 37
Joined: Wed Oct 08, 2014 1:09 pm

Holy Graily Bob 'n Grid

Post by piter44 »

Reamasesa » Mon May 09, 2016 4:08 pm wrote:Hi,

Getting tons of "invalid stops" all of a sudden from the experimental version. I can't attach my set file, it used to work perfectly with the regular version and the first experimental version.
Not sure what had changed.

Grid size is 5, distance is 20, no ATR for grid or anything.

Thanks.
Same here with the experimental version, I receive dozen of errors 130: invalid stop
senzhi

Holy Graily Bob 'n Grid

Post by senzhi »

piter44 » Tue May 10, 2016 7:50 am wrote:
Reamasesa » Mon May 09, 2016 4:08 pm wrote:Hi,

Getting tons of "invalid stops" all of a sudden from the experimental version. I can't attach my set file, it used to work perfectly with the regular version and the first experimental version.
Not sure what had changed.

Grid size is 5, distance is 20, no ATR for grid or anything.

Thanks.
Same here with the experimental version, I receive dozen of errors 130: invalid stop
Confirmed, albeit only where the stop orders would have replaced the usual stop limits. I get the error but the stop orders are still placed.

Mind you, not GP, Darwinex demo.
Maximilian
Trader
Posts: 150
Joined: Sat Sep 06, 2014 2:43 pm

Holy Graily Bob 'n Grid

Post by Maximilian »

Hi guys,
see the following charts. Offsetting worked like a charm. Anyhow now the positions (EURUSD) are not hedged anymore which lead to the situation, that there are no SLs/ TPs and in case of the downtrend continuation a leaky toilet. I was thinking about solutions but my shrinking brain is too narrowminded to give me a clue if the following points are valid and worth to automate: either send a new (full? / trend following?) grid if the last hedged position is closed because of offsetting, or set emergency SLs and wait for trend reversal. Last one could obvoiusly result in even deeper DD for a longer period. When I had the time I did send manually a full grid, which worked quite well.
What do you do in such situations? Or did I miss some thing?
Cheers Max
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 »

Maximilian » Tue May 10, 2016 7:56 am wrote:Hi guys,
see the following charts. Offsetting worked like a charm. Anyhow now the positions (EURUSD) are not hedged anymore which lead to the situation, that there are no SLs/ TPs and in case of the downtrend continuation a leaky toilet. I was thinking about solutions but my shrinking brain is too narrowminded to give me a clue if the following points are valid and worth to automate: either send a new (full? / trend following?) grid if the last hedged position is closed because of offsetting, or set emergency SLs and wait for trend reversal. Last one could obvoiusly result in even deeper DD for a longer period. When I had the time I did send manually a full grid, which worked quite well.
What do you do in such situations? Or did I miss some thing?
Cheers Max
I have been managing these situations by sending a new grid in the appropriate direction. On my todo list is generating some scripts to do this for those of us viewing our trades on a different machine to that which is doing the trading.

I will have a look and see if the bot can be coded to deal with the situation you describe.

: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.
Maximilian
Trader
Posts: 150
Joined: Sat Sep 06, 2014 2:43 pm

Holy Graily Bob 'n Grid

Post by Maximilian »

I have been managing these situations by sending a new grid in the appropriate direction. On my todo list is generating some scripts to do this for those of us viewing our trades on a different machine to that which is doing the trading.

I will have a look and see if the bot can be coded to deal with the situation you describe.

:xm:
:clap: :good: :yahoo:
Post Reply

Return to “Thingy Bob EA's”