I have some troubles while editing a new indicator.
My purpose would be to create a customized indicator with a function called from a dll.
Here is a simple example :
*** Variables region *** [COLOR=DarkOrange][DllImport("MyCDll.dll")] static extern double Identity(double value);[/COLOR] /// <summary> /// This method is used to configure the indicator and is called once before any bar data is loaded. /// </summary> protected override void Initialize() { Add(new Plot(Color.FromKnownColor(KnownColor.Aquamarine), PlotStyle.Line, "Plot0")); Overlay = true; } /// <summary> /// Called on each bar update event (incoming tick) /// </summary> protected override void OnBarUpdate() { // Use this method for calculating your indicator values. Assign a value to each // plot below by replacing 'Close[0]' with your own formula. [COLOR=DarkOrange]Plot0.Set(Identity(Close[0]));[/COLOR] } *** Properties region ***
extern "C" double Identity(double value) { return value; }
I select MyCDll.dll which contains the Identity function code and then I confirm.
This message appears a the bottom of the ninja script window :
The dll is generated under Visual Studio 2010 for both 32 and 64 bits platforms.
The message is the same no matter what is the platform selected.
Can someone rescue me?
The error seems coming from the C# compiler but nothing in the web was useful from me.
Thanks,
Nasire.
Comment