![]() |
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 |
|
Member
Join Date: Jan 2008
Posts: 97
Thanks: 0
Thanked 1 time in 1 post
|
I am trading short term with 5 minute bars and have a problem when there is a decent move during one bar. If I enter a short trade on the bar and have my stop order working immediately, if the high of the bar is above the stop order I get the following error:
"a BuyToCover stop order placed at '1/6'2009 2:40am' has been ignored since the stop price is less than or equal to the close price of the bar. This is an invalid order and subsequent orders may also be ignored. Please fix your strategy." This is happens on historical data but the problem is that it shuts my system down and leaves the position open and I cannot just start the data more recent because the indicators need more bars for the calculation. I would have thought the stop order would be triggered and the position would be closed out at a loss. What is the best way to fix this? GT |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
GreenTrade,
You need to fix the order to submit at a price that is valid. There is no other way.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Jan 2008
Posts: 97
Thanks: 0
Thanked 1 time in 1 post
|
Thanks for the quick response. Would something like this example work (strategy: Backtesting NinjaScript Strategies with an intrabar granularity) or is this for something else? If so, my understanding of the example is that the strategy works the same but you add a separate period (like 1 minute) and although the conditions will still be looked at in the larger time period the orders will be submitted on the 1 minute time period. Is that correct? Thanks!
http://www.ninjatrader-support2.com/...ead.php?t=6652 GT |
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
That is correct. If you want the higher granularity during backtesting you would want to try the reference sample.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Entry and EXIT an SMA | Sailor | General Programming | 10 | 07-06-2009 10:13 AM |
| Entry and exit orders to the same bar | pragma | General Programming | 5 | 08-07-2008 04:56 PM |
| Entry / Exit Strategy | Edgar V. | Strategy Analyzer | 19 | 03-17-2008 07:29 AM |
| Stop Loss @ Low/High of Entry Bar minus one Bar | SamIam | Strategy Development | 5 | 08-29-2007 03:55 AM |
| order entry/exit | Vin | Miscellaneous Support | 1 | 06-29-2005 12:10 AM |