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 > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 06-24-2012, 02:32 PM   #16
JRagsdale
Junior Member
 
Join Date: Mar 2011
Posts: 15
Thanks: 0
Thanked 0 times in 0 posts
Default Exit on Close versus flatten

I want to flatten at 4:09PM EST so I went to tools-options-Misc and set it to flatten all at 4:09 PM. If i then leave "exit on close" unchecked, will my flatten trades still happen? I'm finding that my strategy also gets disabled which I don't want.

I'm trying to exit before the close (my broker requires I be flat no later than 4:10PM to maintain day margins, but I want the strategy to continue to be enabled. Otherwise, I have to turn it back on manually. Am I doing this correctly?
JRagsdale is offline  
Reply With Quote
Old 06-24-2012, 03:59 PM   #17
koganam
Senior Member
 
Join Date: Feb 2008
Location: Durham, North Carolina, USA
Posts: 3,218
Thanks: 24
Thanked 1,231 times in 1,002 posts
Send a message via Skype™ to koganam
Default

Quote:
Originally Posted by JRagsdale View Post
I want to flatten at 4:09PM EST so I went to tools-options-Misc and set it to flatten all at 4:09 PM. If i then leave "exit on close" unchecked, will my flatten trades still happen? I'm finding that my strategy also gets disabled which I don't want.

I'm trying to exit before the close (my broker requires I be flat no later than 4:10PM to maintain day margins, but I want the strategy to continue to be enabled. Otherwise, I have to turn it back on manually. Am I doing this correctly?
If you want the strategy to keep running, just use ExitLong() and ExitShort() at the time that you want to go flat.
koganam is offline  
Reply With Quote
The following user says thank you to koganam for this post:
Old 06-24-2012, 08:49 PM   #18
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

JRagsdale,
Flatten all will close ALL positions and disable the strategy according to the time defined under Tools > Options.

ExitOnClose will only close the strategy position, but the strategy should remain running. It exits according to the time defined in the session template.
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
How can I enter at close of bar one and exit at close of session? stevep3 Strategy Analyzer 5 10-15-2010 04:49 AM
Exit On Close dave1992 Version 7 Beta General Questions & Bug Reports 6 10-06-2010 10:41 AM
Exit On Close Parv8 Automated Trading 21 08-21-2009 12:34 PM
Exit-on-close handling initiated after market close tooearly Automated Trading 3 08-05-2009 08:07 AM
Enter at Close, Exit next day Close tjendra Strategy Development 3 04-08-2009 11:33 AM


All times are GMT -6. The time now is 06:02 PM.