Suggestion: Allow multiple terminal instances

Have some interesting ideas about how to improve the software? Let us know in this section!
lukemp3
Posts: 18
Joined: Wed Oct 30, 2013 11:15 am

Re: Suggestion: Allow multiple terminal instances

Post by lukemp3 »

hello

can anyone confirm my personal workaround to get x6 metatrader with 99% accuracy using tickstory?

Hope not to be the only one who did it..

agora
Posts: 25
Joined: Wed Sep 03, 2014 8:55 pm

Re: Suggestion: Allow multiple terminal instances

Post by agora »

sadly i cant reproduce the situation, where 4 cores work at 100%.
now when i try it i dont came over 50 with 2 cores, when i launch a third mt4 instance all cores go down to 25%.
Sad, i cant figure out why, i restated and tried different combinations of Broker brands and users.
Now i can run only 1 instance at one pc, extreme bad this dot net language.

agora
Posts: 25
Joined: Wed Sep 03, 2014 8:55 pm

Re: Suggestion: Allow multiple terminal instances

Post by agora »

TEST Failed

I can confirm that you can start the multiple instance BUT their suck each others performance down.
I tested exact as you described.
Same Broker only differnt Installation Paths (AAAFX MT X1,AAAFX MT X2,AAAFX MT X3)
Windows 7 32 Bit, Quad Cpu , 4 GB Ram.
I found out that is better to bind a mt4 instance on a specific core.
I first tried without binding, but it was to noisy to judge % load.

1 mt4 = ~80% avg Cpu core load
2 mt4= 25% + 20% = 45%(+-3% fluctuation, exept first started mt4 is max load)
3 mt4= 9% + 8% + 6% = 25% avg (+-3% fluctuation, exept first started mt4 is max load)

So i cant believe you achieved more than 25% overall cpu load.
Mabe you can upload a Image?

greetings

___________________________________________

I also tried out Xen Server + Client 6.2
I installed 1 Virtual machine and cloned it (slow cloning, not fast)
the i used Tickstory for Backtesting.
But the main problem here is the Cpu load per core is only 65-75% (70avg) so
when i use 4 cores they only so efficent like 3 cores without virtualisation. (in theory offcourse , because tickstory doesnt work to make a real comparsion)
The loss of ~30% of the cpu overall calculating power is a alot and becomes huge when think it over time. (30% per day is a lot)

I will try now birt tickdatasuite, to see it works more efficient than xen.

agora
Posts: 25
Joined: Wed Sep 03, 2014 8:55 pm

Re: Suggestion: Allow multiple terminal instances

Post by agora »

Ok, i finally got it working. Why is it so hard? damn strange behavior of mt4!

i discoverd 3 bugs in the meantime in mt4.see at the end.

Anyway, the way it works is,
I use Win XP 32 bit (works also under Win7 32 and 64 Bit)
Quadcore cpu

5.Different Users:
Admin
User-1
User-2
User-3
User-4

----------------------------User-1 first core

Step.1
Make One installtion of an mt4 setup of your faviorite Broker with the Adminacount.
Install Tickstorylite as Admin too.

Step.2
Logout as Admin, login to User-1
Start Tickstory lite.
Download some history data you need.
Before you export the data to mt4 you need to Start the new installed mt4 once and close it again.

Note: Since you have 4 Users, you must do this step for User-2,User-3 and User-4 too.
You dont have to login to anathoer useraccount on XP, you can just use right mousebutton "run as" and type Username+Password.
(this trick didnt work properly on Win7 64 )

Step.3
Since you are logged in as User-1 and i assume Tickstory is still running, press F8 or click in Menu to start mt4.
Dont log in to your broker. Only if if the strategytester some symbols are missed which you need.
in this case right click in the currency-pairs window and choose "show all" then close mt4 and start again with tickstory but second time donw login.
Now you can configure your EA,Currencypair,Timefram and Optimization parameters in the Strategy tester and hit the start button to run the optimization.
(dont forget to allow EA trading + allowed dll)
So here is an important tip: To maximise the Backtest efficiency.
It is a good idea to start the taskamager and assign the terminal.exe to the first core of your CPU (rightclick context menu)

Dont forget that starting a backtest needs some time for mt4, so it is best to wait until you see the first
number of the optimization iterations, i mean Example 1/1400(70000).
After that you can proceed to start next mt4 instance.
This is important because if you donw do it like this it will slow down the other cores.


----------------------------User-2 first core

So here comes the second manual which is differnt from the first user.
But this is the same process for User2,User-3,User-4 and so on.

Step.1
important info: to make it work to use more than 1 Tickdatabacktest run at once,
Do not run Tickstory lite under no circumstance twice. If you do it, it will mess up some bugs in the ram (my experience)
and will lower the cpus usage at a minimum , affection all cores and mt4 instance running.
If you do it by accident, best soloution: close all programms restart your Windows, and beginn on the start of this manual.

So if all Works the actual state is:
You are loggeg in as User-1, Mt4 is running a backtest (as User-1) and Tickstory is still open.

Step.2
Close Tickstory now.
rightclick on the Tickstory programm icon and choose run as differnt user.
Type in User-2 and the password.
now hit F8 to start the second mt4 instance.
Now you can configure your EA,Currencypair,Timeframe and Optimization parameters in the Strategy tester and hit the start button to run the optimization.
(dont forget to allow EA trading + allowed dll)
Again, it is a good idea to start the taskamager and assign the terminal.exe to the first core of your CPU (rightclick context menu)
go to wondows start button, commandline promt (execute field) and type:
runas /user:User-2 taskmgr
now a balckwindow pops up, type in the password.
Go to precesses, look for terminal.exe and chose the one (of actual 2) which is run by User-2.
Rightclick, assign CPU-Core 2 to it (uncheck all other. Number are confusing, Cores are named 0,1,2,3)

Dont forget that starting a backtest needs some time for mt4, so it is best to wait until you see the first
number of the optimization iterations, i mean Example 1/1400(70000).
After that you can proceed to start next mt4 instance. This is important because if you donw do it like this it will slow down the other cores.

For 3 or 4 Users, just repeat, but insteas User-3 or User-4 where i had wirtten User-2.
This works for WinXP Sp3. I prefer it because in terms of hardware it is more efficient (you need only 512mb for WinXp it self, So you can run 4x Mt4 with juast as little as 1,5GB, On Win64 you need at least 1GB for the System itself, + ~850mb for 4x mt4 so overall you need more Ram= more expensive hardware,
especially when you run more than on PC (i use 4 Quadcore-Pcs at once))


---Some bugs / problems i encountered:
1.When i exportet the Tickdata to mt4, the files are often not write-protected. So before you run a backtest, it is recommend to go to mt4-file-menu
click open datafolder, go to the folder \tester\history , mark all files , rightclick write protected.

2.Often (50% of the cases)
When i start mt4 with tickstory (F8), tickstory doenst start as write-protected (can be seen in the mt4 programm titelbar)
You should always check this before running a backtest. If in the titelbar is no comment aboute write-protected fxt,
close mt4 and start it with tickstory again (F8 key)

3. Some pair combinations seem to influence each other in the cpu.
(since i run mt4 whith different Users on different cpu-cores in theory they could not influence each other)
But in pratice they do. ( I guess because of the hardware design cpu's are made, phyiscally 2 cores are packed on one die)
So for example in when i run a test with gbpusd m1 and on another core nzdusd m5,
often Cpu effeciency breaks down for the 2 cores to 10-20%.
What helps here is switch cores with other mt4 instace, or use other pair/timeframe/ea in the meantime.
Sometimes i got 3x 100% load and the 4th core stumbles at around 50/60/80/95 % load.
But often it is impossible to use all 4 cores, becuase of the strange influence. So i just use 3x Cores in that case.

I wrote this manual so others encouter similar problems dont give up.
(i was often frustrated, but i had no choice to give up , so i proceed a 3 weeks journey of bruteforce installing + trial& error xD )

agora
Posts: 25
Joined: Wed Sep 03, 2014 8:55 pm

Running Mt4 Tickstory Backtest on a Ramdisk - new info

Post by agora »

Ok i have some interesting new info, this time my brother made the discovery.

It is possible to use tickstory with windows xp inside of VirtualBox, but only with a Trick.

At first let my explain why Windows XP is still usefull.
When working with (one or more) Virtual machines, Ram and Diskspace can get rare.

So lets see,
Windows7 needs in standard installation:
20gb harddisk
1Gb Ram at least

WindowsXP needs in standard installation:
1,5gb (with updates)
512mb Ram

Trying to Run Tickstory on Windows XP Sp3 inside of Virtual Box fails. (without Virtualbox, its working fine)
My Brother discovered that using and older Version of Windows XP (SP2) + "Net 3.5 setup" + "windows installer 3.1"
Tickstory works inside of Virtualbox.

So why do we need to run Tickstory + Mt4 for Backtesting inside of Virtual box you might ask yourself.
When doing a Backtest optimization usually i configure my EA,the Pair,Timeframe,Spread and then hit the Start buttons.
Then i leave the PC for work. So there is no Problem.

BUT when i want to make a single backtest (optimization unchecked) to gain fast informations ,
then i noticed that there is a huge delay caused by Metatrader before it
starts the actual Backtest (i guess Mt4 loads Data from HDD to Ram). This Process needs usually 6-10 Minutes!.
So gaining Intuitive fast Backtest is impossible with this large delay between 2 Backtests.
So my Idea was to run the the hole Software-chain (Xp,Tickstory,Mt4,Tickdatafiles) inside of a Virtual Machine ON A RAMDISK :D
My brother was so kind to test it out. It works awesome, when you hit the Button for Start the delay is gone!
Best*=fastest, free RamDisk Software is "SoftPerfect RAM Disk". (The host System was Windows / 64bit with 8gb ram, the guest was WinXP 32bit Sp2 on a virtual 4gb Harddisk(the ramdisk partition))

happy testing

cptcherry
Posts: 4
Joined: Wed Jun 10, 2015 5:18 am

Re: Suggestion: Allow multiple terminal instances

Post by cptcherry »

Hi Guys,
Just wondering... has this been addressed yet?
It is a deal breaker, or maker for me.
Thanks

tickstory
Posts: 4883
Joined: Sun Jan 06, 2013 12:27 am

Re: Suggestion: Allow multiple terminal instances

Post by tickstory »

Hi Cptcherry,

I can confirm that we will be implementing this functionaity, however what I unfortunately can't tell you at the moment is when it will be scheduled for release.
We will obviously update this thread once the feature is available. If you wished to be notified as soon as it's available, you can keep tabs by 'liking' us on Facebook.

Regards.

Post Reply