Holy Graily Bob 'n Thomas multi-pair and dashboard EA

EA's inspired by nanningbob's work here, especially those based on his 240 Moving Average trend detection filter.
Post Reply
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Holy Graily Bob 'n Thomas multi-pair and dashboard EA

Post by SteveHopwood »

SERIOUS WARNING
  • Most Forex traders lose all their money.
  • Using the robot posted here in trading Forex does not guarantee success.
  • Trading this robot could lead to serious financial loss.
  • Trading this robot without understanding its underlying trading strategies guarantees traders will lose their money.
  • This is not a set-and-forget ea; there is no such thing and anyone who tries to claim there is, is either stupid or lying. This ea requires frequent manual intervention.
  • At best, a trading robot is only 90% as good as the manual strategy it trades. At best. At worst, it can be much less effective. If the strategy is rubbish, so is the robot.
  • To trade this robot, you have to understand:

MAKE SURE YOU READ THIS POST http://www.stevehopwoodforex.com/phpBB3 ... 41#p111241 There was a Forex bloodbath on Jan 15th 2015 that you need to know about.

Everything you need to know is in the user guide apart from info about testing. Please read post 2.


:xm: :rocket:

Experimental version 3rd March 2018
This adds the ability to have HGBT calculate our basket cash take profits for us:
  • CalculateCashTargetDynamically turns this on/off.
  • TargetPerLot is the cash target per each unit of your lot size.
For example, the default lot size of 0.01 lots and TargetPerLot of 30 would calculate BasketTargetCash as $30. 0.02 would give a target of $60 and so on.

It is only natural caution that makes this version 'experimental'. The code is straightforward and the screen display is correct; just check on demo first before going live with it.

Matters of general interest
Go here to download and run the script that will fill your platform's missing chart history: http://www.stevehopwoodforex.com/phpBB3 ... f=15&t=254
Read this post:
http://www.stevehopwoodforex.com/phpBB3 ... p?f=6&t=78 Newbie traders, read this for inspiration and warning. Those of you who have suffered losses, read it for inspiration.

Masterly summary of hedging: http://www.forexfactory.com/showthread. ... ost4977179

EA coding
I receive may requests to code EA's. Traders, if I code your EA for free, then I will share it here. If you want me to code your EA without sharing, then my fee is $100 payable into my paypal account. I explain why at http://www.stevehopwoodforex.com/phpBB3 ... ?f=15&t=79, at the bottom of the post.

Useful utilities/EA's/scripts -
You do not have the required permissions to view the files attached to this post.
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. [email protected] 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: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Holy Graily Bob 'n Thomas multi-pair and dashboard EA

Post by SteveHopwood »

Here is a pm that Thomas sent me yesterday:
tomele wrote:Hi Steve.

Why dont we give it the ability to write to the database as a next step? You and some other traders are running those tests anyway.

Let me explain our newest technology for collecting meaningful results: Every time a trade is fired, we write a little json-formatted file that contains all EA settings we are interested in. At the end of the week, these informations are uploaded to the database together with the trade informations. Then those files get deleted. Of course this feature can be turned off, if one doesnt want to participate in the testing project. The modification for each EA consists of 4 new lines to call a specific MQH. And it is very simple to upload the data. Just input your nick and your key.

If you are interested, I would provide the MQH and work the 4 lines in. The only thing we should discuss are the parameters to store. I think of

TradingTimeFrame
TradeTrendArrows,TradeBlueWavyLines
HgiCloseOnOppositeSignal,HgiCloseOnYellowWavy
UseHtf1,UseHtf2,UseHtf3
HigherTimeFrame1,HigherTimeFrame2,HigherTimeFrame3
HtfMinimumAlignment
TakeTrendTrades,TakeRetraceTrades
MaxTradesAllowed
MinimumDistanceBetweenSignalsPips
MinMinutesBetweenTrades
EquityIncreaseTargetCash

What do you think?

:rocket:

Cheers
Fantastic stuff. Here is his pm today, explaining exactly what testers need:
tomele wrote:To run the EA and write the data files they need:
* The EA in MQL4/Experts
A brief interjection here: the EA is in post 1. The rest are in Thomas' thread.
To upload the data at the end of the week they need:
* The Trade2MySQL script in MQL4/Scripts
* The libmysql.dll library in MQL4/Libraries
* An authorization key for each Empty4 installation

