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 10-25-2008, 02:00 AM   #1
ctrlbrk
Senior Member
 
Join Date: Oct 2008
Location: Dallas, TX
Posts: 682
Thanks: 0
Thanked 2 times in 2 posts
Default Have Strategy chart results, but restrict session begin/end

I need some help figuring out how to have a strategy chart entries/exits but also obey session begin/end settings.

If you start a strategy from a chart, there is no session begin/end option.

If you start the strategy from the strategy tab, it does not chart.

There has to be some code I can place in the strategy that will allow it to 'run' 24/7, but restrict the time frame it actually executes trades. I have tried for hours to get DateTime to work, but the problem is that doesn't work for backtesting or for market replay mode. Is there another method, to look at the 'market' time for Close[0] or etc, instead of looking at actual local PC time.

Thank you.
Mike
ctrlbrk is offline  
Reply With Quote
Old 10-25-2008, 08:18 AM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

Sure

If you are programming check out this reference sample - http://www.ninjatrader-support.com/v...ead.php?t=3226

If you are using the wizard please review the following - http://www.ninjatrader-support.com/H...mparisons.html
NinjaTrader_Ray 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
Restrict to trading only 1 time per day per direction. strategy1 General Programming 17 03-01-2011 11:16 PM
CurrentBar on Tick Charts with Session begin michaelbb Strategy Development 1 10-16-2008 02:39 AM
Don't want to see strategy results in DOM Folls Strategy Development 3 07-01-2008 09:58 AM
Session begin and end time Gains Suggestions And Feedback 1 04-19-2007 04:36 PM
Session Begin & End times in NT6 bmaltz Charting 2 02-12-2007 08:44 AM


All times are GMT -6. The time now is 12:15 PM.