DAS Trader Pro – symbol notes

Often we need to put some notes on the symbols, being either warnings, whole trade plans, or just any other note.

3 types of notes

There are 3 types of notes as of today, if I do not count any text you can write into a button by editing it. Although it is a valid way, there are other ways that are even more efficient.

1. The chart notes

As the title suggests, these exist on the charts. They exist for ages and are not very practical, imho, but they might still be useful.

The main disadvantage of these is their placement. Once you draw them, they remain at the place. It is good for daily or weekly charts, but on smaller time frame charts, they will be gone and forgotten easily.
They are configurable a little, in colors and shape too.
They can be created and read with scripts, and there can be practically hundreds of them set.

2. The watchlist notes

These have been around for some time but are quite unfinished, as they cannot be written or read by scripts.

Affecting the width of your watchlist window, they are good for some short notes like A, B, C to measure the quality of your liking of the symbol for the day, and later on you can order the symbol by the column.

The sorting of symbols by notes is their biggest advantage.

3. The symbol notes

These are the newest and are very hidden and invisible, as they are virtual and nowhere to be seen on the screen.

setSymbolNote(SYMBOL,"NAME OF THE NOTE","THE TEXT OF THE NOTE");

We can define as many as we like per symbol and define them by name.

setSymbolNote(AAPL,"WEEKLY NOTE","Stay away because of earnings this week");

setSymbolNote(AAPL,"DAILY NOTE","Go short if it breaks 199 level");

How do we make it useful?

If we set it and it is nowhere to be seen, what is it good for?

Let’s create a wide button under the chart.

The script code that I placed into the button is

$MYTEMPNOTE=input("Input the note for "+SYMB,getSymbolNote(SYMB,"DAILYNOTE"),1);
setSymbolNote(SYMB,"DAILYNOTE",$MYTEMPNOTE);
GetWindowObj(NAME).GetCustButObj("b_symbol_notes").bkcolor="gray";
GetWindowObj(NAME).GetCustButObj("b_symbol_notes").text=getSymbolNote(SYMB,"DAILYNOTE");
if(getSymbolNote(SYMB,"DAILYNOTE")!="")
{
GetWindowObj(NAME).GetCustButObj("b_symbol_notes").bkcolor="yellow";
}

I named the note DAILYNOTE and will be using that name later on to read it.

It does the following:

  1. Prompts the user for the input and stores it into the $MYTEMPNOTE variable
  2. Sets the symbol note to the $MYTEMPNOTE value for the current symbol on the chart
  3. Sets the background of the button to yellow if the note is set or to gray if it is not set.

Pretty straightforward so far. But there is a problem, as the text on the button remains the same even if we change the symbols.

We need to add some code to the chart update script that will do:

  1. Detect if there is a change of the chart symbol
  2. If the symbol has changed, read the symbol note
  3. Replace the text and color of the button under the chart

The script code in the chart update script is

//run if symbol has changed
if($CURRSYMBOL!=GetWindowObj(NAME).SYMB)
{
$CURRSYMBOL=SYMB;
GetWindowObj(NAME).GetCustButObj("b_symbol_notes").text=getSymbolNote(SYMB,"DAILYNOTE");
if(getSymbolNote(SYMB,"DAILYNOTE")=="")
{
GetWindowObj(NAME).GetCustButObj("b_symbol_notes").bkcolor="gray";
}
else
{
GetWindowObj(NAME).GetCustButObj("b_symbol_notes").bkcolor="yellow";
}
}

Both scripts are chart-type independent, and no naming of the chart window is needed. You can choose any chart window (excluding the new ChartEX type), and it will work the same. Daily, hourly, wherever you have enough width to display your longer notes.

Note deletion

To delete a note, simply input an empty string by deleting the current note.

A working example

In the video above, you can see that with just 2 scripts, we get a whole new, very useful functionality for a small price of screen space.