View Full Version : Dynamic Strategy Builder through ATI
whitmark
01-09-2006, 06:57 AM
I am currently using Ninja Trader ATI via theDLL connection and it works great!
However, it would be very useful if I could dynamically setthe strategy parametersettings through another set of DLL function calls just before I PLACE and order with the strategy reference. Therefore, rather than havingtopre-populateall of the different static strategy templates that I might need, Icoulddyamicallycreate or modify an existing one based on the underlying conditions. Any template error checking would be done when thefunction is called. A valid response from the strategy create or modify function would be my cue to place the order.
I assume thereare no capabilities to do this now through the ATI? Thanks for considering.
Regards,
Whitmark
NinjaTrader_Dierk
01-09-2006, 07:15 AM
What's the value of settings strategy parameter and later submit the strategy instead of doing it all by one DLL call?
whitmark
01-09-2006, 07:30 AM
I see your point. If the strategy parameters get rejected, it gets rejected. I guess I was thinking thatmaking a function with all of the strategy parameters plus the current command elements could be pretty unweildy, but one call would be nice.
Is this in the works?
NinjaTrader_Dierk
01-09-2006, 07:58 AM
Nope, not via ATI. This will get too complex. You probably should take a look at the NinjaTrader Framework, which provides you 100% access to strategies.
http://www.trademagic.net
whitmark
01-09-2006, 08:24 AM
This looks very promising, but I am notclear of the potential implications. I can use the ATI for order management but then manipulate the underlying components directly to create or mod a strategy on the fly? Does it make sense to bypass the ATI and manipulate Ninja objects and methods directly from my Dephi strategy DLLin NeoTicker? Are there any examples of how the framework can be usedaboveand beyond supporting the currentNinjaTrader product?
Regards,
Whitmark
NinjaTrader_Dierk
01-09-2006, 09:58 AM
The framwork is completely independant from the NT retail app: you really need to build your own trading app. You can not use both framework and ATI/NT app at the same time.
Framework tutorial: http://www.trademagic.net/phpBB2/viewtopic.php?t=92
If you "only" want to drive strategies from within Delphi, than I would not deal with that but setup a set of strategies you then could address through DLL/ATI.
whitmark
09-08-2006, 01:14 PM
I thought I would check back to see if you have evolved your thinking or product capabilities on allowing strategies to be dynamically defined in the place command or a separate DLL call prior to being submitted.
I really like the ability tooffload position management handling to Ninja via the ATIfrom my on bar completion system, but I would alsolike the ability tomodify stops, targets, etc, on the fly asmy trading system dictates just prior to placing the trade. However, Idon't want to 1) build my own order interface as you suggest nor 2) create and manage all of the possible setsof Ninja strategies that could be in the hundreds given all the potential combinations. Furthermore, bringing all that position managementinto my trading system defeats the purpose and efficiency of offloading all that tick-by-tick processing in the first place.
You guys are some of the most innovativedevelopers in this space. Surely, there must be a clever way to build a dynamic, just-in-time strategy builderthat can be accessed via a new DLL/ATI? Fwiw, I suspect if you build it, you willget great interest fromblack/gray box developers that are looking to offload this processing intensive function.
Regards,
Whitmark
NinjaTrader_Dierk
09-08-2006, 10:48 PM
NT6 will support custom strategies through NinjaScript. ETA: Fall 06
aspTrader
09-09-2006, 04:25 AM
Hi Dierk,
whitmark turned me on to this thread...
A question I've asked before... but related...
I want to be able to access order information about non-ATI placed orders (native NinjaTrader placed orders) through the ATI.
What do you think?
whitmark
09-09-2006, 08:57 AM
Obviously, I would like to see customizable strategiesextended to other platforms (like NeoTicker) that can leverage Ninja for their order execution platform. I am concerned that in an attempt to make Ninja Scriptmore appealing and its features more exclusive, you are pursuing a strategyto enable certain features(e.g., customizable strategies) thatyou do not intend to pass along to the ATIforother platforms to leverage.In this regard, if you're not planning to upgrade these types ofcustomizable enhancements tothe ATI in favor of direct access via Ninja Script, please give us a heads up to seek out alternatives. Otherwise, it would be most useful if an ATI method could be devised to enable this capability even if it meant submitting Ninja Script commands somehowthrough the interface.
Regards,
Whitmark
NinjaTrader_Ray
09-09-2006, 10:32 AM
We will continue to consider enhancements to our ATI for integration with external applications. Enhancing the ATI to provide functions for on the fly NinjaTrader position strategy creation is an interesting idea that I will add to our listfor future consideration. This is the first request of this nature and the suggestion is highlyappreciated.
Accessing internally generated orders via the ATI is already on our list for future consideration. At this time, there have not been a lot of requests for this feature.
Ray
whitmark
09-09-2006, 10:57 AM
Thanks, Ray, for your consideration. I suspect most who want this capability just roll there own interface and take Ninja out of the loop. But anyone who has done this realizes the burden of handling this process on a tick-by-tick basis in terms of added development effort and computational overhead borne by the trading system.
Having the ability to offload position management while customizing the strategy settings is the best of both worlds and a goalof anotherwell known trading platform that islookingtoprogrammatically defineposition management strategies just prior to theirexecution on the DOM. If you build it, and market it, they will come :)
Regards,
Whitmark
aspTrader
09-09-2006, 01:17 PM
ninjatrader wrote: Accessing internally generated orders via the ATI is already on our list for future consideration. At this time, there have not been a lot of requests for this feature.
Among traders who use another world-class platform (if not having as many users as others) that interfaces to Ninja Trader I imagine that whitmark and I are among the most enthusiastic about the use of Ninja Trader with it.
I find myself bragging up the benefits of using that platform with Ninja Trader once a week on average.
What we want are capabilities that allow us to generate orders (and Ninja Trader strategies) in that other platform and then manage the position in Ninja Trader or generate orders in Ninja Trader and manage the position in that other platform.
You must already have the methods for strategy creation and exhaustive order list retrieval. We just want access to those methods.
whitmark
10-20-2006, 02:57 AM
I've begun my quest to find a way to enable my trading systemstodeploy customized/trade specific position management parameters (e.g.,issue, quantity, stop, profit target, breakeven,auto trail) through an APIand without the need topre-populate all possible parameter combinations as currentlyrequiredNinjaTraderunder the current ATI. Icould handleposition managementin my NeoTicker system,but for reasons mentioned before,would much prefer to offload this task to a specialized application such as NinjaTrader that also enable discretionary oversight via a world-class DOMinterface. I also find the ability to push data via the external data feed and forward test using the Sim101 account an extremely useful feature for system testing.
In this market space of order execution platforms, there areserveral providershave great DOM interfaces for discretionary trading yet API functionality that limits the amount of customization that canbe easily drivenout by a trading system. On the other hand,there are other providers withoutstanding system automation flexibility (e.g., TWS, TradeBolt) but offer lackluster discretionary trading user interfaces and functionality.Of course,when I was first turned onto Ninja, it had superior functionality for both usage types and was relatively cost effective too.
Asmy requirements have expanded to incompass trade specific position management parameters, I would like to gain a betterunderstanding of where Ninjafits into my future development and order execution plans.The advent of Ninja Script and the hint at script-onlyorder execution functionality, is causing me to rethink how best to utilize my most favored trading tool. In this thread, it was disclosed that Ninja R6 would support customized strategies through Ninja Script and that similar functionality was only now being consideredfor the ATI due to the lack of interest until now. Given the likelihood thatcustomizable strategy parameters are not in thenear future (except forNinja Script developers) I wanted to get your thoughts regarding the feasibility/pros/cons ofthe use case options outlined below in the context of trading systems developed and executed from anexternalplatform likeNeoTicker.
1) With R6, have the external source trading program write and execute the necessary Ninja Script statements to submit the desired strategy on NinjaTrader.
2) Use the IB TWS API to submit entry, stop, and target OCO orders and rely on NinjaTrader to detect the open orders/positions to enable discretionary oversight and modification.
3) Deploy other TradeMagic components that are enabled via a DLL call to submit customized strategiesthat would enable the concurrent use of the NinjaTraderto manage the open position/orders.
4) None of the above, it can only be readily accomplished through an ATI enhancement if/when it is made available.
Yourinsights on these options will be very helpful to me and other like minded NinjaTrader customers that rely on NeoTicker as their preferred system development platform of choice.
Regards,
Whitmark
NinjaTrader_Ray
10-20-2006, 07:18 AM
We are weeks away from releasing NT6 which will have full automated system development, backtesting, optimization and execution capabilities through NinjaScript. There are several ways one can utilize these capabilities forautomated system development.
1. Use our convenience methods for order management (simple approach) which is driven by incoming bar data
2. Take full control and responsibility for self order management that can be driven by a number of methods that are called when certain events are called such as OnBarUpdate, OnMarketData, OnPositionUpdate, OnExecutionUpdate, OnMarketDepth, OnOrderStatus etc...
Option #2 is designed for programmers since a lot more care must be taken to ensure all potential real-time trading exceptions are handled. Except for the OnBarUpdate method, other methods are not called during backtest so this mustalso be taken into consideration.
We will also have a multitude of forward testing capabilities including real-time data executing against our simulation engine, market replay and one of my favorites, Simulated Data Feed that allows youto control the market trend to force test your system to ensure system integrity in a simulated real-time user controlled environment.
Within the above context:
1) Thereis no official way to have an external application drive NinjaScript.
2) This is viable however, this requires that you write your own trading application. I would suggest just using NinjaScript which offers you the full extension of the .NET framework through C# to write your trading logic. It would be a lot faster and the code indpendant of TWS. You can target any of the 7+ broker technologies we support by letting the NinjaTrader application be responsible for connectivity.
3) Not an option.
4) Either option 2 or continue with your current approach of interfacing through our ATI.
Ray
whitmark
10-20-2006, 09:10 AM
Thanks for your timely and thorough response. It's exciting to learn about all of the great features coming online although I would personallyhave to ditch mypreferred trading platform and development language to obtain the functionalityI desire throughNinja. I suspectmany system developerswho have significant experienceandworking projectsonother platforms may feel this is toohigh a price despitethe compelling functionality. While I have a decision to make, the benefits of atightly integratedcharting, order execution,position management,and analytic capabilities not to mention an intuitive tradinginterface are not lost on me.I commend you for your vision and hard work to make it happen.
Obviously, it is my hope that the open access spirit will live on and that the ATI will evolve to enablestrategies to be customizedfornon-Scriptusers (whether it be bypreference orfunctional requirement)and therefore, not require a platformswitchto take advantage of the best functionality. Guess I just want my cake and eat it too. Iinvite other users/developers to make their thoughts known.
Regards,
Whitmark
NinjaTrader_Ray
10-20-2006, 09:30 AM
Your comments make sense and is expected. It would be foolish of us to expect people to drop the investment they have made in their primary system development tool. NeoTicker is a wonderful tool and back when I was a full time trader thatwas my primary platform. There are some features in NeoTicker that were driven bymy many requests to them. I can't say enough good things about them.
It would also be foolish to expect our initial entry to the system development space to hit the bulls eye on day one. Those who adopt and work with us on our capabilities will have be a position to help shape and mold the direction this product takes as we solicit feed back from early adopters.
I am very excited about it's prospects and will personally be working with users to implement their systems so I gain first hand knowledge where we may be strong and weak.
Thanks always for your input to this forum.
Ray
aspTrader
10-22-2006, 11:12 AM
Hi Ray,
I appreciate your reply to whitmark. I also just want to strongly second whitmark's point.
It will be very disappointing to traders using other platforms with Ninja Trader (in my case NeoTicker) if the new capabilities provided to all those who use only Ninja Trader aren't at the same time provided to those of us who use other platforms. That's the bar for determining whether Ninja Trader is open or not and the determining factor in whether we have made the right choice of execution platform.
As for the statement:
Those who adopt and work with us on our capabilities will have be a position to help shape and mold the direction this product takes as we solicit feed back from early adopters.
whitmark and I were "early adopters" of the Ninja Trader ATI and there are several capabilities that we've asked for related to the ATI that haven't been satisfied particularly related to integrated mechanical system and discretionary trading.
In my case, I've been asking for an ATI function that will return ALL the orders within Ninja Trader and not just those placed by the ATI. whitmark has been asking for ATI access to the methods driving Ninja Trader Strategies.
I want to use Ninja Trader and, as you know, I've been pushing on clients I have to use it. And it's great that you're going to be working with users who will use these new capabilities in Ninja Trader.
but whitmark and I have been telling you for months now what we need for integrated discretionary and mechanical system trading... with so far no cigar.
If the functions mentioned above aren't provided to Ninja Trader ATI users or you assure us that, at least, they are coming in the near future, how are we but to conclude that the commitment to having an "open" Ninja Trader platform really isn't there?
Looking forward to a long future relationship with Ninja Trader.
NinjaTrader_Ray
10-22-2006, 11:38 AM
Hi AspTrader,
Your comments are always appreciated and welcomed.
I hear and understand what both you and Whitmark are saying. What I can guarantee is that as NinjaTraderevolves we will and have always based our development direction and priorities based on user and partner input. You are developer yourself and I know you understand the challenge of prioritizing requests against available resources, feasability and economics.
Your suggestions are on our listof features for future consideration.
Ray
tazman
10-24-2006, 01:44 PM
Hi Ray,
Thanks for all of your hard work on Ninja. It is a phenominal software. I have been working diligently to develop a hybrid system where I can initiate a trade and let my system on NeoTicker take over management of the position. Based on your posts below, it seems you are very interested in user feedback. I would greatly appreciate being able to use Ninja to initiate discretionary trades that are then managed by my system indicators on Neoticker. Thank you for requesting user feedback and being so willing to adjust your timelines to suit our needs.
I am a happy customer of Ninja for over two years now. I am betting that your vision will continue to give me an edge as a trader.
-tazman
whitmark
11-07-2006, 01:40 PM
Okay, so if there is no readily available solution for placing customized strategiesthrough theATI, but what about the approach whereby a generic Ninja strategy is submitted via the ATI with OCO stops, targets,etcbut thenthe orders are subsequently modified?Is it possible to obtain and modify (or cancel and replace) these OCO orders such that the OCO links will remain intact? Can the OCO orders be modified before or after the entry order has been filled? If this is possible, a simple outline of steps to be taken would be very helpful. Thanks!
Regards,
Whitmark
NinjaTrader_Ray
11-07-2006, 02:21 PM
Whitmark,
Not sure I exactly follow but will attempt to provide some information.
A strategies stop/target can be modified provided that they exists. They can't be modifiedwhen an entry order is pending but can be if part filled since NT willl have submitted stop/targets for the part filled amount.
You can directly ammend these stops and targets by passing in "STOP1" or "TARGET1" in place of an order id value. You would of course need to provide the correct strategy id reference. Modifying "TARGET1" has not adverse affects on the OCO coupling to "STOP1".
Ray
whitmark
11-07-2006, 02:44 PM
Thanks Ray, that just might do the trick! Let me give that a try. Thanks for the quick reply.
whitmark
11-08-2006, 09:30 AM
Hi Ray,
To clarify, if I want toPLACE an entry order with a Ninja Strategy, can I:
1) provide aSTOP PRICE in the command to amendSTOP1 as designated in the strategy or
2) only amendSTOP1 with a CHANGE command after the PLACE'd entry orderis filled?
Irecall the LIMIT PRICE is reserved for the entry limit price in the PLACE command. Thanks.
Regards,
Whitmark
NinjaTrader_Ray
11-08-2006, 03:59 PM
Whitmark,
Option 2.
Ray
whitmark
11-08-2006, 10:52 PM
Thanks Ray,the results of mytesting earlier in the dayare consistent with your answer.