Improving CPU speed

MPTM's new home
User avatar
RisklessPips
Trader
Posts: 246
Joined: Mon May 09, 2016 2:24 pm
Location: Nairobi, Kenya

Improving CPU speed

Post by RisklessPips »

HI

Hoping this query fits in here rather than coders forum

I am using indicators and occasionally EA's and scripts found on this great site.

I have the following indi's on my charts HGI, 3 Semafor, sixths_SQ, 2 ema's and NB 4th Daily S&R. I am also using CSS.

I have a profile for each TF from H1 thru to MN and on each profile I have 24 charts - 23 of these have all the indicators except the CSS and 1 has the CSS with nothing else.

This setup is making my CPU is perform sluggishly particularly when loading the profiles.

I amended the CSS to look at 30 rather than 200 bars (OOTB).
I have amended the HGI so the update seconds delay is now 60 rather than the 30 (OOTB)
My bar count on the 6ths is 150 up from 120 (OOTB)

Short of buying a new workstation is there anything else I can do to speed my machine up ?

Thanks

Charles

Update - Changed max bars in history (Tools=>options=>charts) to 3000 and max bars on chart to 750 - in addition to above changes there is a noticeable change in speed.
Trading is a mind game - good job I have a brain
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.

Improving CPU speed

Post by SteveHopwood »

I am adding a reply here to draw attention to this and not because I have anything useful to add.

Notice RP's elevation to The Imperial Green folks? Helping Charles will also help the rest of us. He is one of the Great Guys.

All suggestions by people who know what they are talking about will be gratefully received.

: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.
qvintus
Trader
Posts: 220
Joined: Sat Nov 30, 2013 7:02 pm

Improving CPU speed

Post by qvintus »

Hi RP (and everybody else)
Here is my suggestion - If you have a PC with several processor cores (you should), assign only one core per Empty4. If you are running 4 Empty4 terminals at the same time, let them work on core 1/2/3/4.

Here is a guide:
http://www.windowscentral.com/assign-sp ... windows-10

Please let me know if this was of any help ;)
For me it was amazing how much CPU % was saved after this settings.

Remember that it revert changes back to default using all cores after a restart.
luke
Trader
Posts: 17
Joined: Fri Aug 14, 2015 7:03 am

Improving CPU speed

Post by luke »

Hi

You can also try Bitsum's Process Lasso. It optimises CPU usage and doesn't allow processes to monopolise the CPU. Download the 32 bit version if your operating system is 32. Or 64 bit if your operating system is 64 bit.

https://bitsum.com/

Let us know if it helps.

Regards
luke
User avatar
Phi2134
Posts: 5
Joined: Tue Sep 11, 2012 4:34 pm

Improving CPU speed

Post by Phi2134 »

I am using ArchiCrypt Ultimate RAM-Disk. It enables you to use the RAM in your workstation like a harddrive. You can create a so called RAM disc and install Empty4 in portable mod. I have assigned 1gb of my 6bp RAM to be used by Empty4.
Since then I have the impression that Empty4 runs faster and more stable.

You should try it. There are Freeware programs that you could use as well, eg: http://memory.dataram.com/products-and- ... e/ramdisk/
here is a well written article about ram discs in general http://www.makeuseof.com/tag/ram-drives ... must-know/
:good:
qvintus
Trader
Posts: 220
Joined: Sat Nov 30, 2013 7:02 pm

Improving CPU speed

Post by qvintus »

Just try my suggestion in post 3 before installing more programs on your PC. You will be surprised of the CPU resources it saves.
Check with taskmanager before and after.
User avatar
Wavegarrick
Trader
Posts: 1172
Joined: Sun Dec 30, 2012 11:21 am
Location: South Africa

Improving CPU speed

Post by Wavegarrick »

Hi guys,

Nice ideas coming up...allready checked on Qvintus's link. "Set affinity" can also be done on older versions like windows xp for example under the task manager. :)

Slowly getting up to speed again with my computer should be A for the way next week....

Anyway, thanks
Tc
DigitalCrypto
Trader
Posts: 237
Joined: Tue Feb 24, 2015 4:38 am

Improving CPU speed

Post by DigitalCrypto »


