NinjaTrader and DLL's (creating and loading how-to) - NinjaTrader Programming | futures io social day trading
futures io futures trading


NinjaTrader and DLL's (creating and loading how-to)
Updated: Views / Replies:9,233 / 44
Created: by rleplae Attachments:18

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 18  
 
Thread Tools Search this Thread
 

NinjaTrader and DLL's (creating and loading how-to)

  #11 (permalink)
Elite Member
Birmingham UK
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IG/eSignal
Favorite Futures: Dax
 
ratfink's Avatar
 
Posts: 3,336 since Dec 2012
Thanks: 11,276 given, 7,091 received

cheers

@rleplae,

Thank you for excellent presentation of really good information, superb! Link bookmarked.

I currently build all my other classes just under Ninja, inside or outside it's own namespaces, but this makes using VS look very cool.

Cheers!

Travel Well
Reply With Quote
The following 4 users say Thank You to ratfink for this post:
 
  #12 (permalink)
Elite Member
@ Germany
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: FDAX
 
Posts: 441 since Nov 2011
Thanks: 254 given, 369 received


rleplae View Post
@Koepisch Thank you for your appreciation
I think we would go too far off-topic to discuss your particular problem in this thread, but I will be happy to brain-storm with you, in a dedicated thread. To my knowledge NT does not have published "api" to scroll the chart or position the chart.

This thread is about how to create a DLL and install and use it in NT.
Any questions and problems encountered, making abstractions of what exactly you want to do in the DLL are welcome on this thread.

Thanks for your answer. The chart scrolling isn't the problem, i've already done that. I thought that enhance the DLL from uni- to bidirectional communication were a good functionality for a common NT AddOn DLL framework. Still happy to follow your thread.

Reply With Quote
The following user says Thank You to Koepisch for this post:
 
  #13 (permalink)
Elite Member
Birmingham UK
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IG/eSignal
Favorite Futures: Dax
 
ratfink's Avatar
 
Posts: 3,336 since Dec 2012
Thanks: 11,276 given, 7,091 received



Koepisch View Post
Hi @rleplae, i very appreciate your contributions. I'm sure that it will help a lot of people having the same tasks. I like the many pictures, because it helps visualize the stuff and then it's far better to understand.

I want to make an suggestion for an issue i'm facing currently. I want to raise an event within NT (execute function within NT) from my dedicated C# solution. In my external solution i have imported the OHLC data from NT and running my trading logik. As results i have the trade setups and backtesting statistics. NOW i want to select single trades in my program and want to control NT to scroll the trade location in the center of the chart view. I could do it via an POLLING pattern at OnBarUpdate but i don't want go this way for various reasons. I'm still searching an BM for related Posts, but i think it will match this thread too.

Thanks Koepisch


Koepisch View Post
Thanks for your answer. The chart scrolling isn't the problem, i've already done that. I thought that enhance the DLL from uni- to bidirectional communication were a good functionality for a common NT AddOn DLL framework. Still happy to follow your thread.

Sorry for also off-topic, let's take it elsewhere, but:

Two thoughts:

1) Would you be interested in sharing the chart scrolling/positioning code? a few of us would find that useful.

2) For your particular problem have you checked out the TriggerCustomEvent Ninja approach? That way you could use the timer event or send Windows events and service them.

Travel Well
Reply With Quote
The following 2 users say Thank You to ratfink for this post:
 
  #14 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,501 since Sep 2013
Thanks: 1,706 given, 3,704 received
Forum Reputation: Legendary

Communication versus DLL


Koepisch View Post
Thanks for your answer. The chart scrolling isn't the problem, i've already done that. I thought that enhance the DLL from uni- to bidirectional communication were a good functionality for a common NT AddOn DLL framework. Still happy to follow your thread.

It is probably good to make the code on the NT side the master in terms of push/pull
for threading and consistency reasons

The code you have running on NT can push things to a method in your DLL
and the code can Poll the external side by call another method, which is a 'poll'.

This allows to communicate both ways, only it's not real-time.

Alternatively you can use 'loose coupling'.
I have done another implementation, where the code could not be linked together, due to .NET 4.0
and i made a stand alone process that was listening on a TCP/IP socket with the .NET 4.0 software,
so i didn't have to load the code in the NT memory address space.

I have a feeling that this second approach is closer to what you want to do.

Reply With Quote
The following 3 users say Thank You to rleplae for this post:
 
  #15 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,501 since Sep 2013
Thanks: 1,706 given, 3,704 received
Forum Reputation: Legendary


