Calling c# dll from easy language

ashok.iy

Newbie
Messages
4
Likes
0
I am new to easy language. I want to access a c#(managed) dll from easy language. Is it possible to access c# dll directly from easy language?
 
You should be able to do that. I have Tradestation 8.7 and I can refer to dlls, although I can't code dll stuff and refer to stuff from other people, so I'm not sure if they're coded in C#.

From Tradestation help:
DEFINEDLLFUNC (Reserved Word)
Reserved for use with custom DLLs designed for EasyLanguage. Refer to the documentation in the TradeStation Developer's Kit for more information about this and the EasyLanguage Tool Kit Library ELKIT32.DLL.

Here is example sintax to retrieve my balance from Interactive Brokers, using tradebullet.dll:
Code:
DefineDLLFunc: "TradeBullet2.dll", double, "TB2_CashValue", LPSTR;
Bankroll=TB2_CashValue("IB Account number here");
 
You should be able to do that. I have Tradestation 8.7 and I can refer to dlls, although I can't code dll stuff and refer to stuff from other people, so I'm not sure if they're coded in C#.

From Tradestation help:


Here is example sintax to retrieve my balance from Interactive Brokers, using tradebullet.dll:
Code:
DefineDLLFunc: "TradeBullet2.dll", double, "TB2_CashValue", LPSTR;
Bankroll=TB2_CashValue("IB Account number here");

Thanks for your reply,pecas. Sorry for not giving a quick response since i was busy with some other work. I need some answers hope you can help me out.
* What part of the code will be in the dll?
(I come to understand that part of the indicators can be coded inside dll and can be called from the easylanguage)
Please correct me if i am wrong.

Thanks in advance

ashok
 
Unfortunately all I can do is refer to dll functions, but I can't code dll myself, so I don't know the answer. In my example, I don't know what's the code for "TB2_CashValue" function, I just know how to call it in EasyLanguage.
 
You would be far better served by using C++ to write the DLL. If you use C# you will end up having to write a wrapper in C++ that then transfers the data to the C# interface.
 
Top