NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > Application Technical Support > ATM Strategies (Discretionary Trading)

ATM Strategies (Discretionary Trading) Support for Advanced Trade Management, AutoTrail, AutoBreakeven, Stop Strategy and Simulated Stops etc...

Reply
 
Thread Tools Display Modes
Old 08-17-2012, 04:54 PM   #1
tiffanychan887
Member
 
Join Date: Jul 2012
Posts: 54
Thanks: 9
Thanked 0 times in 0 posts
Default Trailing Stop depending on Targets

Are there any trailing stop script that has a stop tightening gradually as it approaches a preset target? If yes, how to attach it to an order? Thanks. Tiffany.
tiffanychan887 is offline  
Reply With Quote
Old 08-17-2012, 05:46 PM   #2
stocktraderbmp
Senior Member
 
Join Date: Jun 2011
Location: Ireland
Posts: 184
Thanks: 32
Thanked 20 times in 19 posts
Default

Have you looked at the ATM strategies and their use in your 'Help' file.

Go to the 'Language Reference' then 'Strategy' then ATM Strategy Methods.

I believe you are able to change the stop and target given a certain condition or you can create an ATM strategy with 1 target and a Stop Strategy and then reference it in your code (this is easiest).

The stop strategy custom allows 3 steps plus a BE step so you could have your stop strategy something like :

unrealizedPnL = 10 ticks move stop to BE
Auto trail step 1 - S.Loss = 12 ticks Freq = 1 trigger = 12
Auto trail step 2 - S.Loss = 8 ticks Freq = 1 trigger = 16
Auto trail step 3 - S.Loss = 4 ticks Freq = 3 trigger = 20

step 1 puts a trailing stop 12 ticks behind price once your unrealized PnL hits 12 ticks
step 2 moves the trailing stop tighter to 8 ticks behind price once your unrealized PnL hits 16 ticks and step 3 moves it to just 4 ticks behind price once you hit 20 ticks of unrealized profit and only moves it up once unrealized PnL has advanced a further 3 ticks.

Hope this helps - if you are going to code this yourself try building the Atm first and then referencing it in the strategy wizard - this will give you some clues about what needs to be put into your own script and remember to cancel the trailing stop if the target is hit and vice versa.

Good luck.
Last edited by stocktraderbmp; 08-17-2012 at 06:18 PM.
stocktraderbmp is offline  
Reply With Quote
The following user says thank you to stocktraderbmp for this post:
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
How to stop Longs or Shorts depending on MarketPosition Tdschulz Automated Trading 3 05-16-2011 10:16 PM
Trailing profit targets... BigDog008 Strategy Development 1 05-12-2009 09:22 AM
Trailing Profits - How to Reverse a Trailing Stop? jeremymgp Strategy Development 1 05-05-2009 10:47 AM
Trailing Stop Loss/Profit Targets BigDog008 Strategy Development 3 02-26-2009 07:47 AM
Three targets with balance set to trailing monypat Strategy Development 5 08-14-2008 01:38 PM


All times are GMT -6. The time now is 04:00 PM.