I have two StopMarket orders with names 1.2 and 2.2. When price reaches A, I want to change StopPrice of order 1.2 to B. When price reaches C, I want to change StopPrice of order 2.2 to D. How can I change these prices from OnBarUpdate?
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
update order price for unmanaged orders
Collapse
X
-
update order price for unmanaged orders
I am using unmanaged orders approach.
I have two StopMarket orders with names 1.2 and 2.2. When price reaches A, I want to change StopPrice of order 1.2 to B. When price reaches C, I want to change StopPrice of order 2.2 to D. How can I change these prices from OnBarUpdate?Tags: None
-
Hello Eklavya,
Thanks for your post.
You can use ChangeOrder to change the properties of an order.
ChangeOrder - https://ninjatrader.com/support/help...hangeorder.htm
For more information on using Order objects, please see the SampleOnOrderUpdate strategy. This example outlines how to assign Order objects in OnOrderUpdate and can also be used for demonstration on how to submit target and stop loss orders from OnExecutionUpdate.
SampleOnOrderUpdate - https://ninjatrader.com/support/help...and_onexec.htm
I look forward to being of further assistance.JimNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by rbeckmann05, Yesterday, 06:48 PM
|
1 response
12 views
0 likes
|
Last Post
by bltdavid
Today, 05:43 AM
|
||
Started by llanqui, Today, 03:53 AM
|
0 responses
6 views
0 likes
|
Last Post
by llanqui
Today, 03:53 AM
|
||
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
10 views
0 likes
|
Last Post Today, 12:38 AM | ||
Started by AaronKoRn, Yesterday, 09:49 PM
|
0 responses
15 views
0 likes
|
Last Post
by AaronKoRn
Yesterday, 09:49 PM
|
||
Started by carnitron, Yesterday, 08:42 PM
|
0 responses
11 views
0 likes
|
Last Post
by carnitron
Yesterday, 08:42 PM
|
Comment