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
progression of sets. what comes first
Collapse
X
-
progression of sets. what comes first
is the progression of sets important when it comes to entry condition sets. and, exit position stop order sets. which one should come first, does it matter?Tags: None
-
Hello SteveReiza,
Thank you for your post.
For some strategies, the progression of sets might matter. For others, it might not. It is ultimately up to you to test your strategy and ensure that it is behaving as expected. If you do have any actions that need to be triggered in a specific order, you could use something like a bool or an int variable that is changed once the first condition set is met, then the next sequential condition should check for that specific value of the bool/int so it would only be able to be triggered if that first condition set was met already, etc. Here is a simple example of this idea using a bool:
Hi, To improve a strategy, I would like the condition to enter a trade to be triggered only after a second crossing happens. Meaning, for instance we have a sthocastics crossing, but the strategy would only trigger when a crossing between 2 emas happen. Would the looking back N bars work? Can it be done within the builder
For a more complex example that uses an int to ensure that conditions and actions are triggered in a specific order, see the TriggerState int used in the BreakEvenBuilderExample here:
Your question seems to be somewhat general; if you have a specific example in mind, please elaborate so we may better understand and assist you.
Thank you for using NinjaTrader.Emily C.NinjaTrader Customer Service
-
thanks for the reply. some things are working in the strategy some things aren't. i have multiple data series in the strategy. i'm getting executions on the added series. but, not the primary series. do i need to select primary in the input series. or, does it do the entry methods by default?
i attached an example. my exit positions stop order are working. i'm just thinking of tidying up the code and wondered if the placement mattered. i have them in progression with the sets instead of being clumped together.
Comment
-
Hello SteveReiza,
Thank you for your reply.
"i'm getting executions on the added series. but, not the primary series."
I do not understand what you mean; executions may only be submitted to the primary series. Entry methods are always submitted to the primary series only when using the Strategy Builder.
To get a better understanding of what orders are being executed as expected and why some orders are not executed as expected, please enable Trace Orders on the Default Properties screen as well as add prints to your Actions. Check the output for any errors or messages about orders being ignored or rejected, and also review the values in your prints to understand why certain conditions are or are not being triggered. We have more information about these debugging tools here:
Please let us know if we may be of further assistance.Emily C.NinjaTrader Customer Service
Comment
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by DJ888, Yesterday, 10:57 PM
|
0 responses
6 views
0 likes
|
Last Post
by DJ888
Yesterday, 10:57 PM
|
||
Started by MacDad, 02-25-2024, 11:48 PM
|
7 responses
158 views
0 likes
|
Last Post Yesterday, 10:23 PM | ||
Started by Belfortbucks, Yesterday, 09:29 PM
|
0 responses
7 views
0 likes
|
Last Post
by Belfortbucks
Yesterday, 09:29 PM
|
||
Started by zstheorist, Yesterday, 07:52 PM
|
0 responses
7 views
0 likes
|
Last Post
by zstheorist
Yesterday, 07:52 PM
|
||
Started by pmachiraju, 11-01-2023, 04:46 AM
|
8 responses
151 views
0 likes
|
Last Post
by rehmans
Yesterday, 06:44 PM
|
Comment