[MAS-tips] Tip: How to avoid the persistent settings compatibility problem
Brought to you by:
jcochrane
From: Jim C. <jt...@di...> - 2004-05-10 10:00:02
|
I may have mentioned this before in this forum, I can't remember for sure, but it seems that a lot of mas users are not aware of this issue and I think posting it here will be helpful, since following this tip could help save people some time and irritation. The issue is that sometimes a new version of the mas executable will not be compatible with respect to the saved indicators and market analyzers (the indicators_persist and generators_persist files). However, preventative action can be taken to avoid running into this problem. It's described in the FAQ entry copied below. (The FAQ is at: http://eiffel-mas.sourceforge.net/support/FAQ.html .) I recommend that everyone who creates their own indicators or market analyzers get used to using this technique for creating and editing indicators and analyzers, so that you can avoid compatibility issues in the future. Here is the FAQ entry: I updated to a new version of MAS and when the server starts up it prints the following error and exits: "Retrieval of indicator library file indicators_persist failed. The file may be corrupted or you may have an incompatible version." How can I use the old indicators I have created with the new server? This problem occurs when a new version of MAS incorporates a change to the structure of the indicator code that is not compatible with the old version. As a result, the old indicator file, indicators_persist, cannot be loaded when the new version of the server starts up. Once this occurs, the only way to use your old indicators is to keep using the old version of the server. (This problem can also occur with market analyzers and the generators_persist file.) However, there is a preventative method that can be used to overcome the problem: Whenever you create a new indicator, start the server in the background (-b option) and use the command-line client program, macl, to talk to the server and "record" the conversation with the command: macl -r output_file <portnumber> where output_file is the name of the file to which you wish to save the recorded output and <portnumber> is the port number with which you started the server. Keep this file in a safe place. It would probably also be a good idea to keep it backed up. Whenever you upgrade to a new version of MAS and get the above error message, you can restore the indicators you have created by running the following command on each of your recorded output files: macl -i file <portnumber> where file is the name of a file created earlier with the -r option and <portnumber> is, again, the port number with which you started the server. This solution works for both indicators and market analyzers. Note for Windows users: Starting MAS the "normal" way, by clicking on the MAS icon, will execute the necessary step described above of starting the server in the background. However, you will still need to run the 'macl -r ...' and 'macl -i ...' commands described above from the Windows command line. Those who do not know how to do this may want to wait for a future release in which this procedure is handled automatically. |