PDA

View Full Version : How to flaten one of multiple Strategies in one trading account


kiwibird
10-02-2007, 03:57 AM
If we have two systems say trading er2 in one account,
how to we use the close all to close all contracts on the
Strategy, not the account?


Im doing this incase I am out of sync, its safer to go flat, rather than close out the positions ib / ninja THINKS it has.

ie system turbotrader might be long1 er2,
then system breakout goes long er2
then system turbotrader goes flat er2.
at this point I want to flatten turbo trader, but not the account as we are still long one contract from system breakout

thanks for your help.

NinjaTrader_Dierk
10-02-2007, 04:53 AM
Please try submitting a market order with the quantity of your actual strategy position.

kiwibird
10-02-2007, 05:14 AM
Im working on the assumption, one day I will get out of sync, which is very costly. Hence I still want to know how to force the strategy, not the account flat.
i expect it to be through use of
NTCommand CLOSEPOSITION

Im not sure how strategyId should be used to acomplish this

thanks again.

NinjaTrader_Dierk
10-02-2007, 05:22 AM
May be a misunderstanding:
a) are you talking about a NinjaScript strategy? -> my advise applies
OR
b) are you talking about an ATM strategy managed through ATI? -> CLOSEPOSITION will close the position of the strategy, since you need to apply the strategy ID parameter. Please read more here:
http://www.ninjatrader-support.com/HelpGuideV6/CommandParameters.html

NinjaTrader_Dierk
10-02-2007, 01:28 PM
My apologies: Is misread the docs on (b).

You need to call CLOSESTRATEGY and provide the strategy id parameter. This parameter is a unique identifier which you need to pass in as you call e.g. the PLACE command to start a strategy. This parameter then identifies the running strategy.