View Full Version : How do I see strategy names in NT
Hello, I have TS using the dll posting 3 strategies to NT. I want to see in the orders window, executions window positions window what strategy is responsible for what trade at a glance. How do I do this? Maybe in the log window but how do I do it programatically?
Thanx
NinjaTrader_Ray
12-04-2007, 10:22 AM
If you are referring to TradeStation generated orders sent through our DLL interface...
- If you pass in a user generated order id, check the "Name" column to see if the order id is passed through under this field. I don't recall with 100% certainty if this is the case
- If yes, then just add some prefix to the user generated order id that would identify the strategy
- If not, then its not supported
Hi Ray, The name column in the executions window is all blank, it doesnt seem to be passing anything in. Its important for mew to determine what strategy is responsible for what execution, is there a temp workaround? If not could you include this vital piece of information in the next ninja build? Is there something that could be done before then?
Thanks
Arts
NinjaTrader_Ray
12-04-2007, 10:41 AM
I was referring to the name column in the Orders tab. I will add this request to our list of possible future enhancements for adding this info per execution. At this time, there is unfortunately no workaround.
Just checked and the orders window , name column is blank as well.
I need to be able to focus on what the position logic is on a per strategy basis. I want to use the function NTStrategyPosition(). I have 3 systems in TS. I am trying to use NTCommand to send in the order to NT and to "try" and inform NT as to what strategy sent what order. Im thinking in this way that then I can call NTStrategyPosition().
Is this the correct approach? Ive sent emails but no response?
If not correct how does Ninja "Know" what strategy sent the order to Ninja? Im using the dll NOT the emailing method so Im presuming the workspace tab is now not relevant??
Thanks
The real reason I posted before this post is a route into doing the following:
I need to be able to close all the positions ON A PER STRATEGY BASIS and on a PER INSTRUMENT basis if TS and Ninja are out of phase in any way. In order to do that I need to pass in a strategyID to the function NTCommand(ClosesStrategy), however the input for this function, the only one required, is the strategyID.
Soooo, the million dollar question is.... How do I send in the strategy ID to this function, how does NT "know" what the positions are from what strategy in realtime? and what do I do to send in the corect strategy ID to Ninja?
Cheers
NinjaTrader_Ray
12-06-2007, 12:04 PM
- You want to separate positions by TS strategy not a NinjaTrader ATM strategy
If this is true, then what you wish to do is not possible. A Position through the DLL interface is account based, not strategy based.
You have functions in the TS dll specifically called I quote:
"int StrategyPosition(string strategyId)
Gets the position for a strategy. Returns 0 for flat, negative value for short and positive value for long."
If what you are saying is correct, I dont understand why this function and others is in the dll? Whats going on? Am I a blockhead or something, Im very confused??
Thanks
NinjaTrader_Ray
12-06-2007, 12:22 PM
Then this is for ATM strategy, not TS strategy position. The function will return the position of an ATM strategy. You pass in the strategyId through the use of the NTCommand() function. Its the very last parameter.
I think now you have said that you guys need to update the help files as that function is under Tradestation Functions withing Tradestation Integration in your help files!
Anyhow moving away from this, is there any way ninja can do the following without using strategies...
we have 3 startegies in TS that fire orders to NT, we need to monitor whether TS and NT have the same number of contracts due to bad ticks and a myriad of other potential dramas that may develop at any one time. If theres a problem on a specific instrument say in strategy A, how do we close that instrument using NT, by way of orderID or Account driven basis or other, please explain a viable option?
NinjaTrader_Ray
12-06-2007, 01:14 PM
Close - NTClosePosition() will close an account based position
Ray, this is what we are thinking of doing, please let me know if you think we are wasting time here pursuing this course of action
We tell the broker to setup 3 accounts (references only) where each one trades a separte TS strategy which all feed to and from the actual single fund below it. In that way we have got control of the strategies by proxy.
Is there anything in this method where we may hit another potential brick wall, it will be with PATS?
Cheers
NinjaTrader_Ray
12-06-2007, 01:27 PM
Not that I am aware of.