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
Dynamic Stops and Targets
Collapse
X
-
Dynamic Stops and Targets
Hello, I have been trying to understand how to get dynamic stops and targets in my strategy (attached). The NT8 guide says to call them in OnBarUpdate instead of State.Configure or State.DataLoaded. However, on the chart, when I move them they snap back after a few seconds. I could create an ATM strategy with moveable stops & targets but is this the only way?Tags: None
-
Hello JohnS52,
In order to be able to move targets that a strategy submits you need to use regular exit orders isntead of the Set methods and also ensure that your condition to submit the orders is only called one time. Once the orders are active you can then manually move them.
A live until cancelled order is also needed so you would need to use the following overload for the target orders:
Code:ExitLongStop(0, true, 1, Position.AvgPrice - 10 * TickSize, "MyExit", "MyEntry");
JesseNinjaTrader Customer Service
-
Hello JohnS52,
You can see the following sample which submits live until cancelled orders based on an entry fill, the targets are only submitted once when the entry has filled.
Hello, I have a strategy that places stop and target orders once an order is executed. However, when i see the orders on the chart trader and I want to move
JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by fx.practic, 10-15-2013, 12:53 AM
|
5 responses
5,403 views
0 likes
|
Last Post
by Bidder
Today, 12:22 AM
|
||
Started by Shai Samuel, 07-02-2022, 02:46 PM
|
4 responses
94 views
0 likes
|
Last Post
by Bidder
Today, 12:11 AM
|
||
Started by DJ888, Yesterday, 10:57 PM
|
0 responses
6 views
0 likes
|
Last Post
by DJ888
Yesterday, 10:57 PM
|
||
Started by MacDad, 02-25-2024, 11:48 PM
|
7 responses
158 views
0 likes
|
Last Post Yesterday, 10:23 PM | ||
Started by Belfortbucks, Yesterday, 09:29 PM
|
0 responses
8 views
0 likes
|
Last Post
by Belfortbucks
Yesterday, 09:29 PM
|
Comment