I am trying to call functions in a C# dll.
Code: Select all
external method: "ClassLibrary1.dll", double, "SwissWrapper.Add", double, double;
..
value77 = SwissWrapper.Add(3.6, 7.2);
print ("Ret_My_lib ", value77);
Code: Select all
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//using PowerLanguage;
//#import "c:\Program Files\TS Support\MultiCharts64\PLKit.dll" no_namespace;
namespace AstroLib
{
public class SwissWrapper
{
public static double Add(double x, double y)
{
return (x + y);
}
public static double Subtract(double x, double y)
{
return (x - y);
}
}
}
When running the strategy MC rises the error message: Cannot find function " SwissWrapper.Add".
Can somebody help with the C# file.
Thanks
Urich