The files for uploading can be found in this post: http://www.stevehopwoodforex.com/phpBB3 ... 94#p159644, but no need to download them now. There will be a new version of the script until next Friday.

Uploading will be simple as: Execute the script, enter your nickname and key and press OK. This must be done once per week for each Empty4 installation.

In order to receive an authorization key, they must send me a PM with the account numbers of all Empty4 installations they want to submit data from. I will then send a key for each installation.

Cheers

:rocket:

It would be great if tests were not duplicated, for now. At the end of this post is a section with each tester's settings, so check the list before trying combinations that are already being tested. To get your name added to the list, post it here in the thread. I will copy it to this post and then delete yours.

:xm: :rocket:

--------------------------------------------------------------------------------------------------
So we are all singing off the same sheet, can you set up your demo thus:
Currency: USD
Starting balance: $500
Lot size: 0.01

Settings being tested. We are interested in:
TradingTimeFrame
UseHtf1,UseHtf2,UseHtf3
HigherTimeFrame1,HigherTimeFrame2,HigherTimeFrame3
HtfMinimumAlignment
TakeTrendTrades,TakeRetraceTrades
TradeTrendArrows,TradeBlueWavyLines
HgiCloseOnOppositeSignal,HgiCloseOnYellowWavy
MaxTradesAllowed
MinimumDistanceBetweenSignalsPips
MinMinutesBetweenTrades
EquityIncreaseTargetCash


SteveHopwood: M15 trading time; H1/4/D1 higher time frames all enabled and with HtfMinimumAlignment=2; trading trend arrows and blue wavy lines; only taking the trend trades; not closing on an opposite direction signal or yellow wavy; max trades 5 at 20 pips intervals in the grid and an equity increase target of $30; MinMinutesBetweenTrades=0

BarraCoda
Long story short, I want to play the exactly thingy Steve does, but M30 instead of M15

Dragonian
Steve's settings with M5 trading time frame and M15, H1 and H4 higher time frames. All pairs 24hr trading.

bishopdotun
M30 trading time;
H1/H4/D1 higher time frames all enabled
HtfMinimumAlignment=2;
Trading trend arrows and blue wavy lines;
Only taking the trend trades;
not closing on an opposite direction signal or yellow wavy;
max trades 5 at 30 pips intervals in the grid and an equity increase target of $50;
MinMinutesBetweenTrades=60
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. [email protected] 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.
bishopdotun
Trader
Posts: 38
Joined: Fri Nov 23, 2012 6:55 pm

Holy Graily Bob 'n Thomas multi-pair and dashboard EA

Post by bishopdotun »

Thank you steve for putting this together so fast.

You gave me even more than I asked. :yahoo: :clap:

I spotted something you kindly look at. The bot keeps opening and closing. See the trade time and the dash in the attached picture.
You do not have the required permissions to view the files attached to this post.
User avatar
Wavegarrick
Trader
Posts: 1172
Joined: Sun Dec 30, 2012 11:21 am
Location: South Africa

Holy Graily Bob 'n Thomas multi-pair and dashboard EA

Post by Wavegarrick »

The bot keeps opening and closing. See the trade time and the dash in the attached picture.
Bishopdotun,

I do not have this problem. You will have to be more specific, for Steve to have a look. Have you set "Hgi close on yellow wavy" to true? I can imagine that you will have regular closures especially on the 5min t/frame and more so with every tick mode set to true.

Cheers
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Holy Graily Bob 'n Thomas multi-pair and dashboard EA

Post by SteveHopwood »

I have corrected the trading time frame HGI display fault. Post 1 as usual.

It is an easy DIY. Copy this over the top of the existing function:

Code: Select all

