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 Jimmyk, 01-26-2018, 05:19 AM
|
6 responses
835 views
0 likes
|
Last Post
by emuns
Today, 11:27 AM
|
||
Started by jxs_xrj, 01-12-2020, 09:49 AM
|
6 responses
3,291 views
1 like
|
Last Post
by jgualdronc
Today, 10:56 AM
|
||
Started by Touch-Ups, Today, 10:36 AM
|
0 responses
11 views
0 likes
|
Last Post
by Touch-Ups
Today, 10:36 AM
|
||
Started by geddyisodin, 04-25-2024, 05:20 AM
|
11 responses
62 views
0 likes
|
Last Post Today, 10:08 AM | ||
Can someone turn this thinkscript into a ninjascript. 5PM CST OHL and Previous Day
by Option Whisperer
Started by Option Whisperer, Today, 09:55 AM
|
0 responses
9 views
0 likes
|
Last Post Today, 09:55 AM |
Comment