Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Expose strategy template or ATM from a manually entered order
Collapse
X
-
Expose strategy template or ATM from a manually entered order
Is there a way to expose programmatically the strategy template or ATM from a manually entered order?Tags: None
-
Hello,
Thank you for your post.
If you have an open position and you wish to add a limit and stop order to protect the position please follow these steps:- In the ATM Strategy drop down menu, set it to a value of "none"
- Right click in the SuperDOM or Chart Trader and enable OCO order placement by selecting the menu "OCO Order"
- Then place a limit order where you want to exit at a profit
- Then place a stop order where you want to exit at a loss
- Then right click again and select the menu "OCO Order" to disable the OCO order placement
- Now you have a target and a stop placed protecting your open position, and when one of these orders is filled the other will be canceled automatically.
To add an ATM strategy to an unprotected open position, please follow the steps below.- Select the Positions tab of the Control Center.
- Right click on the position.
- Select Apply ATM Strategy and then select the desired ATM.
- Now your position will have ATM applied to it.
Please let us know if we may be of further assistance.Marco G.NinjaTrader Customer Service
-
I want to get the "Strategy Template" name, the encircle in red. I tried using foreach(Orders order in Account.Orders) but there's no option order.GetStrategyTemplate and order.Name doesn't work either. I just want to know if that entry is came from specific strategy template in the chart trader.
Comment
-
Hi ...
I guess you need to use OnOrderUpdate to detect all orders issued...
something like this
private void OnOrderUpdate(object sender, OrderEventArgs e)
But I would prefer to have a way to check that from the current active orders...
Pablo
Comment
-
Originally posted by pmaglio View PostHi ...
I guess you need to use OnOrderUpdate to detect all orders issued...
something like this
private void OnOrderUpdate(object sender, OrderEventArgs e)
But I would prefer to have a way to check that from the current active orders...
Pablo
foreach(Order order in Account.Orders)
{
}
doesn't give that option. I can only get the name, instrument, quantity, average price, etc., but what I want is the ATM Strategy template that I used in the chart trader when I took the order.1 Photo
Comment
-
Hello luxurious_04,
You could loop through the Account.Orders collection, or you can subscribe to account level OrderUpdates to capture the Order updates of an ATM strategy.
Intercepting and modifying ATM strategy orders would go beyond the level of support that we would offer, but I do have a rough example that can give some further direction for identifying ATM strategy orders from account level OrderUpdate events. This example is attached to give you some further direction.
Account.OrdeUpdate - https://ninjatrader.com/support/help...rderupdate.htm
We look forward to assisting.Attached FilesJimNinjaTrader Customer Service
Comment
-
Marco,
You posted:
"To add an ATM strategy to an unprotected open position, please follow the steps below.- Select the Positions tab of the Control Center.
- Right click on the position.
- Select Apply ATM Strategy and then select the desired ATM.
- Now your position will have ATM applied to it.
Could this be evoked programmically from a custom button in ChartTrader?
Comment
-
Hello EminiTrader,
There is not a supported means to apply an ATM strategy to an open position programmatically and having the user actions automated would also be outside of what we can support and give direction for.
I may suggest creating a NinjaScript strategy that uses Adopt Account Position for this purpose. I have attached an example here.
Start Behaviors - https://ninjatrader.com/support/help..._positions.htm
We look forward to assisting.Attached FilesJimNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by gleichnerany, Today, 01:17 AM
|
0 responses
3 views
0 likes
|
Last Post
by gleichnerany
Today, 01:17 AM
|
||
Started by WHICKED, 03-27-2024, 12:33 PM
|
4 responses
44 views
0 likes
|
Last Post Today, 12:28 AM | ||
Started by f.saeidi, Today, 12:12 AM
|
0 responses
5 views
0 likes
|
Last Post
by f.saeidi
Today, 12:12 AM
|
||
Started by Conall, Today, 12:06 AM
|
0 responses
7 views
0 likes
|
Last Post
by Conall
Today, 12:06 AM
|
||
Started by proptradingshop, 03-21-2024, 09:50 AM
|
6 responses
27 views
0 likes
|
Last Post Today, 12:02 AM |
Comment