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.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 01-23-2011, 07:02 AM   #1
adamus
Senior Member
 
Join Date: Apr 2010
Posts: 1,058
Thanks: 33
Thanked 2 times in 1 post
Default Trading gaps, need a market-on-open for backtesting

I want to write a strategy to backtest a theory that I can make money trading gaps.

I can't work out how best to implement this.

My first attempt was no good because the order is executed on the second bar after the gap is formed, whereas I want to enter at the market as soon as the Open[0] of the first bar arrives.

I realise i can do this in real-time with CalculateOnBarClose = false, but this doesn't work in backtesting.

The closest I can get is to use 1 minute bars but then I see I miss a considerable number of ticks.

Can I place a conditional Market-on-Open i.e. with a stop? I figure this would move into the realm of Unmanaged Orders, as long as I can backtest it.

Can't find anything in the Help or the forum messages.

Thanks.
adamus is offline  
Reply With Quote
 

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
Market Replay data gaps? scootaloo_trader Version 7 Beta General Questions & Bug Reports 4 09-24-2010 02:57 AM
How to start backtesting and trading freewind Installation and Licensing 1 01-18-2010 03:41 AM
Is it possible to do market replay and backtesting based on market depth? clearpicks Indicator Development 1 03-11-2009 04:07 PM
Market Gaps and Stop Orders GreenTrade Strategy Development 11 01-19-2009 06:26 PM
SetProfitTarget works in backtesting but not in live trading. Why? ooppie General Programming 3 10-03-2008 09:51 AM


All times are GMT -6. The time now is 08:20 PM.