Problems of compiling  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
Phonix88
Posts: 17
Joined: 12 Sep 2013
Has thanked: 10 times
Been thanked: 2 times

Problems of compiling

Postby Phonix88 » 13 Sep 2013

Hi,
exploring the MC.NET platform I have created a indicator and I have pasted in the file this code:

Code: Select all

using System;
using System.Drawing;
using System.Linq;
using PowerLanguage.Function;

namespace PowerLanguage.Indicator{
public class DAY_GAP : IndicatorObject {
public DAY_GAP(object _ctx):base(_ctx){}
private IPlotObject plot_gap;//Plot object for graph drawing
protected override void Create() {
//Adds a graph to the chart
plot_gap = AddPlot(new PlotAttributes("GAP",EPlotShapes.Histogram, Color.Red));
}
protected override void CalcBar(){
// Determines next bar plot value
plot_gap.Set(100*((Bars.Open[0] - Bars.Close[1])/Bars.Open[0]));
}
}
}
After I have compiled it, and the editor of MC.NET haven't returned me errors or other messages.

At this stage I have tryed to insert it in a chart but the software return me that the indicator isn't compiled.

Trying with installed visual studio 2010 and 2012 the result is the same.

Any one have suggestions?
Attachments
Cattura.JPG
(229.01 KiB) Downloaded 469 times

Dru
Posts: 107
Joined: 28 Aug 2007
Has thanked: 4 times
Been thanked: 171 times

Re: Problems of compiling  [SOLVED]

Postby Dru » 13 Sep 2013

Your indicator must have name "DAY_GAP" - the same way your class is named.

Phonix88
Posts: 17
Joined: 12 Sep 2013
Has thanked: 10 times
Been thanked: 2 times

Re: Problems of compiling

Postby Phonix88 » 13 Sep 2013

Thanks a lot, your replay was very useful!


Return to “MultiCharts .NET”