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
Using Script Driven Text within Realtime Scanner [SOLVED]
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: Using Script Driven Text within Realtime Scanner [SOLVED]
Hello FB2013,
Text plots are represented by the following interface:
Let’s illustrate it with an example. The indicator will output values to the status line: “UP” when Close > Open and “DN” when < Open :
Text plots are represented by the following interface:
Code: Select all
public interface IPlotObjectStr : IPlotObjectBase<string>
{
}
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);
}
}