![]() |
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
|
|||||||
| Suggestions And Feedback New feature suggestions and feedback. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Oct 2011
Posts: 30
Thanks: 4
Thanked 1 time in 1 post
|
Hello,
I'm trying to write multi-time-frame strategy to backtest and got problem with EnterLongLimit / EnterShortLimit functions. This strategy works with 2 time frames.
The problem is, that the order is executed immediately even if the price was not reached. This order is also executed by limit price and not by market price. Hope I explain this issue clearly. Thanks. |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
|
Hi dalisdj, can you please post your code so we can take a closer look?
Austin
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Oct 2011
Posts: 30
Thanks: 4
Thanked 1 time in 1 post
|
Hi Austin,
here is your code. Btw I use 7.0.1000.7. |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
|
dslisdj, have you tried using stop orders yet? From the description you've provided earlier along with your code, it looks like you're trying to place two orders at a high and low price and wait until those prices are hit before the order fills. Your limit orders would be filled immediately because the long limit is higher than the current market price and vice-versa for the short limit order.
Please try with stop orders and let me know if you then get the expected behavior. http://www.ninjatrader.com/support/h...erlongstop.htm
Austin
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Austin for this post: |
|
|
|
#5 |
|
Member
Join Date: Oct 2011
Posts: 30
Thanks: 4
Thanked 1 time in 1 post
|
I see EnterLongLimit works differently than I expected. Changing to EnterLongStop make this code works according to my expectations.
Thank you very much for solving this problem Austin. |
|
|
|
![]() |
| Tags |
| enterlonglimit, entershortlimit, problem |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| EnterLongLimit and EnterShortLimit fail | ipso33 | Automated Trading | 16 | 08-25-2011 04:43 PM |
| Reverse using EnterShortLimit() | monpere | Strategy Development | 12 | 03-16-2010 11:07 AM |
| EnterShortLimit question... | dadof3and3 | Automated Trading | 5 | 07-06-2009 08:57 AM |
| EnterShortLimit / EnterLongLimit | John833 | Strategy Development | 3 | 11-20-2008 04:39 PM |
| EnterShortLimit works great. How to offset "longs" ?! | Imbah | Strategy Analyzer | 1 | 10-20-2008 01:35 PM |