ratfink View Post
Sorry for also off-topic, let's take it elsewhere, but:

Two thoughts:

1) Would you be interested in sharing the chart scrolling/positioning code? a few of us would find that useful.

2) For your particular problem have you checked out the TriggerCustomEvent Ninja approach? That way you could use the timer event or send Windows events and service them.

Sounds like a great new thread : NinjaTrader and Event driving (creating and loading how-to)

Reply With Quote
The following 3 users say Thank You to rleplae for this post:
 
  #16 (permalink)
Elite Member
Birmingham UK
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IG/eSignal
Favorite Futures: Dax
 
ratfink's Avatar
 
Posts: 3,336 since Dec 2012
Thanks: 11,276 given, 7,091 received


rleplae View Post
Sounds like a great new thread : NinjaTrader and Event driving (creating and loading how-to)

Great idea and I'd love someone else to do it, otherwise I will do it when I've got KeyTrader finished, an update for ChartMinder out, a month's trading and 2 week's vacation out of the way. Ok, this primadonna over and out.

Travel Well
Reply With Quote
The following 2 users say Thank You to ratfink for this post:
 
  #17 (permalink)
Elite Member
Atkinson, NH USA
 
Futures Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker/Data: NinjaTrader Brokerage
Favorite Futures: Futures, CL, ES, ZB
 
NJAMC's Avatar
 
Posts: 1,925 since Dec 2010
Thanks: 2,962 given, 2,294 received


ratfink View Post
Sorry for also off-topic, let's take it elsewhere, but:

Two thoughts:

1) Would you be interested in sharing the chart scrolling/positioning code? a few of us would find that useful.

2) For your particular problem have you checked out the TriggerCustomEvent Ninja approach? That way you could use the timer event or send Windows events and service them.

You might be able to get an example of "TriggerCustomEvent" from the LOM software. I believe I had to integrate that for certain events to work properly.

Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Reply With Quote
The following 3 users say Thank You to NJAMC for this post:
 
  #18 (permalink)
Trading Apprentice
Earth
 
Futures Experience: Intermediate
Platform: NinjaTrader
 
Posts: 18 since Feb 2010
Thanks: 3 given, 6 received

Thanks for the detailed tutorial.
Quick question about the usage: If the dll is recompiled and overwritten does NT need to be restarted or is a simple reload strategy enough to load the updated dll?

Reply With Quote
 
  #19 (permalink)
Elite Member
Naperville IL
 
Futures Experience: Intermediate
Platform: ninjatrader
Broker/Data: NT broker
Favorite Futures: NQ ES 6E GC CL
 
Posts: 954 since Feb 2010
Thanks: 1,184 given, 650 received

quick question about dll

I got an indicator, it includes dll and cs...

is it safe to use it? I mean somebody might track my system?

thanks

Reply With Quote
 
  #20 (permalink)
Elite Member
Atkinson, NH USA
 
Futures Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker/Data: NinjaTrader Brokerage
Favorite Futures: Futures, CL, ES, ZB
 
NJAMC's Avatar
 
Posts: 1,925 since Dec 2010
Thanks: 2,962 given, 2,294 received



symphys View Post
Thanks for the detailed tutorial.
Quick question about the usage: If the dll is recompiled and overwritten does NT need to be restarted or is a simple reload strategy enough to load the updated dll?

@symphys,

There are certainly experts that can answer this question, but if you import the DLL I would say it is okay to use. Overwriting seems like you need to force the system to recompile at a minimum as I think it collects the .NET files into cache files. I don't know that you need to restart, but you should recompile. I would say a reload might not even refresh the contents of the strategy, so I would recompile always.

Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Reply With Quote

Reply



futures io > > > > > NinjaTrader and DLL's (creating and loading how-to)

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use NTDirect.dll or NinjaTrader.Client in NinjaScript? vantojo NinjaTrader Programming 7 January 15th, 2014 06:39 AM
Interactive Brokers Gateway / Ninjatrader not loading weekly and monthly charts? luvs321 NinjaTrader 3 January 10th, 2014 02:05 PM
How-to remove .dll files from NinjaTrader PandaWarrior NinjaTrader 7 October 1st, 2012 08:21 AM
Please help creating a NinjaTrader Indicator jjl1753 NinjaTrader Programming 4 June 13th, 2011 10:26 PM
External DLL from Ninjatrader ehlaban NinjaTrader Programming 11 June 13th, 2010 12:42 PM


All times are GMT -4. The time now is 03:11 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-14 in 0.13 seconds with 20 queries on phoenix via your IP 54.145.16.43