![]() |
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
|
|||||||
| ATM Strategies (Discretionary Trading) Support for Advanced Trade Management, AutoTrail, AutoBreakeven, Stop Strategy and Simulated Stops etc... |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Jul 2012
Posts: 54
Thanks: 9
Thanked 0 times in 0 posts
|
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.
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Jun 2011
Location: Ireland
Posts: 184
Thanks: 32
Thanked 20 times in 19 posts
|
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.
|
|
|
|
|
The following user says thank you to stocktraderbmp for this post: |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |