c# With Neoticker Basics

C# discussion

Moderator: moderators

euro99
rank: <50 posts
rank: <50 posts
Posts: 14
Joined: Mon Apr 02, 2007 12:43 pm
Reputation: 0
Gender: Male

c# With Neoticker Basics

Postby euro99 » Sun May 27, 2007 3:02 pm

I thought this thread might be useful for others (like me) who are working their way through Neoticker, but prefer to use c# and IDL as a development combination from the very beginning.

My reasons for bypassing (as far as possible) Scripts, BackTestEZ (or whatever) and jumping straight to c# are (1) That I am happier working in c#, (2) That I know I am going to want a unified environment for optimisation and performance analysis outside Neoticker itself - and I would like to retain control of that environment from the first day and (3) That - although it doesn't appear to be the most natural integration in the world the ability to use c# as the development language was one of my reasons for choosing NT.

The fact that the documentation is scant, and the examples very basic just seems to be par for the course with NT. I have no intention of using the better supported Delphi because I left Delphi and Object Pascal alone years ago for .net.

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

euro99
rank: <50 posts
rank: <50 posts
Posts: 14
Joined: Mon Apr 02, 2007 12:43 pm
Reputation: 0
Gender: Male

Postby euro99 » Sun May 27, 2007 3:25 pm

Creating the C# DLL

Using Visual Studio (or other C# editor) create a new project of type class library. Set the project options so that it will output a dll into a named directory (this is the dll directory you referred to in Creating the wrapper above).

Add a project reference (Project / Add Reference / Browse tab) to the Neoticker interop dll (this can be found in the neoticker samples / c# directory ? is there a more stable location for the latest version?).

Add a using clause to your prinicpal class file (using Neoticker) and make a note of the namespace and principal class name (you will need these when creating a wrapper script in Neoticker).

Creating the wrapper

Using the Neoticker script editor (Program / Script Editor) create a new script. In the Setup section (Indicator / Setup) name the indicator, and enter a description. Set the Language to IDL and the class to Indicator. For the time being ignore the other settings

Under the IDL Tab, ignore the External File and ActiveX Class. Set the name (and directory, if appropriate) of the .net dll which your .net project will output, and in the .net class text box set the Namespace and classname (Namespace.ClassName) of the class which will implement IDLCallEx.

Ensure that the Early Binding option is checked.

Check that the wrapper verifies (Indicator / Verify) and installs (Indicator / Install)

Questions:-

1. Is there a standard location where any newly updated neoticker interop dll would be published?

Luke
rank: 50+ posts
rank: 50+ posts
Posts: 65
Joined: Sat Jul 01, 2006 1:46 pm
Reputation: 0
Gender: Male

Postby Luke » Fri Jun 01, 2007 3:06 am

No. The interop dll is generated automatically but the actual referenced com file is the NeoTicker.exe executable. I have submitted a suggestion in the NT forum that they include the dll separately for indicator deployment.

Luke
rank: 50+ posts
rank: 50+ posts
Posts: 65
Joined: Sat Jul 01, 2006 1:46 pm
Reputation: 0
Gender: Male

Postby Luke » Thu Jun 07, 2007 11:21 pm

TickQuest has included the interop dll in the indicator folder as of the latest build.

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.


Return to “C# coding for NeoTicker”