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 iceman2018, Today, 05:07 PM
|
0 responses
2 views
0 likes
|
Last Post
by iceman2018
Today, 05:07 PM
|
||
Started by rhyminkevin, Today, 04:58 PM
|
0 responses
22 views
0 likes
|
Last Post
by rhyminkevin
Today, 04:58 PM
|
||
Started by lightsun47, Today, 03:51 PM
|
0 responses
6 views
0 likes
|
Last Post
by lightsun47
Today, 03:51 PM
|
||
Started by 00nevest, Today, 02:27 PM
|
1 response
14 views
0 likes
|
Last Post
by 00nevest
Today, 03:48 PM
|
||
Started by futtrader, 04-21-2024, 01:50 AM
|
4 responses
49 views
0 likes
|
Last Post
by futtrader
Today, 03:01 PM
|
Comment