I could try using alerts and action to place order, however that doesn't allow placing order using ATM strategy.
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
Strategy to place order when price comes close to a line
Collapse
X
-
Strategy to place order when price comes close to a line
Is there strategy code I can incorporate which places an order using an ATM strategy when price gets to within x ticks of a line? Enter long if it approaches line from high to low, enter short if approaches line from low to high.
I could try using alerts and action to place order, however that doesn't allow placing order using ATM strategy.Tags: None
-
Hello higher.high,
Thanks for your post.
You can create a Ninjascript strategy that can accomplish your goal. The strategy can be coded to provide the logic of line detection, comparing price to the line, placing an entry order and assigning an existing ATM strategy template to cover the profit/stops.
You would not be able to accomplish this in the strategy builder.
In your Ninjatrader is the strategy SampleATMstrategy which can demonstrate the use of a strategy that places an entry order and calls a specific ATM template. This could be the model for the strategy as it uses special methods to work with ATMs which. The strategy is well commented in the code to help explain what the methods and properties are doing/for. Here is a link to the special methods that the strategy uses: https://ninjatrader.com/support/help...gy_methods.htm
If the strategy is drawing the line that is of interest then it is straight forward for the strategy as it then knows the price level of the line. If this is a manually drawn line, then you would need additional coding to detect that line and pull the price value of the line into the strategy. Here is a link to the help guide that shows how to cycle through the draw objects collection to find a specific object: https://ninjatrader.com/support/help...rawobjects.htm
If you would like a strategy created for you, to accomplish your goals, we can provide a link to 3rd party programmers that would provide that service.
Regarding, "I could try using alerts and action to place order,however that doesn't allow placing order using ATM strategy." That is not true, the chart alert/ATM feature was implemented in 8.0.18.1, you can use a chart Alert to place an order and select the ATM template to use when that entry order fills.
Paul H.NinjaTrader Customer Service
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by spottysallrite, Today, 11:31 AM
|
6 responses
13 views
0 likes
|
Last Post Today, 01:53 PM | ||
Started by volIQ, Yesterday, 04:28 PM
|
2 responses
16 views
0 likes
|
Last Post
by volIQ
Today, 01:42 PM
|
||
Started by adeelshahzad, Today, 11:49 AM
|
5 responses
16 views
0 likes
|
Last Post Today, 01:27 PM | ||
Started by yaniv, Today, 12:50 PM
|
1 response
5 views
0 likes
|
Last Post Today, 01:15 PM | ||
Started by Lele2k24, Yesterday, 11:24 AM
|
10 responses
33 views
0 likes
|
Last Post Today, 01:04 PM |
Comment