Watchlist Weirdness

Spin

Well-known member
Joined
May 22, 2019
Posts
477
Likes
191
Dear panel, I have to come and pick your brain again. :sneaky:

I am adjusting a client's (custom) Study, so that it shows its Buy & Sell signals in a nice 'watchlist' overview, instead of the Alarm History (since several signals have to be 'true' at the same time, client prefers this method over the -sometimes harder to follow- Alert History)

The Study has multiple different signals hardcoded in it and the idea is to have a column in the Watchlist for each of them, so that one can easily spot when enough of the 'lights' are green and the trigger can be pulled to open a trade.

So I coded this in the Study:
Java:
{MarkerInfo marker = getSettings().getMarker(MARKER4);
                     if (marker.isEnabled())
                     addFigure(Plot.PRICE, new Marker((cLowest), Enums.Position.BOTTOM, marker));
                     ctx.signal(index, Signals.TINY_BUY, "Very Small Buy ?", series.getClose(index));
                     series.setBoolean(index, Signals.TINY_BUY, true);
                               }

and -no surprise there- this does draw markers on the chart when conditions are met:
200

One can clearly see in the Cursor Data Window that the value for 'Tiny Buy' is indeed set to 'true' for the 10:30 bar.
That bar does also fire off a signal, as expected:

201

I also added some debugging code to be 100% sure the value is indeed set to 'true' for that bar. Again: everything looks fine there. So far, so good !

202

And then the weirdness appears:
I create a 'custom column' in a watchlist, and set it to return the 'Study Value' (which should be the string 'true' imo) in the column when that 'tiny sell'-value is indeed equal to 'true'. Seems fairly straightforward, right ?

204

No matter what I try time-wise (using this bar, or the last, or 2 bars ago, or ...), or 'layout-wise' (having it print the Study's 'true' value, or a custom text, default coloring, custom coloring, ...) that dreaded 'tiny buy' column stays empty :cry:

(Please refer to the screenshot in the next post, this forum only allows 5 attachments in one post)
 

Attachments

  • watch4.png
    watch4.png
    33.2 KB · Views: 5

Spin

Well-known member
Joined
May 22, 2019
Posts
477
Likes
191
205

So, here's my cry for help to you all:

WHY won't the Watchlist print my 'true' value ?
  • Is something wrong with my (watchlist / custom column) settings ?
  • Do I need to code it differently ?
  • Or is this a bug in MW's code ?
Thanks in advance for all your remarks / advice ! :)



PS: on a sidenote: I noticed that sometimes adjustments you make in a custom column's conditions are not reflected in the column itself until you uncheck 'bar updates' in the custom column's settings, click ok, and then check 'bar updates' again.
206
 
Last edited:
Top