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
Bollinger band for targets
Collapse
X
-
Hello JTizz,
Thanks for your post.
Stops and Targets would be used for static targets/stops that do not rely on price action. We cannot use an indicator plot here as it would be based on price action.
You will want to use Exit methods in Conditions and Actions and use an ExitLongStopMarket or ExitShortStopMarket method to submit your stop loss order. I have attached an example that uses Exit methods to control the stop loss.
Exiting a position - https://ninjatrader.com/support/help...MarketPosition
Conditions examples —https://ninjatrader.com/support/help...on_builder.htm
Actions examples — https://ninjatrader.com/support/help...us/actions.htm
We look forward to assisting.Attached FilesJimNinjaTrader Customer Service
-
Hello JTizz,
You would not want to submit both an entry and exit method at the same time.
You just have to look at sets 1 and 2 in the example, and the MoveToBE bool can be ignored.
Set 1 checks if the position is flat and the entry condition is true and and enters. Set 2 checks if you are in a long position and places a Sell Stop Market order at the price level specified. You can use the Bollinger Band middle plot for the price level here.
If you are finding that the stop is getting ignored when you test with Default Properties > More Properties > Trace orders checked (Open a NinjaScript Output window to see Trace Order prints) then this may mean that the Bollinger band plot is currently on the other side of the market and will not allow you to submit a stop to that level. You could then create another condition that checks if the current market price is on the other side of the Bollinger band plot, and call ExitLong to have the position closed.
We look forward to assisting.JimNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by joselube001, Today, 12:17 PM
|
2 responses
12 views
0 likes
|
Last Post
by joselube001
Today, 01:04 PM
|
||
Started by arangocj, Today, 12:37 PM
|
1 response
16 views
0 likes
|
Last Post Today, 01:01 PM | ||
Started by kevinenergy, Yesterday, 12:01 PM
|
5 responses
20 views
0 likes
|
Last Post Today, 12:54 PM | ||
Started by Kraken29, Today, 12:32 PM
|
1 response
6 views
0 likes
|
Last Post Today, 12:44 PM | ||
Started by codeowl, 02-11-2019, 05:47 AM
|
23 responses
679 views
0 likes
|
Last Post
by stockbux
Today, 12:42 PM
|
Comment