void DisplayTextLabel(string text, int xpos, int ypos, ENUM_ANCHOR_POINT anchor=ANCHOR_LEFT_UPPER, string pair="", int tf=0, color scol=clrNONE)
{

   //Decide which colors to use for the data in the dashboard
   color ActTextColor=TextColor;
   color ActPosNumberColor=PosNumberColor;
   color ActNegNumberColor=NegNumberColor;
   if(!ColoredDashboard)
   {
      ActTextColor=colour;
      ActPosNumberColor=UpSignalColor;
      ActNegNumberColor=DnSignalColor;
   }
   
   if (scol==clrNONE)
   {
      if(StringFind(text,"pips")>0)
         scol=ActTextColor;
      else if(StringToDouble(text)>0)
         scol=ActPosNumberColor;
      else if(StringToDouble(text)<0)
         scol=ActNegNumberColor;
   }
   
   //Select the color for the actual signal
   if (text=="Long"||text=="Blue"||text=="Up arrow"||text=="Up wave"||text=="Up"||text==tradablelong||text==hgiup) scol=UpSignalColor;
   else if (text=="Short"||text=="Red"||text=="Dn arrow"||text=="Dn wave"||text=="Down"||text==tradableshort||text==hgidown) scol=DnSignalColor;
   else if (text=="No signal"||text=="White"||text==untradable||text==hginosignal)scol=NoSignalColor;
   else if (text=="Yellow range wave"||text==hgiranging)scol=Yellow;
   
   //Select the symbol for the actual signal
   if (text=="Long"||text=="Blue"||text=="Up arrow"||text=="Up"||text==tradablelong||text==hgiup) text="á";
   else if (text=="Short"||text=="Red"||text=="Dn arrow"||text=="Down"||text==tradableshort||text==hgidown) text="â";
   else if (text=="Up wave"||text=="Dn wave"||text=="Yellow range wave"||text==hgiranging) text="h";
   else if (text=="Tradable long"||text=="Tradable short") text="ü";
   else if (text=="No signal"||text=="White"||text=="Not tradable"||text==untradable||text==hginosignal)text="û";
   
   //Select font and font size for the actual symbol
   string font=fontName;
   int sise=fontSize;
   if (text=="á"||text=="â"||text=="h"||text=="ü")
   {
      font="Wingdings";
      sise=(int)MathRound(fontSize*1.2);
   }
   if (text=="û")
   {
      font="Wingdings";
      sise=(int)MathRound(fontSize*1.5);
   }
   
   //Define the name for the actual label
   string lab_str;
   if (pair=="") 
      //Text label
      lab_str = "OAM-X" + IntegerToString(xpos) + "Y" + IntegerToString(ypos);   
   else if (pair=="OPENALL") 
      //Open all charts button
      lab_str = "OAM-OPENALL-X" + IntegerToString(xpos) + "Y" + IntegerToString(ypos);   
   else if (pair=="OPENTRADES") 
      //Open all trades button
      lab_str = "OAM-OPENTRADES-X" + IntegerToString(xpos) + "Y" + IntegerToString(ypos);   
   else if (pair=="TOUCH") 
      //Touch all charts button
      lab_str = "OAM-TOUCH-X" + IntegerToString(xpos) + "Y" + IntegerToString(ypos);   
   else if (pair=="CLOSE") 
      //Close other charts button
      lab_str = "OAM-CLOSE-X" + IntegerToString(xpos) + "Y" + IntegerToString(ypos);   
   else if (pair=="SWITCH") 
      //Switch displays button
      lab_str = "OAM-SWITCH-X" + IntegerToString(xpos) + "Y" + IntegerToString(ypos);   
   else if (pair=="HIDEPIPS") 
      //Hide pips button
      lab_str = "OAM-HIDEPIPS-X" + IntegerToString(xpos) + "Y" + IntegerToString(ypos);   
   else if (pair=="HIDECASH") 
      //Hide cash button
      lab_str = "OAM-HIDECASH-X" + IntegerToString(xpos) + "Y" + IntegerToString(ypos);   
   else if (pair=="HIDESWAP") 
      //Hide swap button
      lab_str = "OAM-HIDESWAP-X" + IntegerToString(xpos) + "Y" + IntegerToString(ypos);   
   else if (pair=="HIDESPREAD") 
      //Hide spread button
      lab_str = "OAM-HIDESPREAD-X" + IntegerToString(xpos) + "Y" + IntegerToString(ypos);   
   else 
      //Clickable label needs pair and timeframe for OpenChart()
      lab_str = "OAM-BTN-" + pair + "-" + IntegerToString(tf)+"-X" + IntegerToString(xpos) + "Y" + IntegerToString(ypos);   

   //Create the label if it doesnt exist
   if(ObjectFind(0,lab_str)<0)
   {
      ObjectCreate(lab_str, OBJ_LABEL, 0, 0, 0);
      ObjectSet(lab_str, OBJPROP_CORNER, 0);
      ObjectSet(lab_str, OBJPROP_XDISTANCE, xpos); 
      ObjectSet(lab_str, OBJPROP_YDISTANCE, ypos); 
      ObjectSet(lab_str, OBJPROP_BACK, false);
      ObjectSetInteger(0,lab_str,OBJPROP_ANCHOR,anchor); 
   }
   
   //Update the text in the label
   ObjectSetText(lab_str, text, sise, font, scol);
   
}//End void DisplayTextLabel(string text, int xpos, int ypos, ENUM_ANCHOR_POINT anchor=ANCHOR_LEFT_UPPER)

