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 can I setup 2 different Take profit criteria in Strategy Builder.
Collapse
X
-
How can I setup 2 different Take profit criteria in Strategy Builder.
My Stop loss is a simple tick based value that does not change but for my take profit I am wanting to use the lookback period of last 10 bars. If there are no viable bars within 10 bars I want to use a percentage of ATR. What condition combination would allow me to accomplish that? -
Hello habeebft,
Thanks for your post and welcome to the NinjaTrader Forums!
To clarify, are you wanting to place a profit target based on a certain condition?
Are you using Set methods in the Stops and Targets screen of the Strategy Builder or are you using Exit methods in the Conditions and Actions screen of the Strategy Builder?
You could likely use Exit methods such as ExitLongLimit() and ExitLongStopMarket() to accomplish your overall goals. Note that you cannot use Exit methods and Set methods in the script as this would go against the Managed Approach Internal Order Handling Rules linked below.
Managed Approach Internal Order Handling Rules: https://ninjatrader.com/support/helpGuides/nt8/index.html?managed_approach.htm#InternalOrderHandl ingRulesThatReduceUnwantedPositions
You could create your conditions in the Conditions and Actions screen and then create an action to call ExitLongLimit() to place the profit target order.
If you want to place a certain profit target if a condition is true, else place a different profit target, this would require unlocking the code from the Strategy Builder and manually programming the logic in the strategy. It would not be possible to create an if-else condition in the Strategy Builder.
Builder Screens: https://ninjatrader.com/support/help...er_screens.htm
Conditions: https://ninjatrader.com/support/help...on_builder.htm
Actions: https://ninjatrader.com/support/help...t8/actions.htmLast edited by NinjaTrader_BrandonH; 04-07-2024, 02:15 PM.Brandon H.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by FAQtrader, Yesterday, 10:05 PM
|
1 response
14 views
0 likes
|
Last Post Today, 02:20 PM | ||
Started by NM_eFe, Today, 06:14 AM
|
1 response
10 views
0 likes
|
Last Post Today, 02:16 PM | ||
Started by EB Worx, 03-07-2023, 05:05 AM
|
5 responses
104 views
1 like
|
Last Post Today, 02:15 PM | ||
Started by PaulMohn, Today, 02:06 AM
|
2 responses
11 views
0 likes
|
Last Post Today, 02:08 PM | ||
Started by burtoninlondon, 04-28-2024, 12:38 AM
|
2 responses
22 views
0 likes
|
Last Post Today, 02:07 PM |
Comment