[MAS-tips] Re: [MAS-discuss] edit names of pre-set market analyzers
Brought to you by:
jcochrane
From: Jim C. <jt...@di...> - 2003-09-10 04:16:41
|
> I would like to edit the name of some market analysers that are > already set. Out-of-the box MAS comes with 15 analysers listed > with the "m=>v" option of macl. I do not want to have to remove > them just to add them again with different names. > > For example, i want to change > Volume > Yesterday's Volume EMA (5) * 3.5 > to > Volume > Yesterday's Volume EMA5 * 3.5 (volume spike up) > so as to be consistent with the format of the other analyser names. > > I found some files in /opt/mas/lib/config/ which looked like > the way to go. However, this does not seem to have any effect. > > Is there such a simple way? > > --David Hi David. The market analyzers (along with the indicators) are stored in a binary data file (called generators_persist), so the name of an analyzer cannot be easily changed by editing a file. Unfortunately, I have not yet added a feature to allow changing analyzer or indicator names from the mas command-line, which is where this capability probably should reside. Until this feature is available, I think the best solution is to delete the analyzer and, instead of recreating it by hand, copy its definition from lib/config/market_analyzers to a new file. In this case, search the lib/config/market_analyzers file for the comment line: # volume spike analyzer and copy from there to the end of that analyzer specification (just before the comment announcing the next analyzer). You will get: # volume spike analyzer c s o Market Data y GT_OPERATOR c VOLUME c MULTIPLICATION c FUNCTION_BASED_COMMAND c EMA of Volume y SETTABLE_OFFSET_COMMAND c BASIC_NUMERIC_COMMAND c 1 CONSTANT c 3.5 daily o # Name Volume > Yesterday's Volume EMA (5) * 3.5 s Put these lines into a file and append two lines to it: - x These two lines will cause the mas shell to go back to the main menu and then exit. Then edit the file to plug in the name you want and then use the macl -i <file> <portnumber> format of the macl program (after starting the server with port <portnumber>, of course) to input the commands from this new file into the mas server to recreate the analyzer with the new name. Let me know if you have any problems or questions. Jim |