![]() |
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
|
|||||||
| Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Mar 2011
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
|
I would like a strategy based on a one tick breakout above or below the first daily session 30 min. bar high and low for a long and short trade respectively. I do not know how to structure this. Could someone please show me how or where I could get this strategy? Thanks.
|
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hello fhege,
Welcome to the NinjaTrader forums! Yes, we have a sample available for this. You can download from here and import into your NinjaTrader installation: http://www.ninjatrader.com/support/f...ead.php?t=3223
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: May 2011
Posts: 13
Thanks: 1
Thanked 0 times in 0 posts
|
Hi
Im new to Ninjatrader, understand markets well but just now trying to get a better grasp of implementing 'custom' stategies like the one you have kindly provided. I have downloaded this strategy, opened it in the custom strategies tool and saved it as a ninjascript strategy. Unfortunately, when i use the strategy analyzer, I cannot select it from the list of dropdown strategies. I can however see it on the left hand side folder view when expanding 'strategies'. I have not modified the code in any way. Just trying to test out anythint to understand the product further. I have provided a screenshot. Thanks for your time! |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hi smegey,
Thanks for the post and welcome to the NinjaTrader forums. You should not have to manually open this file and place in strategy folder To bring this into your platform, you can use File > Utilities > Import NinjaScript > Select the zip file. http://www.ninjatrader.com/support/h...nt7/import.htm
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: May 2011
Posts: 13
Thanks: 1
Thanked 0 times in 0 posts
|
Thanks so much RyanM. Ill give this a shot when i next get in front of my trade computer.
|
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Sep 2011
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
|
Not sure if this is the correct place to post such a question but I am wondering if anyone knows how to change this strategy a little so that the range of the 30 minute candle excludes the wicks? Only trades the breakout of the body of the candle. Could anyone help?
Thank You |
|
|
|
|
|
#7 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hello c4matted,
Thanks for the post and welcome to the NinjaTrader forums! If you want to exclude wicks for your breakout strategy, you would have to work with Open and Close instead of High and Low. To find which is higher/lower for Open and Close there are methods Math.Min() and Math.Max().
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Sep 2011
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
|
Ryan,
I appreciate the information. Definitely something I am interested in. Would you know of any documentation or the best way for someone that is new to Ninjatrader to start building an automated strategy or a strategy for backtesting? Is there tools within Ninjatrader to help me modify the current breakout strategy? Thank You again |
|
|
|
|
|
#9 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Yes, you can build from existing samples and is a good way to get familiar with acceptable code syntax. For an introduction to strategy development in NinjaTrader, please see following link:
http://www.ninjatrader.com/support/h...nt_process.htm To make copies of any existing strategies: Right Click in editor > Save as and provide a new name.
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#10 |
|
Junior Member
Join Date: Jan 2013
Location: Coral Gables, FL
Posts: 11
Thanks: 2
Thanked 2 times in 2 posts
|
Hi All,
I'm new to NinjaTrader and this is my first post on the forum. Please have patience with me. I have a question about the Bars.FirstBarOfSession function. When dealing with the ES, which practically trades around the clock, does the system consider the start of the session the 9:30 USA market open? Is the overnight session ignored? Thank you in advance for your responses! |
|
|
|
|
|
#11 |
|
NinjaTrader Customer Service
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
|
Hello GeoOrtiz,
Welcome to the forum and I am happy to assist you. It would depend on the session template you are using. If you are using an RTH session template then only the FirstBarOfSession will return the bar number @ 9:30. http://www.ninjatrader.com/support/h...on_manager.htm
Joydeep M.
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Joydeep for this post: |
|
|
|
#12 | |
|
Senior Member
|
Quote:
|
|
|
|
|
|
The following user says thank you to koganam for this post: |
|
|
|
#13 |
|
Junior Member
Join Date: Jan 2013
Location: Coral Gables, FL
Posts: 11
Thanks: 2
Thanked 2 times in 2 posts
|
Hi All,
I downloaded and ran this sample strategy on one day (01/17/13) on ES, but it is calculating the wrong highest high of the first 30 min of trading. Am I running the backtest incorrectly?
Last edited by GeoOrtiz; 01-22-2013 at 10:00 AM.
|
|
|
|
|
|
#14 |
|
NinjaTrader Customer Service
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
|
Hello GeoOrtiz,
If you set the Min bars required to 0, or better backtest the strategy with 2 days or more data then are you getting the correct fills.
Joydeep M.
NinjaTrader Customer Service |
|
|
|
|
|
#15 |
|
Junior Member
Join Date: Jan 2013
Location: Coral Gables, FL
Posts: 11
Thanks: 2
Thanked 2 times in 2 posts
|
Thank you Joydeep. That did the trick.
|
|
|
|
|
The following user says thank you to GeoOrtiz for this post: |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Opening range breakout | bradypreston | General Programming | 7 | 02-28-2010 05:13 AM |
| Conversion 30 min. historical data to daily | Argo1 | Strategy Development | 7 | 10-28-2009 04:05 AM |
| Opening Range Breakout | maninjapan | Strategy Development | 32 | 10-20-2009 02:55 PM |
| Please help with Opening Range Breakout Strategy | OrderFlow | Strategy Development | 2 | 08-03-2009 04:30 AM |
| Possible to chart the first 30 min candle of day and that's it? | brownsfan019 | Charting | 4 | 04-17-2008 11:36 AM |