Page 1 of 1

Any way to force saving the quote to database?

Posted: Sep 14 2015
by alex522
Multicharts is the most stable trading platform I have used so far. But still there are times that the multicharts will crash. (e.g. loading too many charts) But to me the most head-aching problem is after multicharts is crash, even multicharts is restarted and then close again, the quote collected will NOT be saved to the database as the multicharts processess (e.g. tsserver, studyserver...) are all still running in background. Multicharts will only save the quote when all the related processes are closed properly.
If I kill all these processes by the process manager manually, that mean all the quote collected will be lost. And sometimes even some loss of data permanently if the loss of data involved some long time ago historical data.
Is there any command or method that we can force the quotemanger to save the collected data to database manually? e.g. midnight everyday.

Re: Any way to force saving the quote to database?

Posted: Sep 28 2015
by alex522
I don't know why but the cache is not saved even if the computer is restarted. It will do that some time ago. But not at least in recent months' crash. Actually just about two months ago, I have experience a quite disastrous error of the system because of this:

An empty chart (with all historical data lost) is loaded but the AOE was still applied successfully. Unluckily I have overlooked that the chart is empty. And an horrible error then happen on the trading time. Even the IOG of my signal is set to OFF, a serious of seconds spaced buy and short signals are sent to the brokers just like the IOG is ON. But luckily, I stopped the signal within a few minutes but already a dozens futures transaction has been made.

Most of time it is the multicharts64.exe process that crash because of the exception of the ntdll.dll module. All other process (tsserver, studyserver...) is all right and still running. Actually I can restart the multicharts64.exe process and load the charts again. But the problem is when I close the multicharts64.exe properly then, the cache will not be saved because the system think that there is still another multicharts64.exe (the crashed process) running. So there is no way to tell the system to save the cache data.

This ntdll.dll error happens quite often, about once every two to three weeks. And that happen more if I load more charts. But even with lite loading, it will still happen. It seems it is not a pure memory full problem. I have checked the memory usage many times before but it seems it is well below the overload zone.

The software is running on a Xeon 3.6G CPU, VMware ESX platform that 28G Ram are allocated. And MC is only software running on the machine.

Re: Any way to force saving the quote to database?

Posted: Sep 28 2015
by TJ
ntdll error means your computer is possibly corrupted.

Either your MultiCharts is corrupted, or your Windows is corrupted.


You can first try to delete MultiCharts from the computer and install anew.
If the error persists, then you have to reinstall your Windows.

Re: Any way to force saving the quote to database?

Posted: Sep 28 2015
by TJ
::
Most of time it is the multicharts64.exe process that crash because of the exception of the ntdll.dll module. All other process (tsserver, studyserver...) is all right and still running. Actually I can restart the multicharts64.exe process and load the charts again. But the problem is when I close the multicharts64.exe properly then, the cache will not be saved because the system think that there is still another multicharts64.exe (the crashed process) running. So there is no way to tell the system to save the cache data.
::
When MultiCharts crashed, you MUST remove all the MC processes before restarting.
Otherwise, MultiCharts will not run properly.

Re: Any way to force saving the quote to database?

Posted: Oct 01 2015
by Henry MultiŠ”harts
Hello alex522,

Once data is downloaded from the data feed server and plotted on the chart - it is stored in the cache. When you close MultiCharts, QuoteManager and Portfolio Trader - cached data is saved to the local database. You cannot manually save the cached data, it is done automatically.
Since version 9.0 (in 64 bit edition only) the operation speed of MultiCharts has been increased by using a RAM Cache (in 64 bit MC only).
It means there is no file cache and if the application is shutdown incorrectly the data from the cache will be lost.

If you want to get back to file cache you need to run the registry editor and go to the following path:
HKEY_CURRENT_USER\Software\TS Support\MultiCharts64\Storage\UseFileCache
By default UseFileCache = 0 (file cache is disabled).
Please set UseFileCache = 1 (enable file cache).
When file cache is enabled MultiCharts will try to restore the data on the next run in case the application crashed.

