Any ideas on what my issue is?
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
Tick LineBreak position exit not working consistently
Collapse
X
-
Tick LineBreak position exit not working consistently
I have a strategy using the Strategy Builder that only enters or exits trades on bar close. I'm using this on a 3 Line Break chart. Most of the entries seem correct but a significant portion of the exits are exiting in the same bar as the entry even though the entry requires an up close and the exit requires a down close. I added a "bars since entry !=0" to the exit conditions but it had no effect. I've attached an example of it working correctly and then a short time later exiting incorrectly. The only conditions for an exit are a down close and bars since entry not equal to 0.
Any ideas on what my issue is?
Tags: None
-
Hello dpvrkb,
Thank you for your note.
I'd like to test the strategy on my end to see what may be occurring. You can export the strategy from Tools > Export > NinjaScript Addon. Do not check the box to export as a compiled assembly or I will not be able to review your logic. Please attach the resulting .Zip file to your reply.
Thanks in advance; I look forward to assisting you further.Kate W.NinjaTrader Customer Service
-
Comment
-
Hello dpvrkb,
Thank you for your reply.
I'm not seeing you've actually applied the Bars Since Entry != 0 to the actual condition sets with the exits. All that happens in those sets is that you set a bool that you never actually seem to use or set back to false.
You'd want to place that logic in sets where an exit would actually be triggered - so Sets 9 and 18 are the ones that actually trigger exits, so you'd want to put that BarsSinceEntry logic in there to keep that from occurring. I also note you set MOMOLong and MOMOShort to true and never set those back to false - I'm not sure if that's intentional or not.
Please let us know if we may be of further assistance to you.Kate W.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by haas88, 03-21-2024, 02:22 AM
|
18 responses
208 views
0 likes
|
Last Post
by haas88
Today, 02:37 AM
|
||
Started by Board game geek, Today, 02:20 AM
|
0 responses
2 views
0 likes
|
Last Post Today, 02:20 AM | ||
Started by knighty6508, Today, 01:20 AM
|
2 responses
14 views
0 likes
|
Last Post
by knighty6508
Today, 02:13 AM
|
||
Started by franatas, Today, 01:53 AM
|
0 responses
3 views
0 likes
|
Last Post
by franatas
Today, 01:53 AM
|
||
Started by knighty6508, Today, 01:17 AM
|
0 responses
9 views
0 likes
|
Last Post
by knighty6508
Today, 01:17 AM
|
Comment