Using Script Driven Text within Realtime Scanner  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
FB2013
Posts: 20
Joined: 12 Mar 2013
Has thanked: 3 times
Been thanked: 5 times

Using Script Driven Text within Realtime Scanner

Postby FB2013 » 16 Apr 2013

Hello,

i have seen in the features list of MC.Net that it should be possible to display text messages generated by studies within the Realtime Scanner. How can that be realized within a study.
I tried to insert the head and shoulder indicator to the realtime scanner, which puts out text on the chart but that did not show up in the scanner.

Best regards

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Using Script Driven Text within Realtime Scanner  [SOLVED]

Postby Henry MultiСharts » 17 Apr 2013

Hello FB2013,

Text plots are represented by the following interface:

Code: Select all

public interface IPlotObjectStr : IPlotObjectBase<string>
{
}
Let’s illustrate it with an example. The indicator will output values to the status line: “UP” when Close > Open and “DN” when < Open :

Code: Select all

public class UpDn : IndicatorObject {
public UpDn(object _ctx):base(_ctx){}
private IPlotObjectStr plot_str;
protected override void Create() {
plot_str = AddPlot(new StringPlotAttributes(1));
}
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);
}
}

FB2013
Posts: 20
Joined: 12 Mar 2013
Has thanked: 3 times
Been thanked: 5 times

Re: Using Script Driven Text within Realtime Scanner

Postby FB2013 » 17 Apr 2013

Thank you very much great support.


Return to “MultiCharts .NET”