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
Code to enter target and stop orders and cancels the other when one is executed
Collapse
X
-
Code to enter target and stop orders and cancels the other when one is executed
Hello, can you provide an example code that will automatically enter a target profit taking order and a stop loss order when an original order is executed, and the other order (stop loss or profit taking) will be cancelled when one of the orders (profit taking or stop loss) is executed? It should be the same as the Custom of ATM Strategy in the SuperDOM. Thanks!Tags: None
-
Hi atrader, Thanks for your question.
You can use ATM strategies within a NinjaScript. See the SampleATMStrategy script within the platform through the NinjaScript editor. We also have this help guide on the subject:
We also have this reference sample that sets up OCO protective orders through the script itself, this method provides maximum flexibility:
Please let me know if you have any questions about this material.Chris L.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by helpwanted, Today, 03:06 AM
|
1 response
10 views
0 likes
|
Last Post Today, 03:35 AM | ||
Started by Brevo, Today, 01:45 AM
|
0 responses
7 views
0 likes
|
Last Post
by Brevo
Today, 01:45 AM
|
||
Started by aussugardefender, Today, 01:07 AM
|
0 responses
5 views
0 likes
|
Last Post Today, 01:07 AM | ||
Started by pvincent, 06-23-2022, 12:53 PM
|
14 responses
242 views
0 likes
|
Last Post
by Nyman
Today, 12:47 AM
|
||
Started by TraderG23, 12-08-2023, 07:56 AM
|
9 responses
385 views
1 like
|
Last Post
by Gavini
Today, 12:29 AM
|
Comment