[MAS-tips] Re: [MAS-discuss] trying to add indicator
Brought to you by:
jcochrane
|
From: Jim C. <jt...@di...> - 2003-08-25 04:09:03
|
> Hello,
>
> I'm new to MAS.. I tried adding the Force Index to
> MAS. It worked in the command prompt and is showing in
> the list of indicators. But when I try to load the
> Java Charts the new Force Index is not there in the
> list of indicators. I'm running version 1.6.5a in
> Windows XP. I followed the instructions in the
> creating_indicators.txt file. Do I need to do
> something extra for the new indicator to show up in
> the java charts?
Hi Henry. Apologies for the late response.
Yes, there is one more step you need to get the new indicator to show
up in the charting GUI. You need to edit the .ma_clientrc file and add
a line in that file for the new indicator. This file resides in the
lib/classes directory, under the main MAS directory - the directory in
which you installed MAS. This is not very user friendly and the GUI will
probably be enhanced in the future with a feature to make the task of
adding a new indicator much easier. But for now it must be done by hand.
To add the new indicator, you need to find a 3-line comment
in the .ma_clientrc file that begins:
# Specify which indicators to include in the selection list, the order ...
After the comment are specifications for indicators that the GUI will
request from the server. The easiest way to add a line for your new
indicator is to copy an existing line and change it to fit your new
indicator. For example, for your Force Index indicator, assuming you want
it to appear in the lower chart rather than the main chart, you could
change the line:
lower_indicator MACD Difference red
to:
lower_indicator Force Index red
If you want the indicator to be drawn in a color other than red, pick one
of the colors listed in the comment lines that begin:
# color settings - Valid colors are:
and change the string "red" to the string for the color you picked. There
are two things to note here: First, the format of an indicator specification
line is:
<indicator-location>{tab}<indicator-name>{tab}<indicator-color>
where:
<indicator-location> is either lower_indicator or upper_indicator
{tab} is a tab character
<indicator-name> is the name of the indicator
<indicator-color> is the color of the indicator
The second thing is that the indicator name has to match exactly the name
you gave the indicator when you created it with the mas program.
One more obstacle you may encounter is that the file is in UNIX text
format, which means that many windows-based editors (since they require
both a newline and linefeed character to indicate a new line) will
display the file as one long line. It will be very difficult to edit
the file with such an editor. To solve this problem, you can obtain
an editor that recognizes UNIX format. (I haven't researched it, but
I would guess that there are several such editors available for free on
the web. Vim, a VI clone [http://www.vim.org/index_real.php], is one,
and, most likely, a windows version of emacs exists that can also do this.
A quick search on google.com unearthed this site, which lists several
windows editors:
http://www.hsinlin.com/software/text_editors.html
One of the links on that site leads to:
http://www.newbie.net/NotesPad/notespad_32.html
a free windows editor that appears to handle UNIX text files.)
I'm aware that dealing with this obstacle will be a major inconvenience for
some people. This is one reason I'm hoping to be able to add a feature to
the GUI to make it easy to add a new indicator.
Please let me know if you have any further questions and, also, let me know
if you are able to get the new indicator working in the GUI.
Jim
|