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 > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 07-29-2009, 05:03 AM   #1
stefy
Senior Member
 
Join Date: Apr 2008
Posts: 310
Thanks: 0
Thanked 0 times in 0 posts
Default BarsSinceEntry() with Multi time frame strategy

I'm using a SetStopLoss() method in OnBarUpdate since I'm changing the stop loss to break even if a certain price is reached (as per your sample).
I don't want it to kick off on the very first bar though, but I cannot use BarsSinceEntry() > 1 since my strategy is MultiTimeFrame. Any work around to achieve the same result of BarsSinceEntry() > 1?

Thank you!
stefy is offline  
Reply With Quote
Old 07-29-2009, 05:24 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

stefy, you could continue working with BarsSinceEntry, since it supports an overload for MultiTime / Instrument usage - http://www.ninjatrader-support.com/H...inceEntry.html
NinjaTrader_Bertrand 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
time frame of Multi Instruments strategy does not match stephen_mcse Strategy Development 7 06-16-2009 03:57 PM
Multi-time frame strategy laparker Strategy Development 4 05-24-2009 10:03 PM
Multi Time Frame strategy glitch. pureporsche Strategy Analyzer 4 05-13-2009 10:05 AM
Multi-time frame strategy - Longer-term real-time calculations Shansen Strategy Development 1 04-19-2009 06:36 AM
Multi time frame syncronize chart with strategy ct Strategy Development 22 01-03-2008 12:22 PM


All times are GMT -6. The time now is 11:04 PM.