: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. [email protected] 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.
bishopdotun
Trader
Posts: 38
Joined: Fri Nov 23, 2012 6:55 pm

Holy Graily Bob 'n Thomas multi-pair and dashboard EA

Post by bishopdotun »

Wavegarrick » Mon Feb 12, 2018 5:30 am wrote:
The bot keeps opening and closing. See the trade time and the dash in the attached picture.
Bishopdotun,

I do not have this problem. You will have to be more specific, for Steve to have a look. Have you set "Hgi close on yellow wavy" to true? I can imagine that you will have regular closures especially on the 5min t/frame and more so with every tick mode set to true.

Cheers
Wave,

I meant that it was opening and closing trades within seconds.
-retrace: false
-hedge: false
-close on opposite signal false

Based on these conditions, the bot should not be closing yet.
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Holy Graily Bob 'n Thomas multi-pair and dashboard EA

Post by SteveHopwood »

Problem spotted and solved in V 1a in post 1. It was one of my usual copy/paste/forgot-to-edit bloops.

DIY version. Do a search for "//Opposite direction trading time frame signal". There are two instances.

Copy this over the top of the first block of code in the buy section. There is an extra conditional:

Code: Select all

         //Opposite direction trading time frame signal
         if (!CloseThisTrade)
            if (HgiCloseOnOppositeSignal)
               if (TradeHgiStatus[PairIndex] == hgidown)
                  CloseThisTrade = true;
Copy this over the top of the block in the sell section. There is the extra conditional and the bloop fix:

Code: Select all

         //Opposite direction trading time frame signal
         if (!CloseThisTrade)
            if (HgiCloseOnOppositeSignal)
               if (TradeHgiStatus[PairIndex] == hgiup)
               CloseThisTrade = 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. [email protected] 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
Wavegarrick
Trader
Posts: 1172
Joined: Sun Dec 30, 2012 11:21 am
Location: South Africa

Holy Graily Bob 'n Thomas multi-pair and dashboard EA

Post by Wavegarrick »

Yes you are correct Bishopdotun. I realised after starting a second setfile. Anyway Steve corrected it now. Thanks for this Ea Steve.

Cheers
Leon
bishopdotun
Trader
Posts: 38
Joined: Fri Nov 23, 2012 6:55 pm

Holy Graily Bob 'n Thomas multi-pair and dashboard EA

Post by bishopdotun »

Wavegarrick » Mon Feb 12, 2018 9:39 am wrote:Yes you are correct Bishopdotun. I realised after starting a second setfile. Anyway Steve corrected it now. Thanks for this Ea Steve.

Cheers
Leon
Yes

Fixed now. DIY mode.

Thank you Steve for your generosity.

Would really like to know of any video tutorial on coding EAs. It is a priceless skill.

Steve you have any material that could be of help. I really want to learn.
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Holy Graily Bob 'n Thomas multi-pair and dashboard EA

Post by SteveHopwood »

V 1b is in post 1, fixing a bloop in the minimum distance between signals code for grid trading.

DIY:
Do a search for "double MinDistanceBetweenTrades=0;"

Delete that line of code and press F7 to compile. Double click the error message and it will take you to this line of code:
if (pips < MinDistanceBetweenTrades)

Change it to:
if (pips < MinimumDistanceBetweenSignalsPips)

then recompile.

: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. [email protected] 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”