Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Trailing Stop depending on Targets
Collapse
X
-
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.Tags: None
-
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, 06:18 PM.
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by mkouitra, 10-23-2021, 04:40 PM
|
17 responses
1,959 views
0 likes
|
Last Post Today, 12:51 AM | ||
Started by Vietanhnguyen2hotmailcom, 05-03-2024, 10:29 AM
|
4 responses
27 views
0 likes
|
Last Post Yesterday, 09:06 PM | ||
Started by PhillT, 04-19-2024, 02:16 PM
|
4 responses
36 views
0 likes
|
Last Post
by PhillT
Yesterday, 04:24 PM
|
||
Started by ageeholdings, 05-01-2024, 05:22 AM
|
5 responses
38 views
0 likes
|
Last Post
by ageeholdings
Yesterday, 03:21 PM
|
||
Started by reynoldsn, Yesterday, 02:34 PM
|
0 responses
15 views
0 likes
|
Last Post
by reynoldsn
Yesterday, 02:34 PM
|
Comment