![]() |
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
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Apr 2010
Location: New York
Posts: 1
Thanks: 0
Thanked 0 times in 0 posts
|
Hi all, wondering if somebody could please help me with a small issue i'm having in the Ninjascript development on a strategy that uses daily data only.
My strategy generates a stop order everyday based on a historical indicator. I should be able to fill that stop order if the current daily bar has its low < stop order, and its high > stop order. If both these conditions are true, then I simply want to be filled at the stop level and then exit my position at the end of the day at the bar close. I want to stick with daily data, not intraday, and this should be possible to implement, but so far I am having no luck. I have tried setting 'exit on close' to true but that doesn't help, I have also tried setting an exit condition based on the current bar being <> previous bar, but that also failed. Any simple solutions to this? Thank you for your help and time! |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
foxido, welcome to our forums and thanks for the post - unfortunately you would need to work with intraday data in this case to be able to submit orders to a finer timeseries to exit on the close or slightly before it. The general concept can be reviewed here -
http://www.ninjatrader-support2.com/...ead.php?t=6652 For realtime trading, you could also program a time condition into the strategy and set CalculateOnBarClose to false - http://www.ninjatrader-support.com/H...BarClose1.html
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Exit-on-close handling initiated after market close | tooearly | Automated Trading | 3 | 08-05-2009 08:07 AM |
| CrossAbove Close & Close[0] different results | un$ane | Strategy Development | 6 | 06-05-2009 09:59 AM |
| Enter at Close, Exit next day Close | tjendra | Strategy Development | 3 | 04-08-2009 11:33 AM |
| Startegy involving previous day close price and current open price | kirankksimon | General Programming | 3 | 03-11-2009 08:59 AM |
| Charting high/low/close and open/close widths | gluebunny | Charting | 11 | 09-29-2008 10:47 AM |