PDA

View Full Version : Opening range breakout


bradypreston
11-27-2007, 08:34 PM
has anyone figured out how to by 7 points off the open?

NinjaTrader_Josh
11-27-2007, 10:33 PM
Use Bars.FirstBarOfSession to get the open of the day by accessing Open[0] on that bar. Then it is just a matter of adding 7 points to that value when you submit your EnterLongLimit order.

http://www.ninjatrader-support.com/HelpGuideV6/FirstBarOfSession.html

bradypreston
11-28-2007, 05:21 AM
thanks for the hlep

juanmon
02-27-2010, 12:33 AM
how about if you want to do this but with day session only times for numerous markets (8:20 EST for bonds, 9:00 for crude, 9:30 for S&Ps) etc. Not interested in building historical bars with day only data, just trading off the open for several markets using the current day session only times.

thanks in advance.

NinjaTrader_Ben
02-27-2010, 08:01 AM
Hello,

Use Josh's post and this link to do it off of multiple instruments:
http://www.ninjatrader-support.com/HelpGuideV6/MultiTimeFrameInstruments.html

juanmon
02-27-2010, 09:22 AM
thanks. I'm still just a bit lost though: how do you set the appropriate times for each individual market for which the "buy off the open" stop would be worked? ( I only want to work the stop from 9:00am to 2:30 p.m. for crude, from 9:30am to 4:00 p.m. for emini's, 8:20 a.m. to 3:00 pm for bonds). I understand there will be a temptae for this in version 7, but I can't seem to figure out how to do this in the current version.

NinjaTrader_Ben
02-27-2010, 05:38 PM
Hello,

Oh, just filter using time ToTime(Time[0]):
http://www.ninjatrader-support.com/HelpGuideV6/ToTime.html
These two links have examples that will help you (but not exactly what you want to do):
http://www.ninjatrader-support2.com/vb/showthread.php?t=3226
http://www.ninjatrader-support2.com/vb/showthread.php?t=3225

But you will need to build a different criteria for each instrument bar you use.

Give it a try and post code and questions if you get stumped.

juanmon
02-28-2010, 05:13 AM
wil do. thanks for the quick responses.