RTD Server. SymbolData Indicator not compiled.

Questions about MultiCharts .NET and user contributed studies.
Louis88
Posts: 24
Joined: 11 May 2013
Has thanked: 28 times
Been thanked: 1 time

RTD Server. SymbolData Indicator not compiled.

Postby Louis88 » 30 Jun 2017

Hello,
I’m trying to install an RTD Server on my pc.
OS is Windows 10 Pro
MC is .NET64 Version 10.0 Release (Build 14420)
RTD Server is 1.0.56.400_Release_net_x64.

SymbolData Indicator doesn’t compile, errors as follows:
(Apologies for bad formatting ).

Impossibile convertire implicitamente il tipo 'System.Type' in 'PowerLanguage.Indicator.Type'.
"SymbolData" [Indicator]
Ln 73


La corrispondenza migliore del metodo di overload per 'System.Activator.CreateInstance(System.Type, params object[])' presenta alcuni argomenti non validi
"SymbolData" [Indicator]
Ln 74


Argomento 1: impossibile convertire da 'PowerLanguage.Indicator.Type' a 'System.Type'
"SymbolData" [Indicator]
Ln 74


'PowerLanguage.Indicator.Type' non contiene una definizione di 'GetMethod' e non è stato trovato alcun metodo di estensione 'GetMethod' che accetta un primo argomento di tipo 'PowerLanguage.Indicator.Type'. Probabilmente manca una direttiva using o un riferimento a un assembly.
"SymbolData" [Indicator]
Ln 75

I’ve checked for any MC process running before RTD Server exe launch.
Then uninstalled, restarted the system and installed again, with no success.
Any hint appreciated.
Thanks for your time.
Louis88

User avatar
Angelina MultiСharts
Posts: 260
Joined: 28 Dec 2016
Has thanked: 28 times
Been thanked: 66 times

Re: RTD Server. SymbolData Indicator not compiled.

Postby Angelina MultiСharts » 30 Jun 2017

Louis88,

Did you make any changes to the RTD server itself?

Louis88
Posts: 24
Joined: 11 May 2013
Has thanked: 28 times
Been thanked: 1 time

Re: RTD Server. SymbolData Indicator not compiled.

Postby Louis88 » 01 Jul 2017

Angelina,
I didn't make any changes to the RTD Server itself.

Louis88
Posts: 24
Joined: 11 May 2013
Has thanked: 28 times
Been thanked: 1 time

Re: RTD Server. SymbolData Indicator not compiled.

Postby Louis88 » 03 Jul 2017

Angelina,
here errors description in english language:

Severity
Error

Code
CS0029

Description
Cannot implicitly convert type 'System.Type' to 'PowerLanguage.Indicator.Type'

Project
PLStudies2010

File
C:\ProgramData\TS Support\MultiCharts .NET64\StudyServer\Techniques\CS\SymbolData.Indicator.CS

Line
73

Suppression State
Active



Severity
Error

Code
CS1503

Description
Argument 1: cannot convert from 'PowerLanguage.Indicator.Type' to 'System.Type'

Project
PLStudies2010

File
C:\ProgramData\TS Support\MultiCharts .NET64\StudyServer\Techniques\CS\SymbolData.Indicator.CS

Line
74

Suppression State
Active



Severity
Error

Code
CS1061

Description
'Type' does not contain a definition for 'GetMethod' and no extension method 'GetMethod' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)

Project
PLStudies2010

File
C:\ProgramData\TS Support\MultiCharts .NET64\StudyServer\Techniques\CS\SymbolData.Indicator.CS

Line
75

Suppression State
Active

Hope this helps.
Thanks
Louis88

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: RTD Server. SymbolData Indicator not compiled.

Postby JoshM » 08 Jul 2017

It looks to me that you have some programming errors in your script (SymbolData.Indicator.CS). Based on the error messages, I don't think this is related to RTD server. Can you post the code of the script that generates the errors?

Louis88
Posts: 24
Joined: 11 May 2013
Has thanked: 28 times
Been thanked: 1 time

Re: RTD Server. SymbolData Indicator not compiled.

Postby Louis88 » 11 Jul 2017

Hello JoshM,
here's the script:

Code: Select all

using System;
using System.Drawing;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
using PowerLanguage.Function;

namespace PowerLanguage.Indicator{
public class SymbolData : IndicatorObject {

public SymbolData(object _ctx):base(_ctx){}

private const string assemblyRTDName = "MCRTDSenderCLR.dll";
private Assembly assemblyRTD = null;

protected override void StartCalc() {
load_assembly();
registerRTDrequest(true);
}

protected override void StopCalc() {
registerRTDrequest(false);
assemblyRTD = null;
}

protected override void CalcBar() {
sendCurrentData();
}

private void load_assembly() {
try {
if (null == assemblyRTD)
assemblyRTD = Assembly.LoadFrom(assembly_path_impl());
}
catch(FileNotFoundException) {
PublicFunctions.RaiseRunTimeError("RTD is not installed!");
}
}

private string assembly_path_impl() {
var enviromentPath = System.Environment.GetEnvironmentVariable("PATH");
string[] paths = enviromentPath.Split(';');
foreach(string path in paths)
if (new FileInfo(path + assemblyRTDName).Exists)
return path + assemblyRTDName;
return assemblyRTDName;
}

private void registerRTDrequest(bool reg_unreg) {
try
{
invokeRTDmethod(reg_unreg ? "RegisterNew" : "Unregister",
new object[5] {Bars.Info.Name, Name, (Int32)Bars.Info.Resolution.Type, (Int32)Bars.Info.Resolution.Size, 0});
}
catch(Exception exc) {
PublicFunctions.RaiseRunTimeError("Exception: " + exc.Message);
}
}

private void sendCurrentData() {
try
{
invokeRTDmethod("SendRTDOHLC",
new object[12] {Bars.Info.Name, Name, (Int32)Bars.Info.Resolution.Type, (Int32)Bars.Info.Resolution.Size, 0,
Bars.OpenValue, Bars.HighValue, Bars.LowValue, Bars.CloseValue, Bars.TimeValue, Bars.VolumeValue, Bars.CurrentBar});
}
catch(Exception exc) {
PublicFunctions.RaiseRunTimeError("Exception: " + exc.Message);
}
}

private void invokeRTDmethod(string methodName, object[] parameters) {
Type type = assemblyRTD.GetType("MCRTDSenderCLR.DataSender");
object instance = Activator.CreateInstance(type);
MethodInfo method = type.GetMethod(methodName);
method.Invoke(instance, parameters);
}
}
}
Thanks for your interest.

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: RTD Server. SymbolData Indicator not compiled.

Postby JoshM » 11 Jul 2017

Thanks for your interest.
This is beyond my understanding unfortunately. Hopefully someone else can jump in.


Return to “MultiCharts .NET”