NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Educational Resources > Reference Samples

Reference Samples Official NinjaScript reference code samples

Reply
 
Thread Tools Display Modes
Old 04-05-2008, 10:23 PM   #1
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default Strategy: Backtesting NinjaScript Strategies with an intrabar granularity

Reference sample for NinjaTrader 6.5.XXXX.X or greater.

As of NinjaTrader 6.5, you can submit orders to different Bars objects. This allows you the flexibility of submitting orders to different timeframes. Like in live trading, taking entry conditions from a 5min chart means executing your order as soon as possible instead of waiting until the next 5min bar starts building. You can achieve this by submitting your orders to a more granular secondary bar series to achieve an "intrabar" fill.


The attached reference sample demonstrates the following concepts:
  • Finding entry conditions on the primary bar object
  • Submitting orders to the secondary bar object for an intrabar fill
Important methods and properties include: Other methods and properties of interest include: Import instructions for NinjaTrader 6.5.XXXX.X or greater:
  1. Download the file contained in this thread to your PC desktop
  2. From the Control Center window, select the menu File > Utilities > Import NinjaScript
  3. Select the downloaded file
Attached Files
File Type: zip SampleIntrabarBacktest.zip (3.4 KB, 3415 views)
NinjaTrader_Josh is offline  
Reply With Quote
The following 4 users say thank you to NinjaTrader_Josh for this post:
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
Initiating ATM Strategies in a NinjaScript daven Automated Trading 7 08-18-2010 10:47 PM
RFE: Day granularity market reply? henry.omd Miscellaneous Support 3 01-08-2008 07:04 AM
Why is hour granularity unsupported? henry.omd Miscellaneous Support 1 12-24-2007 09:53 AM
Managing NinjaScript Strategies with ATM daven Suggestions And Feedback 1 09-25-2007 04:05 PM
NinjaScript Strategies vs Indicators whitmark General Programming 7 08-29-2007 02:55 PM


All times are GMT -6. The time now is 05:01 AM.