NinjaTrader Support Forum  

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 03-17-2009, 08:09 AM   #1
Godzilla
Junior Member
 
Join Date: Jun 2008
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
Red face Trailing Stop with a fixed 20 tick stop

Newbie question...

I am long 1 contract with a stop loss of say 20ticks.
How do I code the trailing stop to move my Stop UP each time the price moves 20ticks in profit....
Remember not on each tick but only once there is 20 tickss in profit...so it like moves in steps?
Godzilla is offline  
Reply With Quote
Old 03-17-2009, 08:19 AM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

When you receive 20 ticks in profit, call your stop loss again at your new desired stop price. It will modify the order and raise it up.
NinjaTrader_Josh is offline  
Reply With Quote
Old 03-17-2009, 08:02 PM   #3
Godzilla
Junior Member
 
Join Date: Jun 2008
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks Josh,

But could you show me some NT code on how to do this?
I understand the concept but a snippet of code is the solution.


Appreciated.
Godzilla is offline  
Reply With Quote
Old 03-18-2009, 07:07 AM   #4
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

Godzilla,

Please see this reference sample for modifying stop losses: http://www.ninjatrader-support2.com/...ead.php?t=3222
NinjaTrader_Josh 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
Going from a Stop Loss to a Trailing Stop within a strategy Sidhartha Strategy Development 28 03-24-2009 03:11 PM
trailing stop with single stop order mario73 ATM Strategies (Discretionary Trading) 3 01-14-2009 02:55 AM
Fixed Stop Strategy John833 Strategy Development 9 11-07-2008 10:03 AM
stop loss, trailing stop modification in NT6 alfie Strategy Development 1 03-26-2008 03:46 PM
How to delay a stop order until 08:20 skynetman SuperDOM and other Order Entry Windows 1 03-13-2008 06:02 AM


All times are GMT -6. The time now is 03:43 PM.