Any way to force saving the quote to database?

Questions about MultiCharts and user contributed studies.
alex522
Posts: 42
Joined: 31 May 2010
Has thanked: 20 times
Been thanked: 2 times

Any way to force saving the quote to database?

Postby alex522 » 14 Sep 2015

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.

alex522
Posts: 42
Joined: 31 May 2010
Has thanked: 20 times
Been thanked: 2 times

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

Postby alex522 » 28 Sep 2015

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.
Attachments
ntdll.dll error.png
(27.88 KiB) Downloaded 2789 times

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

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

Postby TJ » 28 Sep 2015

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.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

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

Postby TJ » 28 Sep 2015

::
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.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

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

Postby Henry MultiСharts » 01 Oct 2015

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?

alex522
Posts: 42
Joined: 31 May 2010
Has thanked: 20 times
Been thanked: 2 times

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

Postby alex522 » 02 Oct 2015

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.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

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

Postby Henry MultiСharts » 07 Oct 2015

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.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

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

Postby TJ » 08 Oct 2015

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.

evdl
Posts: 401
Joined: 19 Jan 2011
Location: Netherlands
Has thanked: 85 times
Been thanked: 124 times

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

Postby evdl » 08 Oct 2015

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.

iildm
Posts: 2
Joined: 28 Apr 2014
Has thanked: 11 times

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

Postby iildm » 29 Oct 2015

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

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

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

Postby JoshM » 31 Oct 2015

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.

kiasom
Posts: 32
Joined: 30 Jun 2010
Has thanked: 49 times
Been thanked: 3 times

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

Postby kiasom » 10 Jan 2016

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.

bluefightingcat
Posts: 38
Joined: 31 Oct 2015
Has thanked: 1 time
Been thanked: 2 times

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

Postby bluefightingcat » 19 Jan 2016

One more vote from me!

iildm
Posts: 2
Joined: 28 Apr 2014
Has thanked: 11 times

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

Postby iildm » 19 Jan 2016

Another one vote for me !!
regards
Luca

Meecc
Posts: 50
Joined: 23 Jun 2011
Has thanked: 22 times
Been thanked: 7 times

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

Postby Meecc » 27 Jan 2016

add one vote too ...

User avatar
bensat
Posts: 331
Joined: 04 Oct 2014
Has thanked: 46 times
Been thanked: 104 times

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

Postby bensat » 24 Jul 2016

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


Return to “MultiCharts”