Scanner - can't mix data types in indicator?  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
stocksbaron
Posts: 9
Joined: 10 Apr 2013
Has thanked: 2 times

Scanner - can't mix data types in indicator?

Postby stocksbaron » 22 Aug 2013

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!

User avatar
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?

Postby Henry MultiСharts » 22 Aug 2013

Stocksbaron, please attach a sample code you have problem with and a screenshot demonstrating this behavior.

stocksbaron
Posts: 9
Joined: 10 Apr 2013
Has thanked: 2 times

Re: Scanner - can't mix data types in indicator?

Postby stocksbaron » 22 Aug 2013

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);
}
Once attached to the scanner, it only shows the number, not the text (plot_str). Am using MC.NET 8.7 x64 Build 7574. Thanks!

User avatar
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]

Postby Henry MultiСharts » 23 Aug 2013

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.

stocksbaron
Posts: 9
Joined: 10 Apr 2013
Has thanked: 2 times

Re: Scanner - can't mix data types in indicator?

Postby stocksbaron » 23 Aug 2013

Brilliant, thanks!


Return to “MultiCharts .NET”