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

Holy Graily Bob
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4154
Page 23 of 32
Author:  milanese [ Sat Apr 18, 2015 11:14 am ]
Post subject:  Holy Graily Bob

SteveHopwood » Sat Apr 18, 2015 10:46 am wrote:Does anybody know a way to allow one Empty4 platform send a Global Variable to another platform?

Here is what I am thinking. We have a demo account that we use for HGB. There is a little manager on the demo that places a 'don't trade yet guys' Global Variable on our real trading platform. Once the demo account has gone into DD by x pips, the manager sends the trading account a Global that says, 'up and at them tigers cos the retrace has happened.' Then, when the demo has made its usual profit run of 1000 pips it replaces the 'don't trade yet guys' back on the trading platform.

So far as I know, EA's can only read/write files from and to specified folders in the installation folder, so we need a way of getting the messages from the demo platform to the trading platform.

:xm:
this https://www.mql5.com/en/articles/1361 could be interesting...

Cheers :)

Tommaso
Author:  art [ Sat Apr 18, 2015 11:59 am ]
Post subject:  Holy Graily Bob

Hi rene, interesting your results are different to mine, i'm with global prime, using the same pairs as you and the same period this week as you, and you can see the difference, i'm also using ootb settings 4 hour charts
Author:  art [ Sat Apr 18, 2015 11:59 am ]
Post subject:  Holy Graily Bob

forgot to add ignore the XAUUSD trades
Author:  SteveHopwood [ Sat Apr 18, 2015 12:09 pm ]
Post subject:  Holy Graily Bob

Thanks guys. I will have a look.

I also had a browse round mql help and it looks as though this is addressed through come commands that I had not seen before. One is FILE_COMMON - The file path in the common folder of all client terminals \Terminal\Common\Files. Flag is used in FileOpen(), FileCopy(), FileMove() and in FileIsExist() functions.

Anybody here used them? It would be great to have some code snippets to hack.

:xm:
Author:  SteveHopwood [ Sat Apr 18, 2015 3:13 pm ]
Post subject:  Holy Graily Bob

I have what I need. It turns out there is a 'common' folder and every Empty4 installation knows where it is. It is accessed using FILE_COMMON as one of the FileOpenRead/Write parameters, as in

Code: Select all

string file = "HGB trade command";
  //--- open the file
   ResetLastError();
   
   //Open for writing
   int file_handle = FileOpen( file, FILE_READ|FILE_CSV|FILE_COMMON );
I just used a script to open a file to write "Ehup" and popped this at the start of HGB's OnInit() to see if it works, and it does:

Code: Select all

   if (Symbol() != "EURUSD") return(0);
   string file = "HGB trade command";
  //--- open the file
   ResetLastError();
   
   //Open for writing
   int file_handle = FileOpen( file, FILE_READ|FILE_CSV|FILE_COMMON );
   if ( file_handle != INVALID_HANDLE ) 
   {
      string text = FileReadString(file_handle);
      FileClose(file_handle);
      Alert(text);
   }//if ( file_handle != INVALID_HANDLE ) 
   else
      Alert("Failed to open %s file, Error code = %d",file,GetLastError());
I duly get an Alerts saying, "Ehup" when I do an HGB recompile.

Lovely.

:xm:
Author:  renexxxx [ Sat Apr 18, 2015 11:06 pm ]
Post subject:  Holy Graily Bob

Another way to communicate between two instances of Empty4, is by using SharedVar from fx1.net. I have been using this in the past and it works extremely well. You need to run a SharedVar server process, which is basically an in-memory database. For time-critical communication, this is the best option.
Author:  renexxxx [ Sat Apr 18, 2015 11:34 pm ]
Post subject:  Holy Graily Bob

art » Sat Apr 18, 2015 9:59 pm wrote:Hi rene, interesting your results are different to mine, i'm with global prime, using the same pairs as you and the same period this week as you, and you can see the difference, i'm also using ootb settings 4 hour charts
Hi Art,
Your results are different, but not too different.

I am only trading: AUDUSD, EURGBP, EURJPY, EURUSD, GBPJPY, GBPUSD, NZDUSD, USDCAD and USDJPY.

In your results, you also have GBPCAD, USDCHF and XAUUSD. Still we have roughly the same amount of PIPs.

I have found that HGB works really well on EURUSD (Week 1: 590 PIPs, Week 2: 495 PIPs, Week 3: 62 PIPs, Week 4: 209 PIPs, Week 5: 40 PIPs, Week 6: 312 PIPs) for a total of 1707 PIPs over 6 weeks. I never had a negative week for EURUSD, although in week 3 the total HGB result was negative (-168 PIPs).

However, this is only a 6 weeks test and it would be too early to draw any conclusions.
Author:  trader689 [ Sat Apr 18, 2015 11:52 pm ]
Post subject:  Holy Graily Bob

hey steve,is it possible to ask for an update regarding this method? many thanks
SteveHopwood » Wed Apr 01, 2015 6:02 pm wrote:Early days, but this week this tactic has worked well for me: set HGB going as early as possible in the London session; use the basket manager to close all the trades at $30 profit (0.01 lots GP account) and have HGB set to stop trading for the day once this profit level is achieved.

I then close down the platform and do not allow any further trading until the next London session.

Don't know if this is a long-term winning strategy and we might still need a market-is-overextented filter; we shall see.

:xm:
Author:  Pipologist [ Mon Apr 20, 2015 5:03 am ]
Post subject:  Holy Graily Bob

renexxxx » Sun Apr 19, 2015 12:34 am wrote: Hi Art,
Your results are different, but not too different.

I am only trading: AUDUSD, EURGBP, EURJPY, EURUSD, GBPJPY, GBPUSD, NZDUSD, USDCAD and USDJPY.

In your results, you also have GBPCAD, USDCHF and XAUUSD. Still we have roughly the same amount of PIPs.

I have found that HGB works really well on EURUSD (Week 1: 590 PIPs, Week 2: 495 PIPs, Week 3: 62 PIPs, Week 4: 209 PIPs, Week 5: 40 PIPs, Week 6: 312 PIPs) for a total of 1707 PIPs over 6 weeks. I never had a negative week for EURUSD, although in week 3 the total HGB result was negative (-168 PIPs).

However, this is only a 6 weeks test and it would be too early to draw any conclusions.
Hi Rene,

I have a question. Can you please clarify if you got the 6 weeks result for EURUSD with HGB in conjuction with BasketMirror EA, or with manual intervention, or just hand off. The reason I am asking this question is because I am using PPoS at the moment and am contemplating on moving on to HGB with manual intervention, or perhaps with BasketMirror EA.

Any suggestion you make is greatly appreciated.

Cheers,

Farhad
Author:  renexxxx [ Mon Apr 20, 2015 6:43 am ]
Post subject:  Holy Graily Bob

Pipologist » Mon Apr 20, 2015 3:03 pm wrote: Hi Rene,

I have a question. Can you please clarify if you got the 6 weeks result for EURUSD with HGB in conjuction with BasketMirror EA, or with manual intervention, or just hand off. The reason I am asking this question is because I am using PPoS at the moment and am contemplating on moving on to HGB with manual intervention, or perhaps with BasketMirror EA.

Any suggestion you make is greatly appreciated.

Cheers,

Farhad
Farhad,
The results I published in this post are purely from trading HGB hands-off, on H4, 24x5. For what it's worth, my results testing PPoS have not been that great, but you have to make up your own mind about what you want to trade.

Cheers ... Rene.
All times are UTC Page 23 of 32