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

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

Thanks Bukkan,

I got everything working now and called my homemade dll's from NT.
Wouldn't be possible without your help.

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
ZombieSqueeze
Platforms and Indicators
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
60 thanks
Funded Trader platforms
43 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #12 (permalink)
 Tarkus11 
East Coast
 
Experience: Beginner
Platform: Ninja
Trading: ES, NQ
Posts: 124 since Apr 2010
Thanks Given: 55
Thanks Received: 80


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?!?



I figured out how to import an old .dll from another platform.

I copied the .dll directly into the \program files\NT folder - haven't tried the MyDocs\Custom location.

1) You may have to add any relevant declarations in the "Using declarations" region if you need some functions not included by default. In my case I needed to add "using System.Runtime.InteropServices;"
2) Under the "public class" region, you will have to add the .dll, and its parameters:
e.g.

public class MyIndicator : Indicator
{
[DllImport("MyExternal.dll")]
public static extern double MyX_SetDouble(double param1, double param2);

#region Variables
.... your variables, etc
#endregion



The rest of your stuff...

}

Hope this helps.

Reply With Quote




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