Have you uploaded the logs/sent bug report upon crash?
How often is this behavior replicated on your end?

Re: Any way to force saving the quote to database?

Posted: Oct 02 2015
by alex522
Thanks a lot for TJ and Henry's help.
I will try to reinstall the windows and multicharts.

This error happen pretty often, around once every two weeks. If I load more charts, it will happen in two to three days. Log has been sent a few times.

Re: Any way to force saving the quote to database?

Posted: Oct 07 2015
by Henry MultiŠ”harts
Thanks a lot for TJ and Henry's help.
I will try to reinstall the windows and multicharts.

This error happen pretty often, around once every two weeks. If I load more charts, it will happen in two to three days. Log has been sent a few times.
alex522, please PM or email me your PC name (right click on My Computer icon->Properties->Computer name) so that I can check the logs on our FTP server.

Re: Any way to force saving the quote to database?

Posted: Oct 08 2015
by TJ
Hello alex522,
::
Since version 9.0 (in 64 bit edition only) the operation speed of MultiCharts has been increased by using a RAM Cache (in 64 bit MC only).
It means there is no file cache and if the application is shutdown incorrectly the data from the cache will be lost.
::
Many traders keep their system online 24/7 for multiple days/weeks.

Now that MC has migrated to RAM cache, that means the data never gets to save to the harddisk.
It would make sense to provide an option to periodically save the cache to the database,
either manually or automatically, so that days or even worse weeks of data, do not get lost.

Re: Any way to force saving the quote to database?

Posted: Oct 08 2015
by evdl
Yes, suggestion of TJ is spot on.

MC is most of the time stable, nevertheless I encounter a couple of times a month, there is a problem with mc or my self inflicted coding efforts, which requires me to restart. With dataloss as result.

It would be very valuable to save precious data at times when the user wants to, manually and automatic. Personally I would save my data every hour. A timesetting in the preferences of mc would be a solution for everyone.

Re: Any way to force saving the quote to database?

Posted: Oct 29 2015
by iildm
Hi,
Also for me it would be very valuable to save precious data at times when the user wants to manually. So when I do some test o study the software (sometime this by my error cause hangup) I can force backup of data before. Alternatively, there is a way to force backfill of a list of symbols ??

Regards
Luca

Re: Any way to force saving the quote to database?

Posted: Oct 31 2015
by JoshM
MC is most of the time stable, nevertheless I encounter a couple of times a month, there is a problem with mc or my self inflicted coding efforts, which requires me to restart. With dataloss as result.
Speaking of this, when will MC-193 - Allow workspace auto-save be implemented? That very old feature request is quite useful, since any crash of MC also requires us to recreate the unsaved workspace edits. So there's not only dataloss with a crash, but also a decent amount of manual work when MC crashes.

Re: Any way to force saving the quote to database?

Posted: Jan 10 2016
by kiasom
Many traders keep their system online 24/7 for multiple days/weeks.

Now that MC has migrated to RAM cache, that means the data never gets to save to the database.
It would make sense to provide an option to periodically save the cache to the database,
either manually or automatically, so that days or even worse weeks of data, do not get lost.
I'd like to second that request by TJ.
I just lost more than a week's data due to a stalled computer. Causes a lot of trouble to get that data back.

Re: Any way to force saving the quote to database?

Posted: Jan 19 2016
by bluefightingcat
One more vote from me!

Re: Any way to force saving the quote to database?

Posted: Jan 19 2016
by iildm
Another one vote for me !!
regards
Luca

Re: Any way to force saving the quote to database?

Posted: Jan 27 2016
by Meecc
add one vote too ...

Re: Any way to force saving the quote to database?

Posted: Jul 24 2016
by bensat
Why not using something like PrimoCache or so ... You could easily set a 'Defer-Write' option to write the data in the cache for once a minute, hour, day or any time frame you wish. Of course you should change your registry to the value to UseFileCache = 1 first > if I'm not mistaken ...

Regards

Ben