NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > Application Technical Support > Strategy Analyzer

Strategy Analyzer Support for automated system backtesting and optimization using the NinjaTrader Strategy Analyzer.

Reply
 
Thread Tools Display Modes
Old 05-04-2010, 01:23 PM   #1
titleistbb22
Member
 
Join Date: Nov 2009
Posts: 77
Thanks: 0
Thanked 1 time in 1 post
Default Bars Since Entry for 2nd Entry

Working on an exit criteria that uses BarsSinceEntry but does not work on my 2nd entry. Example
I enter one position long, 15 bars later I enter another position
My criteria 4 bars later is met for exit from my second entry (if BarsSinceEntry < 7, exit if unrealized P&L drops 1.5%), however my second position is not exited.
This criteria does work on my first entry when met
Please advise if the BarsSinceEntry filter only looks at the first entry and how you would enable it to look at each entry individually

Thank you
titleistbb22 is offline  
Reply With Quote
Old 05-04-2010, 01:31 PM   #2
NinjaTrader_Austin
NinjaTrader Customer Service
 
NinjaTrader_Austin's Avatar
 
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
Default

titleistbb22, BarsSinceEntry() is supposed to look at every single entry, not just the first one. If you are specifying a signal name, does the name change for each entry? Could you perhaps post the code you're using so we can see if something looks out of place?
NinjaTrader_Austin is offline  
Reply With Quote
Old 05-04-2010, 09:00 PM   #3
titleistbb22
Member
 
Join Date: Nov 2009
Posts: 77
Thanks: 0
Thanked 1 time in 1 post
Default

I figured this out - my criteria simply wasnt being met. Thank you
titleistbb22 is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Entry date shows as the next day of actual entry TintuLal Strategy Analyzer 6 09-25-2009 02:26 PM
Exit Position n bars since entry MAX Strategy Development 5 09-08-2009 04:43 AM
Bars Since Entry nigeleyre Strategy Development 2 10-08-2008 08:33 AM
bars since entry maninjapan General Programming 2 05-23-2008 04:25 AM
Bars Since Entry daven Automated Trading 3 08-08-2007 02:12 AM


All times are GMT -6. The time now is 04:52 AM.