I've created a market scanner that includes a column for the built-in ADX indicator. The text for the indicator is set to a default color of grey. I'm looking for a way to have the text change to a different color (e.g., to green) if the ADX is in a certain range (e.g., above 20).
Is there any way to do this using the built-in indicator, or would I need to "roll my own" indicator to support the color-changing functionality? Thanks.
Conditional color in Market Scanner? [SOLVED]
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Conditional color in Market Scanner? [SOLVED]
I don't know if there's a built-in indicator that does such a thing already, but this can be be quickly coded with the SetPlotBGColor keyword.
An untested example of that would be:
An untested example of that would be:
Code: Select all
Variables:
adxValue(0);
adxValue = ADX(10);
Plot1(adxValue, "ADX");
if (adxValue > 20) then
SetPlotBGColor(1, green)
else
SetPlotBGColor(1, grey);
Re: Conditional color in Market Scanner?
Thanks very much, Josh! It would be nice, though, to have this feature available using built-in indicators. I'll submit a feature request to that effect in the project management section.