Laptop overheats and reboots after 5 hours because CPU runs at 100%

 
I've got a P850 laptop that I don't use much, and I'd like to run 100-hour MT4 optimizations on it.

The problem is that MT4 runs the CPU at 100% and after about 5 hours, the system overheats and reboots itself.

Does anyone know of a way to force MT4 to run at 50% CPU utilization? Is it possible?
 
u can reduce the clock speed on some PCs.. in the Bios..
 
> u can reduce the clock speed on some PCs.. in the Bios.

Unfortunately, not on this one.

Also, I forgot to mention, I'm running Windows 2000 Server on it.
 
My friend Mage suggested I import kernel32.dll and use the SleepEx() function, so we came up with this solution which reduces CPU utilization under 50%.

I don't know if this solution will fix my problem yet.

I just started running a 65,000 combination optimization using a P850 laptop and it has 690 hours to go. If I can get past 8 or 24 hours, I'll assume it works and then seek to increase the CPU utilization a little more by testing every few minutes & seconds, instead of just once a minute.

////////////////////////////////////////////////////////////////
// REDUCE CPU UTILIZATION - Part 1 of 2
// Be sure to turn ON 'allow import dlls', using "Tools" "Options" on the menu
#import "kernel32.dll"
     int SleepEx(int wait, int io);
////////////////////////////////////////////////////////////////


int start()
{


////////////////////////////////////////////////////////////////
// REDUCE CPU UTILIZATION - Part 2 of 2
if(Seconds()==30) { SleepEx(1,0); }
////////////////////////////////////////////////////////////////



The code above shows the relative position of where it should be placed (ie. just before and after the start() function).

- Vooch

P.S. Be sure to turn ON 'allow import dlls', using "Tools" "Options" on the menu

 
Holy Dooly !!!!
You running an optimisation that's going to take a month to complete ?? :) I sure hope you don't get a power glitch/failure during that time.

Martin
 
UPDATE: The laptop survived last night. It's been running an MT4 optimization over 17 hours now without a reboot.

Thanks Mage!!!

- Vooch
 
well done!!
 
Good to see that it did work.

For anyone that is wondering the reason to use the SleepEx function and not the Sleep function is only because Sleep is already a function in MT. However when back testing MT seems to ignore it.
Reason: