NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 12-07-2007, 02:41 PM   #1
Burga1
Senior Member
 
Join Date: Nov 2007
Posts: 388
Thanks: 0
Thanked 0 times in 0 posts
Default Cancel a StopLoss?

Greetings,

When my strategy submits an order it also calculates/sets an initial StopLoss (within "OnBarUpdate"). Since I know it is not possible to both a StopLoss and a TrailStop concurrently for the same position what I'd like to try to do is "cancel" the StopLoss once the price has reached a certain level in my trade's favor. At that point I figure a TrailStop could then be submitted at that point.

I guess my question is kinda simple--is it possible to "cancel" the StopLoss so as to replace with a TrailStop?

Thanks in advance.
Burga1 is offline  
Reply With Quote
Old 12-07-2007, 02:47 PM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

No this is not possible however, you can modify the price of the stop loss and do your own auto trail on it. See the Reference Sample section for modifying stop loss orders.
NinjaTrader_Ray is offline  
Reply With Quote
Old 12-07-2007, 03:20 PM   #3
Burga1
Senior Member
 
Join Date: Nov 2007
Posts: 388
Thanks: 0
Thanked 0 times in 0 posts
Default

Thank you. I took a look at that and I think I can figure something out with it. Do dynamic changes of the StopLoss like that apply to ALL open positions within the strategy (if a strategy is capable of producing more than 1 open trade position at a time)?
Burga1 is offline  
Reply With Quote
Old 12-07-2007, 04:03 PM   #4
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

Applies to the signal name provided. SetStopLoss() have signal name parameters that identify the signals.
NinjaTrader_Ray is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
stoploss at breakeven at T1 ceesvh Automated Trading 6 08-22-2007 11:04 AM
stoploss and MAE in backtest ceesvh Strategy Analyzer 8 07-12-2007 08:02 AM
Stoploss and target - on MB trading brad Miscellaneous Support 1 08-30-2005 07:52 AM
Setting StopLoss via Automation MarlinTrader Automated Trading 1 02-03-2005 04:33 AM
Why does cancel all orders in NT Light cancel real orders in TWS dwight Miscellaneous Support 0 11-29-2004 01:54 PM


All times are GMT -6. The time now is 11:14 PM.