IapplicationInfo  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
Zoli
Posts: 90
Joined: 12 Sep 2012
Has thanked: 24 times
Been thanked: 38 times

IapplicationInfo

Postby Zoli » 07 Oct 2012

Hi,

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;
}
}
}
}

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

Re: IapplicationInfo  [SOLVED]

Postby Henry MultiСharts » 08 Oct 2012

Hello Zoli,

Attached is a sample script.
Attachments
Test.pln
(1.19 KiB) Downloaded 653 times

Zoli
Posts: 90
Joined: 12 Sep 2012
Has thanked: 24 times
Been thanked: 38 times

Re: IapplicationInfo

Postby Zoli » 08 Oct 2012

Many thanks Henry.


Return to “MultiCharts .NET”