NexusFi: Find Your Edge


Home Menu

 





External DLL from Ninjatrader


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one bukkan with 5 posts (8 thanks)
    2. looks_two ehlaban with 4 posts (1 thanks)
    3. looks_3 max-td with 1 posts (1 thanks)
    4. looks_4 Tarkus11 with 1 posts (4 thanks)
      Best Posters
    1. looks_one Tarkus11 with 4 thanks per post
    2. looks_two bukkan with 1.6 thanks per post
    3. looks_3 max-td with 1 thanks per post
    4. looks_4 ehlaban with 0.3 thanks per post
    1. trending_up 16,171 views
    2. thumb_up 14 thanks given
    3. group 7 followers
    1. forum 11 posts
    2. attach_file 1 attachments




 
Search this Thread

External DLL from Ninjatrader

  #1 (permalink)
 ehlaban 
Netherlands
 
Experience: Advanced
Platform: Ensign, Multicharts
Trading: SP500
Posts: 91 since Nov 2009
Thanks Given: 66
Thanks Received: 57

Hello,

I'm looking for an example on how to call an external dll from Ninjatrader.
Have been looking on this and ninjatraders forum but haven't found an example.

Have been developing indicators in vb.net for some time now and made my own
programs. But using ninjatrader as a front end seems a better path.

Lets say i have an dll that does one thing adding two numbers. MyCalc.dll

The function is AdUp(nbrfirst as double, nbrSecond as double) as double

How can i use the function from the dll in ninjatrader.

Really hope to get some hints and directions to get me started.

Ernesto

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Exit Strategy
NinjaTrader
Ninja Mobile Trader VPS (ninjamobiletrader.com)
Trading Reviews and Vendors
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
 
  #3 (permalink)
 bukkan 
Calcutta, India
 
Experience: Intermediate
Platform: ArthaChitra
Posts: 278 since Jun 2009
Thanks Given: 161
Thanks Received: 271



ehlaban View Post
Hello,

I'm looking for an example on how to call an external dll from Ninjatrader.
Have been looking on this and ninjatraders forum but haven't found an example.

Have been developing indicators in vb.net for some time now and made my own
programs. But using ninjatrader as a front end seems a better path.

Lets say i have an dll that does one thing adding two numbers. MyCalc.dll

The function is AdUp(nbrfirst as double, nbrSecond as double) as double

How can i use the function from the dll in ninjatrader.

Really hope to get some hints and directions to get me started.

Ernesto

its pretty easy. copy the dll to the <My Documents>\NinjaTrader 7\bin\Custom\ folder (make sure nt is closed when you do so). make a declaration of the same in the ninjascript. create object and you are set.

here is an example which can help you.

MODS: the link goes to my site. pls edit/remove the same if you find the same as spam.

Reply With Quote
Thanked by:
  #4 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

are you selling something on your page bukkan ?
if its not commercial a link is no problem in our view.

-

max-td
Reply With Quote
Thanked by:
  #5 (permalink)
 ehlaban 
Netherlands
 
Experience: Advanced
Platform: Ensign, Multicharts
Trading: SP500
Posts: 91 since Nov 2009
Thanks Given: 66
Thanks Received: 57

Thanks Bukkan,

But my problem is in the part
" ... make a declaration of the same in the ninjascript. create object and you are set ..."

I've read something about dllimport etc but haven't seen an implementation in NT.
Just looking for a simple code example to go my way.

Ernesto

Started this thread Reply With Quote
  #6 (permalink)
 bukkan 
Calcutta, India
 
Experience: Intermediate
Platform: ArthaChitra
Posts: 278 since Jun 2009
Thanks Given: 161
Thanks Received: 271


max-td View Post
are you selling something on your page bukkan ?
if its not commercial a link is no problem in our view.

-

theres nothing in the site which $$ except for the google ads which helps me to pay for the host etc

Reply With Quote
Thanked by:
  #7 (permalink)
 bukkan 
Calcutta, India
 
Experience: Intermediate
Platform: ArthaChitra
Posts: 278 since Jun 2009
Thanks Given: 161
Thanks Received: 271


ehlaban View Post
Thanks Bukkan,

But my problem is in the part
" ... make a declaration of the same in the ninjascript. create object and you are set ..."

I've read something about dllimport etc but haven't seen an implementation in NT.
Just looking for a simple code example to go my way.

Ernesto

on the first run intellisense will not show the same. open any custom indicator/strategy and compile the same. restart NT and it will be fine. see the sample to get an idea.

Reply With Quote
  #8 (permalink)
 ehlaban 
Netherlands
 
Experience: Advanced
Platform: Ensign, Multicharts
Trading: SP500
Posts: 91 since Nov 2009
Thanks Given: 66
Thanks Received: 57

Hi,

I'm afraid i don't understand what you are writing.

On your page i see info about DDE and no scripts . I'm using chrome.

But i'm not looking for DDE or DDE libraries. Simply the code on how to call
an external dll from NinjaTrader 7.

Lets say i have an dll that does one thing adding two numbers. MyCalc.dll

The function is AdUp(nbrfirst as double, nbrSecond as double) as double

How can i use the function from the dll in ninjatrader.


It could be you answered my question perfectly but i'm not able to see how?!?

Started this thread Reply With Quote
  #9 (permalink)
 bukkan 
Calcutta, India
 
Experience: Intermediate
Platform: ArthaChitra
Posts: 278 since Jun 2009
Thanks Given: 161
Thanks Received: 271


ehlaban View Post
Hi,

I'm afraid i don't understand what you are writing.

On your page i see info about DDE and no scripts . I'm using chrome.

But i'm not looking for DDE or DDE libraries. Simply the code on how to call
an external dll from NinjaTrader 7.

Lets say i have an dll that does one thing adding two numbers. MyCalc.dll

The function is AdUp(nbrfirst as double, nbrSecond as double) as double

How can i use the function from the dll in ninjatrader.


It could be you answered my question perfectly but i'm not able to see how?!?

have you downloaded the codes.

you will find 2 dlls which you have to copy. there is a ninja script too

see the codes in the ninjascript

line 12,13
 
Code
using NDde.Server;
using NinjaDDE;
line 49
 
Code
server = new NinjaServer(topic);

Reply With Quote
Thanked by:
  #10 (permalink)
 bukkan 
Calcutta, India
 
Experience: Intermediate
Platform: ArthaChitra
Posts: 278 since Jun 2009
Thanks Given: 161
Thanks Received: 271


for your perusal

Attached Files
Elite Membership required to download: NinjaTraderDDE.zip
Reply With Quote
Thanked by:




Last Updated on June 13, 2010


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts