NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 09-16-2011, 08:40 AM   #1
ATI user
Senior Member
 
Join Date: Apr 2006
Location: , ,
Posts: 1,316
Thanks: 1
Thanked 7 times in 7 posts
Default Oif closeposition

if there a way to use OIF CLOSEPOSITION command without disabling all strategies...other than REVERSEPOSITION ?

I have been using FLATTENEVERYTHING however want to just close the current positions and keep the strat running...
ATI user is offline  
Reply With Quote
Old 09-16-2011, 09:20 AM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hello ATI user,

Unfortunately there is not a dedicated command to flatten positions, but leave the strategy running. Will need to custom code this by using Place command to place closing orders.
NinjaTrader_RyanM is offline  
Reply With Quote
Old 09-16-2011, 12:06 PM   #3
ATI user
Senior Member
 
Join Date: Apr 2006
Location: , ,
Posts: 1,316
Thanks: 1
Thanked 7 times in 7 posts
Default

the solution is to use CLOSESTRATEGY...provided however that you use PLACE to enter the trade instead of AtmStrategyCreate
ATI user is offline  
Reply With Quote
Old 10-03-2011, 10:57 AM   #4
ATI user
Senior Member
 
Join Date: Apr 2006
Location: , ,
Posts: 1,316
Thanks: 1
Thanked 7 times in 7 posts
Default

I have a conflict when combining AtmStrategyCreate orders and OIF PLACE orders

the issue is that I need to be able to close positions without disabling the strategy...so I use PLACE and CLOSE which works fine

however I also need to be able to move the stops on the orders...CHANGE will work however I first need to check the status of the order...which is easily done using GetAtmStrategyEntryOrderStatus if order was placed using AtmStrategyCreate however those orders can not be closed without disabling the strategy

so...how can I check the status of an order using OIF commands?
ATI user is offline  
Reply With Quote
Old 10-03-2011, 11:25 AM   #5
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Unfortunately there is no way to check for working orders PLACED using OIF. There are order update files, but this only contains information about filled orders.
NinjaTrader_RyanM is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Oif ATI user Version 7 Beta General Questions & Bug Reports 9 10-29-2010 07:56 AM
FLATTENEVERYTHING vs CLOSEPOSITION ATI user Version 7 Beta General Questions & Bug Reports 1 12-22-2009 03:06 PM
"closeposition" malfunction ? Torso Automated Trading 2 07-10-2008 01:00 AM
Problem with OIF Generation - Using ATM in OIF etc ccie8340 Automated Trading 3 07-30-2007 05:08 AM
OIF and erors scjohn Automated Trading 5 02-21-2005 12:32 PM


All times are GMT -6. The time now is 08:53 AM.