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
can Ninjascript get the selected ATM parameters?
Collapse
X
-
Hello llanqui,
Thanks for your post.
You could use Atm Strategy Methods if you would like to submit an entry order with an ATM Strategy Template attached to the order to control stops and targets.
Atm Strategy Methods: https://ninjatrader.com/support/help...gy_methods.htm
See the SampleAtmStrategy reference sample that comes default with NinjaTrader demonstrating how Atm Strategy Methods could be used. To view the script, open a New > NinjaScript Editor window, open the Strategies folder, and double-click on the SampleAtmStrategy file.
Otherwise, there would be no other means available for getting ATM Strategy Template parameters in a custom NinjaScript.Brandon H.NinjaTrader Customer Service
-
Adding to this thread...
How can a dropdown list be added to the Script in order to choose the ATM Strategy to use? This is for applying the Strategy to other instruments, where a static ATM strategy does not fill all.
Comment
-
Hello carlosgutierrez,
Thanks for your notes.
Please see the forum thread linked below detailing how to create a custom ATM selector in your script.
Creating Properties, with drop-down list of all available ATM strategies - NinjaTrader Support ForumI am developing a strategy in NinjaScript NT8, and would like to have "ATM Strategy" as a property. That field would contains a drop-down listBrandon H.NinjaTrader Customer Service
Comment
-
Thanks Brandon.
Do you have a link or sample code to see how to add the selected ATM strategy to the executed trade?
Comment
-
Hello carlosgutierrez,
Thanks for your notes.
You could view the sample code shared by my colleague Chris on the forum thread linked in post # 4.
In the sample, we can see that the name of the public string property is called 'AtmStrategy' which holds the selected Atm Strategy Template name. You could pass AtmStrategy in for the string strategyTemplateName argument when calling AtmStrategyCreate().
AtmStrategyCreate(OrderAction action, OrderType orderType, double limitPrice, double stopPrice, TimeInForce timeInForce, string orderId, string strategyTemplateName, string atmStrategyId, Action<Cbi.ErrorCode, string> callback)
See this help guide page for more information about AtmStrategyCreate(): https://ninjatrader.com/support/help...tegycreate.htmBrandon H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by ageeholdings, Today, 07:43 AM
|
0 responses
10 views
0 likes
|
Last Post
by ageeholdings
Today, 07:43 AM
|
||
Started by pibrew, Today, 06:37 AM
|
0 responses
4 views
0 likes
|
Last Post
by pibrew
Today, 06:37 AM
|
||
Started by rbeckmann05, Yesterday, 06:48 PM
|
1 response
14 views
0 likes
|
Last Post
by bltdavid
Today, 05:43 AM
|
||
Started by llanqui, Today, 03:53 AM
|
0 responses
9 views
0 likes
|
Last Post
by llanqui
Today, 03:53 AM
|
||
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
12 views
0 likes
|
Last Post Today, 12:38 AM |
Comment