Any ideas on what my issue is?
Announcement
Collapse
No announcement yet.
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.
-
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.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
71 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
143 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
76 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
47 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
51 views
0 likes
|
Last Post
|

Comment