![]() |
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
|
|||||||
| Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Oct 2011
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
|
Hello.
I am very new to ninjatrader and ninjascript, I want to automate an strategy, it is a fast scalper, I set EnterShortStop and EnterLongStop few Ticks behind Bid/Ask price, but sometimes if price goes away, I need to change the entry price how can I achive that? I have to cancel the order and open another? Ohter question, the SetStopLoss is only for Long and Short orders? Can't be set to LongStop and ShortStop? I am trying to achive what I do on mql Thanks |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hello hawkfx,
Welcome to NinjaTrader. If you want to change price only, you do not need to cancel and resubmit separately. If everything is the same (direction, quantity, order type, signal name) except for price, then you just resubmit with the new price and the order is modified. SetStopLoss can be used to protect long and short positions. It will automatically place the right order depending on the direction of the trade. There are also dedicated methods for ExitLongStop() and ExitShortStop() that provide for more order control.
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Oct 2011
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
|
I have another question, how can I iterate all pending orders I have working?
I mean I want to send X amount of longstop or shortstop orders (different or same prices, but different signal name). So I want to do it something like this: for(i = 0; i < totalpending; i++) { //get entry price, signal name, etc } how can I do it? |
|
|
|
|
|
#4 |
|
Member
Join Date: Jan 2010
Location: Irvine, CA
Posts: 58
Thanks: 12
Thanked 0 times in 0 posts
|
How do I start a new thread. Is the only way to raise a question through replying to a new thread?
|
|
|
|
|
|
#5 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
hawkfx,
We do not support accessing an orders collection directly. To access values about pending orders, you have to work with IOrder objects and advanced framework. You can see here for properties you can expose about orders: http://www.ninjatrader.com/support/h...nt7/iorder.htm This sample can help get you started working with these advanced strategy items: http://www.ninjatrader.com/support/f...ead.php?t=7499 sandeshrai, Welcome to the NinjaTrader forums. To create a new thread, click the forum category you want to post in, and then click the New Thread button.
Ryan M
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Price Change | carlton | Charting | 1 | 07-26-2011 09:37 AM |
| Change Limit Price | RogBear | Automated Trading | 2 | 07-20-2011 08:57 PM |
| SampleATMStrategy Order Entry Change | cre8it8 | Strategy Development | 2 | 07-16-2010 02:18 PM |
| ATM strategies: signal price instead of average entry price | mario73 | ATM Strategies (Discretionary Trading) | 1 | 01-02-2009 02:49 AM |
| How to make the price ladder stop moving when no change in price | Trinity | Miscellaneous Support | 1 | 08-02-2006 07:41 PM |