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 Haiasi, 04-25-2024, 06:53 PM
|
2 responses
16 views
0 likes
|
Last Post
by Massinisa
Today, 05:32 AM
|
||
Started by Creamers, Today, 05:32 AM
|
0 responses
4 views
0 likes
|
Last Post
by Creamers
Today, 05:32 AM
|
||
Net Change
by Segwin
Started by Segwin, 05-07-2018, 02:15 PM
|
12 responses
1,785 views
0 likes
|
Last Post
by Leafcutter
Today, 05:30 AM
|
||
Started by poplagelu, Today, 05:00 AM
|
0 responses
3 views
0 likes
|
Last Post
by poplagelu
Today, 05:00 AM
|
||
Started by fx.practic, 10-15-2013, 12:53 AM
|
5 responses
5,407 views
0 likes
|
Last Post
by Bidder
Today, 12:22 AM
|
Comment