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 aussugardefender, Today, 01:07 AM
|
0 responses
3 views
0 likes
|
Last Post Today, 01:07 AM | ||
Started by pvincent, 06-23-2022, 12:53 PM
|
14 responses
238 views
0 likes
|
Last Post
by Nyman
Today, 12:47 AM
|
||
Started by TraderG23, 12-08-2023, 07:56 AM
|
9 responses
384 views
1 like
|
Last Post
by Gavini
Today, 12:29 AM
|
||
Started by oviejo, Today, 12:28 AM
|
0 responses
4 views
0 likes
|
Last Post
by oviejo
Today, 12:28 AM
|
||
Started by pechtri, 06-22-2023, 02:31 AM
|
10 responses
125 views
0 likes
|
Last Post Today, 12:03 AM |
Comment