Spin
Well-known member
- Joined
- May 22, 2019
- Posts
- 477
- Likes
- 191
Dear panel, I have to come and pick your brain again.
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:
and -no surprise there- this does draw markers on the chart when conditions are met:
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:
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 !
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 ?
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
(Please refer to the screenshot in the next post, this forum only allows 5 attachments in one post)
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:
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:
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 !
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 ?
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
(Please refer to the screenshot in the next post, this forum only allows 5 attachments in one post)