I have a complex indicator and I would like to output both text and numbers, e.g.
Trend | Entry | Exit
Up | 12.3 | 32.2
However, the scanner does not seem to support this scenario. In this case, the only option seems to me to create another text-output indicator based on the same functions that I have used in the data-output indicator, and add it to the scanner as well.
Charts, however, correctly display this information, just not the scanner.
Please advise - sample code would be great. Thanks!
Scanner - can't mix data types in indicator? [SOLVED]
-
- Posts: 9
- Joined: 10 Apr 2013
- Has thanked: 2 times
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Scanner - can't mix data types in indicator?
Stocksbaron, please attach a sample code you have problem with and a screenshot demonstrating this behavior.
-
- Posts: 9
- Joined: 10 Apr 2013
- Has thanked: 2 times
Re: Scanner - can't mix data types in indicator?
Code: Select all
private IPlotObjectStr plot_str;
private IPlotObject plot_nr;
protected override void Create() {
plot_str = AddPlot(new StringPlotAttributes("Text", Color.Yellow));
plot_nr = AddPlot(new PlotAttributes("test", EPlotShapes.Point, Color.Red));
}
protected override void CalcBar(){
plot_str.Set("FLAT", Color.Cyan);
if (Bars.OpenValue < Bars.CloseValue)
plot_str.Set("UP", Color.Yellow);
if (Bars.OpenValue > Bars.CloseValue)
plot_str.Set("DN", Color.Red);
plot_nr.Set(Bars.CloseValue);
}
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Scanner - can't mix data types in indicator? [SOLVED]
Please right click on your study plot in the scanner window -> Show plots->Select both plots.
I will also forward this case to our developers in order to make it work from the box.
I will also forward this case to our developers in order to make it work from the box.
-
- Posts: 9
- Joined: 10 Apr 2013
- Has thanked: 2 times