![]() |
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: Mar 2009
Posts: 35
Thanks: 0
Thanked 0 times in 0 posts
|
1.I have two orders in PendingSubmit state. It's been around for a few days. Even after closing and restarting NT, the orders are still there. Please let me know how I could get rid of these, it slows down the process of bringing up data on the chart. (This is on NT Sim).
2.double entryPoint I need to define a condition within my script that checks for: if GetCurrentBid() “touches” entryPoint......//then do something Is there any operator available to check for the above condition, other than ( if GetCurrentBid() == entryPoint ) ? I'm just concerned that if the market is moving too fast, then the == operator may not work. 3. Sometimes I need to Cancel an order and reuse the IOrder object as given below: Code:
entryOrder = EnterLongStop(0, true, quantity, upperValue, "");
if ( (GetCurrentBid() - lowerValue) < 0.001 )
{
CancelOrder(entryOrder);
entryOrder = null;
entryOrder = EnterShortStop(0, true, quantity, lowerValue, "");
}
Thanks so much for the help. Joe |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,420
Thanks: 252
Thanked 981 times in 963 posts
|
Hi JoeStein,
1. Please go to Tools > Options > Simulator > Misc and Reset the Simulator. Then the 'stuck' order should disappear. 2. Not sure I follow, if you fear you miss the entry point just use the script on CalculateOnBarClose = false - http://www.ninjatrader-support.com/H...BarClose1.html 3. Just check the OrderState for a cancel confirmation before reusing it - http://www.ninjatrader-support.com/H...V6/IOrder.html
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Mar 2009
Posts: 35
Thanks: 0
Thanked 0 times in 0 posts
|
Thank you.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| scripting dummy | tradenoob | Strategy Development | 2 | 05-09-2009 07:45 AM |
| PendingSubmit, then nothing... | CashCache | Strategy Development | 13 | 02-13-2008 11:10 AM |
| issues with stop limit orders | woodside | General Programming | 4 | 02-12-2008 09:45 AM |
| A couple of programming questions... | Goonior | General Programming | 3 | 01-04-2008 09:18 AM |
| Customised scripting for NT | Antraman | Indicator Development | 2 | 01-12-2007 10:38 AM |