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

Old and defunct Holy Graily Bob
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3966
Page 62 of 129
Author:  FxFoil [ Mon Dec 22, 2014 9:36 pm ]
Post subject:  Holy Graily Bob

.
Author:  fxpoison [ Tue Dec 23, 2014 7:11 am ]
Post subject:  Holy Graily Bob

    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:
Author:  renexxxx [ Tue Dec 23, 2014 8:37 am ]
Post subject:  Holy Graily Bob

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.
Author:  boinvest [ Tue Dec 23, 2014 1:21 pm ]
Post subject:  Holy Graily Bob

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)
Author:  autoabacus [ Tue Dec 23, 2014 2:12 pm ]
Post subject:  Holy Graily Bob

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!
Author:  droland [ Tue Dec 23, 2014 4:10 pm ]
Post subject:  Holy Graily Bob

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
Author:  boinvest [ Tue Dec 23, 2014 4:26 pm ]
Post subject:  Holy Graily Bob

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.
Author:  droland [ Tue Dec 23, 2014 4:48 pm ]
Post subject:  Holy Graily Bob

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.
Author:  boinvest [ Tue Dec 23, 2014 5:04 pm ]
Post subject:  Holy Graily Bob

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:
Author:  SteveHopwood [ Tue Dec 23, 2014 6:28 pm ]
Post subject:  Holy Graily Bob

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:
All times are UTC Page 62 of 129