Thanks
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
How to set profit target bollinger Bands
Collapse
X
-
How to set profit target bollinger Bands
Hi,I can't find a solution how to set the profit target at the middle band of the bollinger indicator in the strategy builder.Is there somebody that can help me?
ThanksLast edited by Italianforex; 04-10-2019, 07:22 PM.Tags: None
-
-
Hello Italianforex,
Thanks for your reply.
The strategy builder provides a SetProfitTarget() however this cannot be used for a dynamically changing value such as the Bollinger as the profit target is set when the strategy is loaded.
To accomplish your goal you would need to create a set that:
1) Checks to see that you are in a long position (Using Strategy>Current MarketPosition == Strategy>MarketPosition>Long
2) add a check to see if the price is at or greater than the Bolllinger middle band (using Price>High[0] >= Indicator>Bollinger>value plot middle)
3) as an action, calls ExitLong()
You would then need to create another set to cover the short exit.Paul H.NinjaTrader Customer Service
Comment
-
Hello, I'm facing a similar problem (I want to exit at the upper bollinger band). I tried to create a dynamic profit target on the upper band using the strategy builder but it didn't work. Could you please provide a sample code for this solution? The 3 steps above weren't enough for me (sorry, I can't code). Thank you.
Comment
-
Hello DudaoRJ,
Thanks for your post.
Please see the help guide for the conditions builder which shows examples, here is a link to the page for your convenience: https://ninjatrader.com/support/help...on_builder.htm
Also, here is a link to a recorded webinar on the Strategy Builder: https://www.youtube.com/watch?v=HCyt...We0Nf&index=11
I've attached a screenshot of what the strategy builder conditions window would look like when checking to see if you are in a long position and if the close of the bar closes above the upper band of the bollinger indicator, the action to then exit long.
Paul H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by zstheorist, Today, 07:52 PM
|
0 responses
3 views
0 likes
|
Last Post
by zstheorist
Today, 07:52 PM
|
||
Started by pmachiraju, 11-01-2023, 04:46 AM
|
8 responses
149 views
0 likes
|
Last Post
by rehmans
Today, 06:44 PM
|
||
Started by mattbsea, Today, 05:44 PM
|
0 responses
5 views
0 likes
|
Last Post
by mattbsea
Today, 05:44 PM
|
||
Started by RideMe, 04-07-2024, 04:54 PM
|
6 responses
33 views
0 likes
|
Last Post
by RideMe
Today, 05:31 PM
|
||
Started by tkaboris, Today, 05:13 PM
|
0 responses
5 views
0 likes
|
Last Post
by tkaboris
Today, 05:13 PM
|
Comment