MT4 in a virtual machine ?

 

Hi, struggling with MT4's slow BT execution, MT4 only uses 12% of 1 of the proc's 8 cores...my testruns take forever.

Have anyone tried running MT4 in a virtual machine, maybe there is a tweak so it can utilize more of the available processor power ?

 
DayTrader:

Hi, struggling with MT4's slow BT execution, MT4 only uses 12% of 1 of the proc's 8 cores...my testruns take forever.

Have anyone tried running MT4 in a virtual machine, maybe there is a tweak so it can utilize more of the available processor power ?

That's fishy. I only have a two core machine and it uses 50% of both of them.
 
I'm using XP, What OS are you running it on ?
 
DayTrader:
I'm using XP, What OS are you running it on ?
I'm using XP too - XP Media centre version 2002, SP3. AMD Athlon 64 X2 4200+ 2.20GHz with 4GB physical RAM (reported as 3GB) And MT4.00 build 409
 

Let's try a speed test, and hopefully we can get some guys with SERIOUSLY POWERFUL machines to get interested and give it a go too.

Here is the test code ...

extern int stops = 250;

double lots= 0.0;

int init(){
   lots = MarketInfo(Symbol(), MODE_MINLOT );
}

int start(){
   static datetime lastTime=0;
   
   if( lastTime== Time[0] )
      return( 0 );
   
   lastTime= Time[0];
   
   double LONGtakeProfit = NormalizeDouble( Ask + stops*Point, Digits ); 
   double LONGstopLoss  =  NormalizeDouble( Ask - stops*Point, Digits ); 
   OrderSend( Symbol(), OP_BUY, lots, Ask, 10, LONGstopLoss, LONGtakeProfit );

   RefreshRates();
   double SHORTtakeProfit = NormalizeDouble( Bid - stops*Point, Digits );
   double SHORTstopLoss  =  NormalizeDouble ( Bid + stops*Point, Digits );
   OrderSend( Symbol(), OP_SELL, lots, Bid, 10, SHORTstopLoss, SHORTtakeProfit );

   return(0);
}

This is to be run on EURUSD H1 from 2011.1.1 to 2012.0.1

On my data this gives 12,354 trades at a PF of 0.85 (2 pip spread and a 5 digit broker)

The first phase of simulation takes around 1 min 27 seconds ("using M1") and this only uses around 5% of CPU time.

The second phase runs the CPU up to 50% and the whole runs takes 2 mins 04. During the run the hard drive is clattering around like a crazy thing.

 
dabbler:
I'm using XP too - XP Media centre version 2002, SP3. AMD Athlon 64 X2 4200+ 2.20GHz with 4GB physical RAM (reported as 3GB) And MT4.00 build 409
You don't have Hyperthreading as you are on AMD . . . the OP has a 4 core CPU and Hyperthreading (8 pseudo cores = 4 real cores) both your numbers make sense to me.
 
RaptorUK:
You don't have Hyperthreading as you are on AMD . . . the OP has a 4 core CPU and Hyperthreading (8 pseudo cores = 4 real cores) both your numbers make sense to me.
But I think you have one of them there serious machines. Could you give it a run -- pretty please?
 
dabbler:
But I think you have one of them there serious machines. Could you give it a run -- pretty please?

As it's you . . . give me a few mins.

 

LOL, error 131

Spread is 4.9

 
RaptorUK:

LOL, error 131

[EDIT] Fixed by getting lots using MODE_MINLOT in the init function.
 
RaptorUK:

Spread is 4.9

That won't affect the speed,of course, just the profit factor. I predict a PF of 0.67 ±0.04 with that spread and 25 pip SL=TP
Reason: