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 11-03-2009, 12:56 PM   #1
edgeliner
Senior Member
 
Join Date: Oct 2007
Location: Southy Florida
Posts: 263
Thanks: 16
Thanked 1 time in 1 post
Default Exit on Bar Close

It is easy to use ExitOnClose, but is there a way to "Exit on bar close"?
edgeliner is offline  
Reply With Quote
Old 11-03-2009, 01:01 PM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

edgeliner, unfortunately not. You could try adding a check like

Code:
 
if (Position.MarketPosition == MarketPosition.Long) 
        ExitLong();
NinjaTrader_Bertrand 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
Exit Position Seconds Before Bar Close djdinut1 Strategy Development 29 03-08-2011 12:11 PM
Exit on Bar Close stephen_mcse Strategy Development 1 10-28-2009 03:30 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
Exit positions on current bar close forextim Strategy Development 1 11-12-2008 08:39 AM


All times are GMT -6. The time now is 05:52 AM.