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
bool used twice. in different sets
Collapse
X
-
bool used twice. in different sets
is it alright to use the same bool "true" in two sets. i have if profit of ticks X amount in one set, and profit of ticks Y amount in another set. and, they both didn't get accepted this morning when the trade position was open with the bool true.Tags: None
-
Hello SteveReiza,
Thank you for your post.
Yes, it would be alright to check if the same bool is "true" in two different sets. To understand why certain conditions were or were not met or certain actions were or were not taken, have you enabled Trace Orders and/or added prints to your strategy?
If not, I suggest doing so to better understand your strategy's behavior and see how the conditions were evaluated when you expected the actions from the sets to be executed.
Please let us know if we may be of further assistance.Emily C.NinjaTrader Customer Service
-
Comment
-
Hello SteveReiza,
Thank you for your reply.
I won't be able to tell you if it's "correct" just from looking at it. It is up to you to test the strategy and decide if it is behaving as expected or not, and this will let you know if you have configured it correctly or not. What are your results from testing? Do you see the order being submitted in the Trace Orders output, or are there any messages showing it was ignored or rejected?
Do you have any information configured on the Stops and Targets screen of the builder as well? If so, this could be the issue as you can not combine Stops and Targets that use the Set() methods with actions to submit a non-market Exit() order. This is due to the Internal Order Handling Rules That Prevent Unwanted Positions listed here:
If a combination of Set() and Exit() methods is the case, you should see TraceOrders output stating that one of the orders was ignored with a note about why.
Please let us know if we may be of further assistance.Emily C.NinjaTrader Customer Service
Comment
-
thanks for the reply. i have trace orders enabled. is it something i can go back and look at in the output window? or do i need to have it open when it happens to see it?
i don't have stops or targets.
i noticed that one of them loads after the 2 minute bar completes. this is a 35 second bar entry. i have multiple timeframes in the strategy. so, as the trade position is open and active there is a lull to when the exit position stop order is accepted in the orders tab. that lull is when the 2 minute bar is completed. doesn't make sense because i have it on tick update.
the tick ones are the ones that aren't being accepted. i have the bool in two sets. with two different exit position stop orders.
Comment
-
Hello SteveReiza,
Thank you for your reply.
Output in the NinjaScript Output window is only generated while the strategy is running, so you need to have it open when it happens to see it. Trace Orders output is not something that you can go back and look at. Please test your strategy again while the NinjaScript Output window is open and review the output. You could even test it in the Playback Connection over the same period of time when you observed the behavior:
Thank you for your time and patience.Emily C.NinjaTrader Customer Service
Comment
-
thanks for the reply. okay sweet, i'll do a playback with the output window open and see what happened.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by ZeroKuhl, Today, 04:31 PM
|
0 responses
7 views
0 likes
|
Last Post
by ZeroKuhl
Today, 04:31 PM
|
||
Started by Vulgoth_t_Destroyer, 05-09-2022, 04:45 PM
|
54 responses
5,336 views
0 likes
|
Last Post
by Gaterz
Today, 04:29 PM
|
||
Started by ETFVoyageur, 05-07-2024, 07:05 PM
|
11 responses
74 views
0 likes
|
Last Post
by -=Edge=-
Today, 04:27 PM
|
||
Started by _Zero_, 04-10-2020, 03:21 PM
|
145 responses
7,900 views
6 likes
|
Last Post
by johng2
Today, 04:19 PM
|
||
Started by TheTradingMantis, 01-19-2023, 02:05 AM
|
43 responses
921 views
0 likes
|
Last Post
by jmagaia
Today, 04:13 PM
|
Comment