I have the following indi's on my charts HGI, 3 Semafor, sixths_SQ, 2 ema's and NB 4th Daily S&R. I am also using CSS.
Semafor eats CPU like a pig in a slough pen. If you are not using the 1's or 2's you can assign those inputs to 0 to save having to compute/draw additional zigzags which are calculated per tick. If you have an EA using semafor then you are doing twice as many calculations per tick and this will hammer on your cpu.
I have a profile for each TF from H1 thru to MN and on each profile I have 24 charts - 23 of these have all the indicators except the CSS and 1 has the CSS with nothing else.

This setup is making my CPU is perform sluggishly particularly when loading the profiles.
Don't. Use a maximum of 18 charts per profile. If you need more access then split the load onto two different Empty4 terminals. Empty4 loses its damn mind when you start nearing 18 charts.
I amended the CSS to look at 30 rather than 200 bars (OOTB).
I have amended the HGI so the update seconds delay is now 60 rather than the 30 (OOTB)
My bar count on the 6ths is 150 up from 120 (OOTB)
This is a good start. Also check in your Empty4 and limit the amount of candles with "MaxBars in History" and "Max Bars in Chart". I limit mine to 5k each. The reason being is that Empty4 will attempt to calculate all the bars in your history. So don't let it go too far.
Short of buying a new workstation is there anything else I can do to speed my machine up ?
Update - Changed max bars in history (Tools=>options=>charts) to 3000 and max bars on chart to 750 - in addition to above changes there is a noticeable change in speed.

Also make sure you clear your history from time to time. For whatever reason when the history gets too large Empty4 starts acting like an idiot. A good time to do this is downtime over the weekend. Just purge your history files on the disk.

I have a behemoth machine and Empty4 destroys the CPU anyway. It's not very efficient with resources. Try the above solutions first.
Nice ideas coming up...allready checked on Qvintus's link. "Set affinity" can also be done on older versions like windows xp for example under the task manager.
All of my terminals run in portable mode with affinity set. Affinity is actually a Windows setting. It will assign your Empty4 terminal to run exclusively on a specific core. For example if you have a quad core computer they are 0,1,2 and 3. For a dual core computer you only get 0,1. You can activate it by setting your Empty4 shortcuts with an affinity flag like I show below to run on Core 4.

"C:\Trading\FXCM_Monitor_1\terminal.exe" /portable /affinity 3

Also notice there are no spaces in my directory paths. Empty4 acts funny with spaces particularly if you've installed it in "Program Files" and have Windows UAC (User Access Control) enabled. You will need to run Empty4 in administrator mode if you do or just move it into its own directory like I've done.

Hope all this helps. And thank you for your help. :D

- David

P.S. One thing many people don't know is that if you have multiple charts open, even if you only have them in the background, and multiple terminals up that Empty4 will clobber your PC while it's attempting to draw everything on screen and everything in the background. It's clearly not optimized for video or acceleration. If you aren't using a terminal, minimize it to the task bar area until you need it. You will find that you can easily shave off 20-30% in cpu resources per terminal with this alone.
drunka
Trader
Posts: 86
Joined: Thu Dec 11, 2014 8:05 pm

Improving CPU speed

Post by drunka »

RisklessPips » 02 Jun 2016, 18:08 wrote: Short of buying a new workstation is there anything else I can do to speed my machine up ?
Hi,
you could also check what's the best CPU your motherboard supports and try to get a used CPU on ebay. If you can gain 30-40% CPU power it often makes sense especially if all other components still fit your needs.
Cheers
starger
Posts: 1
Joined: Sun Apr 10, 2016 4:46 pm

Improving CPU speed

Post by starger »

Code: Select all

// on Global Scope

extern bool   LowCPU = true;
extern int     Divisor  =      4;    // only calculate every 4th tic

// first line in start() 
if(LowCPU && Volume[0]/Divisor !=MathCeil(Volume[0]/Divisor)){return(0);}
This worked for me with the older builds of Empty4. The new build should do it, too.
I simply added these lines to my indicators and took different divisors for each indicator.
This does not speed up the the computer but it reduces the number of calculations and distributes the usage of CPU.
Post Reply

Return to “Utilities Indicators and Scripts”