Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
profit trigger and new profit target
Collapse
X
-
profit trigger and new profit target
i'm trying to have a stepped stop loss. i have a profit target of 60 and a stop loss of 10. when the price of the contract hits a plus 12 i want the stop loss to move to a plus 2, essentially a new profit target. and, when the price of the contract hits a plus 20 i want the stop loss to move to a plus 10, essentially a new profit target. and, when the price of the contract hits 25 i want the stop loss to move to a plus 15, essentially a new profit target. what might this look like in code?Tags: None
-
Hello SteveReiza,
Thanks for your notes.
It seems like you want to implement a trailing stop loss in your strategy.
You can use exit order methods and adding coding logic in the Strategy Builder to accomplish this goal. Please note that you would not be able to use the exit methods and the stops in the stop and targets window as that creates a violation of the managed approach internal order handling rules, linked here: https://ninjatrader.com/support/help...d_approach.htm
My colleague Chelsea has created educational examples of strategy builder breakeven and trailing stop in the strategy builder here:
https://ninjatrader.com/support/forum/forum/suggestions-and-feedback/suggestions-and-feedback-
aa/103992-request-breakeven-functions-in-strategy-builder#post806596
If you want a trailing profit target, you could implement similar logic see the "TrailBuilderExample_NT8" reference sample on the forum thread linked above to move your profit target.Brandon H.NinjaTrader Customer Service
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by RDTrader16, Today, 10:19 PM
|
0 responses
5 views
0 likes
|
Last Post
by RDTrader16
Today, 10:19 PM
|
||
Started by gemify, 03-08-2023, 08:02 AM
|
9 responses
148 views
0 likes
|
Last Post
by culpepper
Today, 10:14 PM
|
||
Started by elirion, Today, 10:03 PM
|
0 responses
1 view
0 likes
|
Last Post
by elirion
Today, 10:03 PM
|
||
Started by RaddiFX, Today, 09:55 PM
|
0 responses
9 views
0 likes
|
Last Post
by RaddiFX
Today, 09:55 PM
|
||
Started by Trader146, 03-29-2024, 01:22 PM
|
4 responses
27 views
0 likes
|
Last Post
by Trader146
Today, 09:53 PM
|
Comment