Could anyone give a short example of how to use IapplicationInfo? I try to move a text to the top left corner. I don't seem to be able to reference the chart_info.
Many thanks,
Zoli
Code: Select all
using System;
using System.Drawing;
using System.Linq;
using PowerLanguage.Function;
namespace PowerLanguage.Indicator{
public class test : IndicatorObject
{
public test(object _ctx) : base(_ctx) { }
private IApplicationInfo chart_info;
private ITextObject text1;
private ChartPoint text_chart_point;
protected override void Create()
{
}
protected override void StartCalc()
{
}
protected override void CalcBar()
{
if (text1 == null)
{
text_chart_point.Time = Bars.Time[0];
text_chart_point.Price = Bars.High[0];
text1 = DrwText.Create(text_chart_point, "Test");
}
else
{
text_chart_point.Time = chart_info.LeftScreenTime;
text_chart_point.Price = chart_info.HighestScaleValue;
text1.Text = "Test OK";
text1.Location = text_chart_point;
}
}
}
}