Old and defunct Holy Graily Bob

EA's inspired by nanningbob's work here, especially those based on his 240 Moving Average trend detection filter.
Locked
FxFoil
Trader
Posts: 42
Joined: Wed Dec 07, 2011 5:40 am

Holy Graily Bob

Post by FxFoil »

.
Last edited by FxFoil on Tue Dec 23, 2014 8:19 pm, edited 1 time in total.
fxpoison
Trader
Posts: 15
Joined: Sun May 26, 2013 4:14 pm

Holy Graily Bob

Post by fxpoison »

    If you are into simple (MT4i now FX Blue Apps: developer tools: EACopy v600)
FXB EACopy v6.JPG
SteveHopwood » Yesterday, 17:12 wrote: ...
We have already had people here unable even to put the EA into the correct folder. Care to imagine what will happen if I hit them with a library?

So, does anyone know of a reliable and free file distribution utility?

:xm:
You do not have the required permissions to view the files attached to this post.
User avatar
renexxxx
Trader
Posts: 860
Joined: Sat Dec 31, 2011 3:48 am

Holy Graily Bob

Post by renexxxx »

bazze » Tue Dec 23, 2014 4:02 am wrote:Will this effect the EA's behaviour when using this Library-code?
(File-Open Data Folder-MQL4-Libraries or Include...right? :smile: )
It does (effect the EA's behaviour). HGI 15.06 has been designed by Tommaso, such that it won't repaint (unless it is unloaded/reloaded). Consequently, repeated calls to HGI 15.06 for a given symbol, timeframe and shift, through the iCustom-function will always result in the same signal (again, unless HGB is unloaded/reloaded). However, when you call the library functions for a certain symbol, timeframe and shift, you will get the latest updated (and therefore possibly repainted) signal.
User avatar
boinvest
Trader
Posts: 142
Joined: Wed May 28, 2014 6:56 am
Location: Netherlands

Holy Graily Bob

Post by boinvest »

I not a very experienced coder, and new to MQL4 language.
I did go trough the code, to get a basic understanding of it, and trying to get a stoploss implemented in the Multiple Position trades. Well, thats still in progress.
But I stumbled upon this.. version 2d

Line 2228t/m 2240

Code: Select all

        else if (TradeComment == TrendTradeComment && TrendPendingTrade) 
         {
            type=OP_BUYSTOP;
            stype = " Buy stop ";
            price = GetNext20(OP_BUY);//Find the next 20
            price = CheckMinimumPipsTo20(price, price, type);//Is it >= MinPipsToNext20
            stop = CalculateStopLoss(OP_BUY, price, TradeComment);
            take = CalculateTakeProfit(OP_BUY, price, TradeComment);
            SendLots = RadLot;
            //Lot size calculated by risk         
            if (!CloseEnough(RadRiskPercent, 0) ) 
               SendLots = CalculateLotSize(price, NormalizeDouble(stop + (HiddenPips / factor), Digits), RadRiskPercent);
         }//if (TradeComment == TrendTradeComment) 
The conditions are for TrendTrades, but the used variables are for Rad trades.
So this would be:
Line 2228t/m 2240

Code: Select all

        else if (TradeComment == TrendTradeComment && TrendPendingTrade) 
         {
            type=OP_BUYSTOP;
            stype = " Buy stop ";
            price = GetNext20(OP_BUY);//Find the next 20
            price = CheckMinimumPipsTo20(price, price, type);//Is it >= MinPipsToNext20
            stop = CalculateStopLoss(OP_BUY, price, TradeComment);
            take = CalculateTakeProfit(OP_BUY, price, TradeComment);
            SendLots = TrendLot;
            //Lot size calculated by risk         
            if (!CloseEnough(TrendRiskPercent, 0) ) 
               SendLots = CalculateLotSize(price, NormalizeDouble(stop + (HiddenPips / factor), Digits), TrendRiskPercent);
         }//if (TradeComment == TrendTradeComment) 
The same goes for Buy_stop
Line 2323 to 2334

Code: Select all

        else if (TradeComment == TrendTradeComment && TrendPendingTrade) 
         {
            type=OP_SELLSTOP;
            stype = " Sell stop ";
            price = GetNext20(OP_SELL);//Get the next 20
            price = CheckMinimumPipsTo20(price, price, type);//Is it >= MinPipsToNext20
            SendLots = RadLot;
            //Lot size calculated by risk         
            if (!CloseEnough(RadRiskPercent, 0) ) 
               SendLots = CalculateLotSize(price, NormalizeDouble(stop - (HiddenPips / factor), Digits), RadRiskPercent); 
            price = GetNext20(OP_SELL);
         }//if (TradeComment == TrendTradeComment)
Changed the Rad variables to Range Variabeles:

Code: Select all

        else if (TradeComment == TrendTradeComment && TrendPendingTrade) 
         {
            type=OP_SELLSTOP;
            stype = " Sell stop ";
            price = GetNext20(OP_SELL);//Get the next 20
            price = CheckMinimumPipsTo20(price, price, type);//Is it >= MinPipsToNext20
            SendLots = TrendLot;
            //Lot size calculated by risk         
            if (!CloseEnough(TrendRiskPercent, 0) ) 
               SendLots = CalculateLotSize(price, NormalizeDouble(stop - (HiddenPips / factor), Digits), TrendRiskPercent); 
            price = GetNext20(OP_SELL);
         }//if (TradeComment == TrendTradeComment)
User avatar
autoabacus
Posts: 7
Joined: Wed Nov 05, 2014 9:09 pm
Location: Port Douglas, North Queensland, Australia

Holy Graily Bob

Post by autoabacus »

SteveHopwood » Tue Dec 23, 2014 3:12 am wrote:V 2d is in post 1
...
Tommaso has sent me the HGI library code - don't worry if you do not understand that.
...
I am envious! Some of us who do understand MQL programming and things like libraries, would LOVE to have access to the HGI library also.

I am writing my own EA to attempt to trade HGI. I am building a local DB of HGI signals plus full details of all trades (manual as well as those opened by the EA), recording lots of stuff that is not available via the Empty4 order functions, to be better able to manage running the trades (hopefully!), handling multi-level trades, doing partial closes, applying various logic for closes etc. I intend to build in the ability to manage manual trades and provide for manual intervention in individual trades opened by the EA via a dialog box without stopping the EA. The much greater programming power, almost C++, with structs, classes, enumerators, conditional compilation etc that is now available to us in Build 600+ helps a lot with this sort of stuff.

My EA is still very much a work in progress, however, and is weeks (at least) away from being ready for demo testing, let alone live running.

Having access to an HGI library would be great!
User avatar
droland
Trader
Posts: 52
Joined: Tue Nov 15, 2011 9:40 pm
Location: Vancouver, BC, Canada

Holy Graily Bob

Post by droland »

Steve, I had a perfectly aligned Trend and Wave signal on a couple of exotics. These were the first TrendWave combos I have seen since your update.

I got this error message:

USDNOK Holy Graily Bob OP_BUY order send failed with error(4051): invalid function parameter value

I couldn't trace where the error was coming from.

Dave
User avatar
boinvest
Trader
Posts: 142
Joined: Wed May 28, 2014 6:56 am
Location: Netherlands

Holy Graily Bob

Post by boinvest »

droland » Tue Dec 23, 2014 4:10 pm wrote:Steve, I had a perfectly aligned Trend and Wave signal on a couple of exotics. These were the first TrendWave combos I have seen since your update.

I got this error message:

USDNOK Holy Graily Bob OP_BUY order send failed with error(4051): invalid function parameter value

Dave
Which version of HGB are you using? And Empty4?
Is there something in your experts tab like:
Invalid lots amount value for OrderSend function.
Like I mentiod a page ago?

I am also getting these messages now on the EURCHF.
User avatar
droland
Trader
Posts: 52
Joined: Tue Nov 15, 2011 9:40 pm
Location: Vancouver, BC, Canada

Holy Graily Bob

Post by droland »

boinvest » Tue Dec 23, 2014 9:26 am wrote:
droland » Tue Dec 23, 2014 4:10 pm wrote:Steve, I had a perfectly aligned Trend and Wave signal on a couple of exotics. These were the first TrendWave combos I have seen since your update.

I got this error message:

USDNOK Holy Graily Bob OP_BUY order send failed with error(4051): invalid function parameter value

Dave
Which version of HGB are you using? And Empty4?
Is there something in your experts tab like:
Invalid lots amount value for OrderSend function.
Like I mentiod a page ago?

I am also getting these messages now on the EURCHF.
Yes, but it is only occurring on the TrendWave signal for me. Latest version of EA and using the latest version of Empty4. I do have the Invalid lots error but I can't seem to track down the bug.
User avatar
boinvest
Trader
Posts: 142
Joined: Wed May 28, 2014 6:56 am
Location: Netherlands

Holy Graily Bob

Post by boinvest »

using the latest version of Empty4. I do have the Invalid lots error but I can't seem to track down the bug.
I think I found the bug :twisted: You are using build 7+ :xm:

Serious: I have the error on build 670.
Me neither couldn't track the bug.
Dunno of it realy is a bug in the EA or, that Empty4 is bugging us.

But I found this, sent it in a pm to Steve earlier
Looking at the source of HGB, I am not very experienced with mql4.
Am I right that the Stoploss isnt sent and calculated with the TrendWave Trades?
But its set at 0
Line 2689

Code: Select all

      SendSingleTrade(Symbol(), OP_SELLSTOP, TradeComment, TrendWaveMultiTradeLot, price, 0, take);
And

Line 2715

Code: Select all

     SendSingleTrade(Symbol(), OP_BUYSTOP, TradeComment, TrendWaveMultiTradeLot, price, 0, take);


Where the Calculate stoploss should have been called.
To calculate the SL with TrendWaveMultiStopLoss.
and the 0 in above code should be replaced with "stop".

Sorry If i am wrong, and cause confusion..
But trying to learn something here :mrgreen:
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

Post by SteveHopwood »

boinvest » Tue Dec 23, 2014 1:21 pm wrote:I not a very experienced coder, and new to MQL4 language.
I did go trough the code, to get a basic understanding of it, and trying to get a stoploss implemented in the Multiple Position trades. Well, thats still in progress.
But I stumbled upon this.. version 2d

etc
Brilliant spot. Thanks. :clap:

Ok guys, whilst looking at the bloops that boinvest spotted, I found I had not actually added any Trend/Wave trading code. Everything else, but not that. We could have waited for quite a long time. :arrrg:

V 2e in post 1.

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

Return to “Thingy Bob EA's”