![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM 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 |
|
Senior Member
Join Date: Jul 2010
Posts: 415
Thanks: 1
Thanked 4 times in 4 posts
|
I have a strategy that uses NinjaTrader ProfitTargets and StopLosses. When I'm in a DownTrend I'm taking short positions and when in UpTrend taking long positions. The problem I'm having is that when in a short position and the Trend changes to UpTrend I have a Exit Action that will not supersede the StopLoss. My exit names the "From Entry" of the sell order but will not exit until stopped out. How can I make MySellExit supersede the NinjaTrader StopLoss?
Thanks |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
kenb2004,
What do you mean by supercede? You want to use your explicit exit instead of your stop loss now? Under such a scenario I would suggest you instead of sending a new explicit exit order, but instead to just modify your stop loss to wherever you desire it to be instead. To modify it, just call SetStopLoss() again with the new price you want it at. Be aware that you will want to reset it back to the original level prior to your next entry. Please see this reference sample: http://www.ninjatrader.com/support/f...ead.php?t=3222
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jul 2010
Posts: 415
Thanks: 1
Thanked 4 times in 4 posts
|
Yes, I want to exit at the first close after the UpTrend signal INSTEAD OF (supersede) waiting to get stopped out by the StopLoss order. I would rather use my "explicit exit instead of changing the stop loss". Is this possible??
Thanks |
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
To do that all you would need to do is to just call ExitLong() whenever your conditions to exit are true and it will do so.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Jul 2010
Posts: 415
Thanks: 1
Thanked 4 times in 4 posts
|
Your right ExitLong() does work but what about ExitLongLimit()? Is it possible to make this work INSTEAD OF a StopLoss? Say from current close -1 tick...
Thanks |
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Correct, it is because doing so would violate one of the internal order handling rules as outlined in this article: http://www.ninjatrader.com/support/h...d_approach.htm
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Jul 2010
Posts: 415
Thanks: 1
Thanked 4 times in 4 posts
|
I'm sorry, I don't understand? You said, "correct" when I asked: "Is it possible to make this (ExitLongLimit()) work INSTEAD OF a StopLoss? Say from current close -1 tick"...and then you said it "would violate one of the internal order handling rules".
So bottom line I can use an ExitLong() but NOT an ExitLongLimit() to supersede a StopLoss order? Is this correct??? |
|
|
|
|
|
#8 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Correct, ExitLong() will work even if you have a Set() method in place and ExitLongLimit() will not.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Change from Sim Ninja to Live Trading Ninja | Eoghan O Sullivan | Installation and Licensing | 1 | 02-23-2010 10:31 AM |
| backtesting trailing stoplosses | Eddy-2d | Strategy Analyzer | 3 | 02-03-2010 08:27 AM |
| orders sent from one ninja to many ninja on lan-internet | alleillo | Miscellaneous Support | 1 | 12-23-2008 11:49 PM |
| Can Ninja script print into Ninja Log/Trace file? | maxima | General Programming | 2 | 05-24-2008 04:48 PM |
| Ninja silmulation and Ninja standard | gretrader | Installation and Licensing | 3 | 10-24-2007 03:34 AM |