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 > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 05-17-2009, 05:05 PM   #1
PrimWell_Chris
Junior Member
 
Join Date: May 2009
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
Default Switch Buy/Sell Stop Order for Channel Breakout

I have done a lot of searching in the forums to try and find a decent solution to this problem.

I have a channel that I want to buy or sell a breakout via a market stop order. Due to the restriction of not being able to have two simultaneous opposing orders with NT 6.5 (hope v7 "fixes" this), I am trying to monitor the recent price action to either submit the appropriate closest stop order.

The problem is when a single bar (for example on a 1min chart) spans a large range and effectively triggers both conditions to submit the buy/sell stop orders.

I believe in real-time, just monitoring Close[0] with CalculateOnBarClose = false; will allow the strategy to execute fine as it will cancel/replace the orders as needed should price bounce around before filling. However, I am concerned with backtesting this strategy first to get a feel for how robust it is and if there are any tweaks I can make to it. So far I cannot find a way during backtesting to determine how to allow the appropriate buy/sell stop order to get submitted in time in situations where a single bar may span from one side of the channel to the other and go through where the buy/sell stop order should be. Are there any good examples or resources on how I can better improve my backtesting results with this type strategy?
PrimWell_Chris is offline  
Reply With Quote
Old 05-18-2009, 05:37 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,398
Thanks: 252
Thanked 969 times in 952 posts
Default

Welcome to our support forums PrimWell_Chris - I think the best approach would be to recreate your channel on a tick based chart to 'split up' the wide range bar and then using the concept introduced in this reference sample for intrabar fill simulation - http://www.ninjatrader-support2.com/...ead.php?t=6652
NinjaTrader_Bertrand is online now  
Reply With Quote
Old 05-18-2009, 08:52 AM   #3
PrimWell_Chris
Junior Member
 
Join Date: May 2009
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
Default

Excellent. I was wondering if going to a Tick Chart was the correct move to make. Thank you
PrimWell_Chris 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
How to enter OCO sell stop & buy stop? asalada Charting 7 09-17-2010 04:24 AM
Place Buy order and Sell order at same time. robotics General Programming 38 08-07-2009 02:10 PM
Buy / Sell Stop bsamani General Programming 5 12-11-2008 01:58 PM
How to switch BUY/SELL column in superdom! cwolters SuperDOM and other Order Entry Windows 1 12-05-2008 06:08 AM
Sell and Buy stop colors deanldavis475 Charting 1 01-14-2008 09:48 AM


All times are GMT -6. The time now is 08:18 AM.